diff --git a/changes.md b/changes.md index 8247f6c6f18..92a11e9dc49 100644 --- a/changes.md +++ b/changes.md @@ -3,23 +3,772 @@
Added Type(s) +- added type `CartMergeMode` +- added type `MergeCartDraft` +- added type `RecurringOrderFailureError` +- added type `GraphQLRecurringOrderFailureError` +- added type `CartFrozenMessage` +- added type `CartUnfrozenMessage` +- added type `OrderPaymentRemovedMessage` +- added type `RecurringOrderFailedMessage` +- added type `CartFrozenMessagePayload` +- added type `CartUnfrozenMessagePayload` +- added type `OrderPaymentRemovedMessagePayload` +- added type `RecurringOrderFailedMessagePayload` - added type `DiscountCombinationMode` - added type `DiscountsConfiguration` - added type `ProjectSetDiscountsConfigurationAction`
+
+Added Method(s) + +- added method `apiRoot.withProjectKey().carts().customerIdWithCustomerIdValueMerge().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().carts().customerIdWithCustomerIdValueMerge().post()` +
+ +
Removed Property(s) +- :warning: removed property `payment` from type `OrderPaymentAddedMessage` +- :warning: removed property `payment` from type `OrderPaymentAddedMessagePayload` - :warning: removed property `skipConfiguration` from type `RecurringOrderSetOrderSkipConfigurationAction` +- :warning: removed property `tierMinimumQuantity` from type `StandalonePriceRemovePriceTierAction`
Added Property(s) +- added property `sku` to type `InventoryEntryQuantitySetMessage` +- added property `paymentRef` to type `OrderPaymentAddedMessage` +- added property `sku` to type `InventoryEntryQuantitySetMessagePayload` +- added property `paymentRef` to type `OrderPaymentAddedMessagePayload` - added property `discounts` to type `Project` - added property `skipConfigurationInputDraft` to type `RecurringOrderSetOrderSkipConfigurationAction` +- added property `minimumQuantity` to type `StandalonePriceRemovePriceTierAction` +
+ + +
+Added Resource(s) + +- added resource `/{projectKey}/carts/customer-id={customerId}/merge` +- added resource `/{projectKey}/in-store/key={storeKey}/carts/customer-id={customerId}/merge` +
+ +**History changes** + +
+Added Type(s) + +- added type `AddShippingChange` +- added type `ChangeApprovalRuleModeChange` +- added type `ChangeCustomerChange` +- added type `ChangeIncludedInStatisticsChange` +- added type `ChangeLastVariantIdChange` +- added type `ChangeLineItemNameChange` +- added type `ChangeLineItemPublishedChange` +- added type `ExcludeProductChange` +- added type `RemoveShippingChange` +- added type `ReplaceTaxRateChange` +- added type `RevertStagedChangesChange` +- added type `RevertStagedVariantChangesChange` +- added type `SetAncestorsChange` +- added type `SetBillingAddressCustomFieldChange` +- added type `SetBillingAddressCustomTypeChange` +- added type `SetBusinessUnitChange` +- added type `SetCustomLineItemDiscountedPriceChange` +- added type `SetCustomLineItemDiscountedPricePerQuantityChange` +- added type `SetCustomerGroupAssignmentsChange` +- added type `SetDeliveryAddressCustomFieldChange` +- added type `SetDeliveryAddressCustomTypeChange` +- added type `SetDeliveryCustomFieldChange` +- added type `SetDeliveryCustomTypeChange` +- added type `SetDiscountOnTotalPriceChange` +- added type `SetInheritedStoresChange` +- added type `SetItemShippingAddressCustomFieldChange` +- added type `SetItemShippingAddressCustomTypeChange` +- added type `SetMaxCartQuantityChange` +- added type `SetMinCartQuantityChange` +- added type `SetParcelCustomFieldChange` +- added type `SetParcelCustomTypeChange` +- added type `SetPasswordChange` +- added type `SetPriceKeyChange` +- added type `SetPriceModeChange` +- added type `SetProductAttributeChange` +- added type `SetReturnInfoChange` +- added type `SetReturnItemCustomLineItemCustomFieldChange` +- added type `SetReturnItemCustomLineItemCustomTypeChange` +- added type `SetReturnItemLineItemCustomFieldChange` +- added type `SetReturnItemLineItemCustomTypeChange` +- added type `SetShippingAddressCustomFieldChange` +- added type `SetShippingAddressCustomTypeChange` +- added type `SetShippingCustomFieldChange` +- added type `SetShippingCustomTypeChange` +- added type `SetTransactionCustomFieldChange` +- added type `SetTransactionCustomTypeChange` +- added type `SetUnitTypeChange` +- added type `SetVariantExclusionChange` +- added type `UpdateItemShippingAddressChange` +- added type `SetAssociatesChange` +- added type `SetInheritedAssociatesChange` +- added type `ChangeTopLevelUnitChange` +- added type `Attribute` +- added type `BusinessUnitApprovalRuleMode` +- added type `BusinessUnitResourceIdentifier` +- added type `BusinessUnitType` +- added type `CustomFieldEnumValue` +- added type `CustomFieldLocalizedEnumValue` +- added type `CustomerGroupAssignment` +- added type `DiscountOnTotalPrice` +- added type `DiscountedTotalPricePortion` +- added type `ProductPriceModeEnum` +- added type `ProductVariantExclusion` +- added type `Shipping` +- added type `ShippingInfo` +- added type `ShippingRateInput` +- added type `ShoppingListLineItem` +- added type `TypeTextInputHint` +- added type `TypedMoney` +- added type `CentPrecisionMoney` +- added type `DiscountedPrice` +- added type `ShippingMethodState` +- added type `AssociateRoleDeprecated` +- added type `AssociateRoleKeyReference` +- added type `AttributeLevelEnum` +- added type `BaseAddress` +- added type `BusinessUnitKeyReference` +- added type `CartDiscountReference` +- added type `CartDiscountTarget` +- added type `CartDiscountValue` +- added type `CategoryReference` +- added type `ChannelReference` +- added type `CustomFieldValue` +- added type `CustomLineItemPriceMode` +- added type `CustomLineItemRecurrenceInfo` +- added type `CustomerGroupReference` +- added type `CustomerReference` +- added type `DiscountCodeReference` +- added type `FieldContainer` +- added type `GeoJson` +- added type `InventoryMode` +- added type `LineItemMode` +- added type `LineItemPriceMode` +- added type `LineItemRecurrenceInfo` +- added type `MethodTaxRate` +- added type `MethodTaxedPrice` +- added type `PaymentReference` +- added type `PriceSelectionMode` +- added type `PriceTier` +- added type `ProductDiscountReference` +- added type `ProductDiscountValue` +- added type `ProductReference` +- added type `ProductSelectionReference` +- added type `ProductTypeReference` +- added type `ProductVariant` +- added type `RecurrencePolicyReference` +- added type `ResourceTypeId` +- added type `ScopedPrice` +- added type `ShippingMethodReference` +- added type `StateReference` +- added type `StoreKeyReference` +- added type `TaxCategoryReference` +- added type `TaxPortion` +- added type `TypeReference` +- added type `ClientLogging` +- added type `ChangePriceRoundingModeChange` +
+ + +
+Changed Type(s) + +- :warning: changed type `Address` from type `object` to `BaseAddress` +- :warning: changed type `GeoLocation` from type `object` to `GeoJson` +
+ + +
+MarkDeprecated Type(s) + +- marked type `AddAssociateChange` as deprecated +- marked type `AddPriceChange` as deprecated +- marked type `AddProductSelectionChange` as deprecated +- marked type `AddStateRolesChange` as deprecated +- marked type `ChangeAmountAuthorizedChange` as deprecated +- marked type `RemoveAssociateChange` as deprecated +- marked type `RemovePriceChange` as deprecated +- marked type `RemoveProductSelectionChange` as deprecated +- marked type `RemoveStateRolesChange` as deprecated +
+ + +
+Added Enum(s) + +- added enum `addInheritedAssociate` to type `PlatformInitiatedChange` +- added enum `changeIncludedInStatistics` to type `PlatformInitiatedChange` +- added enum `changeInheritedAssociate` to type `PlatformInitiatedChange` +- added enum `changeLastVariantId` to type `PlatformInitiatedChange` +- added enum `changeLineItemPublished` to type `PlatformInitiatedChange` +- added enum `changeTopLevelUnit` to type `PlatformInitiatedChange` +- added enum `removeInheritedAssociate` to type `PlatformInitiatedChange` +- added enum `setAncestors` to type `PlatformInitiatedChange` +- added enum `setInheritedAssociates` to type `PlatformInitiatedChange` +- added enum `setInheritedStores` to type `PlatformInitiatedChange` +- added enum `setLineItemDeactivatedAt` to type `PlatformInitiatedChange` +- added enum `setProductCount` to type `PlatformInitiatedChange` +- added enum `setReservations` to type `PlatformInitiatedChange` +- added enum `CreateApprovalRules` to type `Permission` +- added enum `UpdateApprovalRules` to type `Permission` +- added enum `UpdateApprovalFlows` to type `Permission` +- added enum `ViewMyShoppingLists` to type `Permission` +- added enum `ViewOthersShoppingLists` to type `Permission` +- added enum `UpdateMyShoppingLists` to type `Permission` +- added enum `UpdateOthersShoppingLists` to type `Permission` +- added enum `CreateMyShoppingLists` to type `Permission` +- added enum `CreateOthersShoppingLists` to type `Permission` +- added enum `DeleteMyShoppingLists` to type `Permission` +- added enum `DeleteOthersShoppingLists` to type `Permission` +- added enum `includeOnly` to type `ProductVariantSelectionTypeEnum` +- added enum `includeAllExcept` to type `ProductVariantSelectionTypeEnum` +- added enum `RenegotiationAddressed` to type `QuoteState` +- added enum `approval-flow` to type `ReferenceTypeId` +- added enum `approval-rule` to type `ReferenceTypeId` +- added enum `attribute-group` to type `ReferenceTypeId` +- added enum `direct-discount` to type `ReferenceTypeId` +- added enum `discount-group` to type `ReferenceTypeId` +- added enum `product-price` to type `ReferenceTypeId` +- added enum `product-tailoring` to type `ReferenceTypeId` +- added enum `recurrence-policy` to type `ReferenceTypeId` +- added enum `recurring-order` to type `ReferenceTypeId` +- added enum `standalone-price` to type `ReferenceTypeId` +- added enum `Delivered` to type `ShipmentState` +- added enum `Canceled` to type `ShipmentState` +
+ + +
+Removed Enum(s) + +- :warning: removed enum `changeAmountAuthorized` from type `UpdateType` +- :warning: removed enum `Failed` from type `QuoteState` +
+ + +
+Required Property(s) + +- changed property `id` of type `Address` to be optional +- changed property `key` of type `Address` to be optional +- changed property `title` of type `Address` to be optional +- changed property `salutation` of type `Address` to be optional +- changed property `firstName` of type `Address` to be optional +- changed property `lastName` of type `Address` to be optional +- changed property `streetName` of type `Address` to be optional +- changed property `streetNumber` of type `Address` to be optional +- changed property `additionalStreetInfo` of type `Address` to be optional +- changed property `postalCode` of type `Address` to be optional +- changed property `city` of type `Address` to be optional +- changed property `region` of type `Address` to be optional +- changed property `state` of type `Address` to be optional +- changed property `company` of type `Address` to be optional +- changed property `department` of type `Address` to be optional +- changed property `building` of type `Address` to be optional +- changed property `apartment` of type `Address` to be optional +- changed property `pOBox` of type `Address` to be optional +- changed property `phone` of type `Address` to be optional +- changed property `mobile` of type `Address` to be optional +- changed property `email` of type `Address` to be optional +- changed property `fax` of type `Address` to be optional +- changed property `additionalAddressInfo` of type `Address` to be optional +- changed property `externalId` of type `Address` to be optional +- changed property `description` of type `Asset` to be optional +- changed property `custom` of type `Asset` to be optional +- changed property `key` of type `Asset` to be optional +- changed property `key` of type `AssetSource` to be optional +- changed property `dimensions` of type `AssetSource` to be optional +- changed property `contentType` of type `AssetSource` to be optional +- changed property `inputTip` of type `AttributeDefinition` to be optional +- changed property `taxedPrice` of type `CustomLineItem` to be optional +- changed property `inputHint` of type `FieldDefinition` to be optional +- changed property `label` of type `Image` to be optional +- changed property `productSlug` of type `LineItem` to be optional +- changed property `custom` of type `LineItem` to be optional +- changed property `addedAt` of type `LineItem` to be optional +- changed property `state` of type `Location` to be optional +- changed property `measurements` of type `Parcel` to be optional +- changed property `trackingData` of type `Parcel` to be optional +- changed property `items` of type `Parcel` to be optional +- changed property `heightInMillimeter` of type `ParcelMeasurements` to be optional +- changed property `lengthInMillimeter` of type `ParcelMeasurements` to be optional +- changed property `widthInMillimeter` of type `ParcelMeasurements` to be optional +- changed property `weightInGram` of type `ParcelMeasurements` to be optional +- changed property `channels` of type `ProductVariantAvailability` to be optional +- changed property `isOnStock` of type `ProductVariantAvailability` to be optional +- changed property `restockableInDays` of type `ProductVariantAvailability` to be optional +- changed property `availableQuantity` of type `ProductVariantAvailability` to be optional +- changed property `isOnStock` of type `ProductVariantChannelAvailability` to be optional +- changed property `restockableInDays` of type `ProductVariantChannelAvailability` to be optional +- changed property `availableQuantity` of type `ProductVariantChannelAvailability` to be optional +- changed property `id` of type `ResourceIdentifier` to be optional +- changed property `key` of type `ResourceIdentifier` to be optional +- changed property `returnTrackingId` of type `ReturnInfo` to be optional +- changed property `returnDate` of type `ReturnInfo` to be optional +- changed property `comment` of type `ReturnItem` to be optional +- changed property `suggestTokenizer` of type `SearchKeyword` to be optional +- changed property `freeAbove` of type `ShippingRate` to be optional +- changed property `isMatching` of type `ShippingRate` to be optional +- changed property `externalId` of type `SyncInfo` to be optional +- changed property `id` of type `TaxRate` to be optional +- changed property `state` of type `TaxRate` to be optional +- changed property `subRates` of type `TaxRate` to be optional +- changed property `custom` of type `TextLineItem` to be optional +- changed property `description` of type `TextLineItem` to be optional +- changed property `trackingId` of type `TrackingData` to be optional +- changed property `carrier` of type `TrackingData` to be optional +- changed property `provider` of type `TrackingData` to be optional +- changed property `providerTransaction` of type `TrackingData` to be optional +- changed property `isReturn` of type `TrackingData` to be optional +- changed property `timestamp` of type `Transaction` to be optional +- changed property `interactionId` of type `Transaction` to be optional +
+ + +
+Changed Property(s) + +- :warning: changed property `nextValue` of type `AddEnumValueChange` from type `EnumValue` to `CustomFieldEnumValue` +- :warning: changed property `nextValue` of type `AddInterfaceInteractionChange` from type `CustomFieldExpandedValue` to `CustomFields` +- :warning: changed property `nextValue` of type `AddLocalizedEnumValueChange` from type `AttributeLocalizedEnumValue` to `CustomFieldLocalizedEnumValue` +- :warning: changed property `previousValue` of type `AddShoppingListLineItemChange` from type `LineItem` to `ShoppingListLineItem` +- :warning: changed property `nextValue` of type `AddShoppingListLineItemChange` from type `LineItem` to `ShoppingListLineItem` +- :warning: changed property `w` of type `AssetDimensions` from type `integer` to `number` +- :warning: changed property `h` of type `AssetDimensions` from type `integer` to `number` +- :warning: changed property `customer` of type `Associate` from type `Reference` to `CustomerReference` +- :warning: changed property `associateRole` of type `AssociateRoleAssignment` from type `KeyReference` to `AssociateRoleKeyReference` +- :warning: changed property `previousValue` of type `ChangeEnumValueOrderChange` from type `EnumValue[]` to `CustomFieldEnumValue[]` +- :warning: changed property `nextValue` of type `ChangeEnumValueOrderChange` from type `EnumValue[]` to `CustomFieldEnumValue[]` +- :warning: changed property `previousValue` of type `ChangeInputHintChange` from type `TextInputHint` to `TypeTextInputHint` +- :warning: changed property `nextValue` of type `ChangeInputHintChange` from type `TextInputHint` to `TypeTextInputHint` +- :warning: changed property `previousValue` of type `ChangeLocalizedEnumValueOrderChange` from type `LocalizedEnumValue[]` to `AttributeLocalizedEnumValue[]` +- :warning: changed property `nextValue` of type `ChangeLocalizedEnumValueOrderChange` from type `LocalizedEnumValue[]` to `AttributeLocalizedEnumValue[]` +- :warning: changed property `previousValue` of type `ChangePlainEnumValueOrderChange` from type `EnumValue[]` to `AttributePlainEnumValue[]` +- :warning: changed property `nextValue` of type `ChangePlainEnumValueOrderChange` from type `EnumValue[]` to `AttributePlainEnumValue[]` +- :warning: changed property `type` of type `CustomFields` from type `Reference` to `TypeReference` +- :warning: changed property `fields` of type `CustomFields` from type `object` to `FieldContainer` +- :warning: changed property `money` of type `CustomLineItem` from type `Money` to `TypedMoney` +- :warning: changed property `totalPrice` of type `CustomLineItem` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `quantity` of type `CustomLineItem` from type `integer` to `number` +- :warning: changed property `createdAt` of type `Delivery` from type `string` to `datetime` +- :warning: changed property `quantity` of type `DeliveryItem` from type `integer` to `number` +- :warning: changed property `discountCode` of type `DiscountCodeInfo` from type `Reference` to `DiscountCodeReference` +- :warning: changed property `discountedAmount` of type `DiscountedLineItemPortion` from type `Money` to `TypedMoney` +- :warning: changed property `value` of type `DiscountedLineItemPrice` from type `Money` to `TypedMoney` +- :warning: changed property `quantity` of type `DiscountedLineItemPriceForQuantity` from type `integer` to `number` +- :warning: changed property `inputHint` of type `FieldDefinition` from type `TextInputHint` to `TypeTextInputHint` +- :warning: changed property `w` of type `ImageDimensions` from type `integer` to `number` +- :warning: changed property `h` of type `ImageDimensions` from type `integer` to `number` +- :warning: changed property `customer` of type `InheritedAssociate` from type `Reference` to `CustomerReference` +- :warning: changed property `associateRole` of type `InheritedAssociateRoleAssignment` from type `KeyReference` to `AssociateRoleKeyReference` +- :warning: changed property `source` of type `InheritedAssociateRoleAssignment` from type `KeyReference` to `BusinessUnitKeyReference` +- :warning: changed property `quantity` of type `ItemShippingTarget` from type `integer` to `number` +- :warning: changed property `quantity` of type `ItemState` from type `integer` to `number` +- :warning: changed property `state` of type `ItemState` from type `Reference` to `StateReference` +- :warning: changed property `productType` of type `LineItem` from type `Reference` to `ProductTypeReference` +- :warning: changed property `variant` of type `LineItem` from type `Variant` to `ProductVariant` +- :warning: changed property `quantity` of type `LineItem` from type `integer` to `number` +- :warning: changed property `addedAt` of type `LineItem` from type `string` to `datetime` +- :warning: changed property `centAmount` of type `Money` from type `integer` to `number` +- :warning: changed property `createdAt` of type `Parcel` from type `string` to `datetime` +- :warning: changed property `heightInMillimeter` of type `ParcelMeasurements` from type `integer` to `number` +- :warning: changed property `lengthInMillimeter` of type `ParcelMeasurements` from type `integer` to `number` +- :warning: changed property `widthInMillimeter` of type `ParcelMeasurements` from type `integer` to `number` +- :warning: changed property `weightInGram` of type `ParcelMeasurements` from type `integer` to `number` +- :warning: changed property `payments` of type `PaymentInfo` from type `Reference[]` to `PaymentReference[]` +- :warning: changed property `value` of type `Price` from type `Money` to `TypedMoney` +- :warning: changed property `productSelection` of type `ProductSelectionSetting` from type `Reference` to `ProductSelectionReference` +- :warning: changed property `restockableInDays` of type `ProductVariantAvailability` from type `integer` to `number` +- :warning: changed property `availableQuantity` of type `ProductVariantAvailability` from type `integer` to `number` +- :warning: changed property `restockableInDays` of type `ProductVariantChannelAvailability` from type `integer` to `number` +- :warning: changed property `availableQuantity` of type `ProductVariantChannelAvailability` from type `integer` to `number` +- :warning: changed property `previousValue` of type `RemoveDeliveryItemsChange` from type `Delivery` to `DeliveryChangeValue` +- :warning: changed property `previousValue` of type `RemoveEnumValuesChange` from type `EnumValue` to `AttributePlainEnumValue` +- :warning: changed property `previousValue` of type `RemoveLocalizedEnumValuesChange` from type `LocalizedEnumValue` to `AttributeLocalizedEnumValue` +- :warning: changed property `previousValue` of type `RemoveShoppingListLineItemChange` from type `LineItem` to `ShoppingListLineItem` +- :warning: changed property `nextValue` of type `RemoveShoppingListLineItemChange` from type `LineItem` to `ShoppingListLineItem` +- :warning: changed property `returnDate` of type `ReturnInfo` from type `string` to `datetime` +- :warning: changed property `quantity` of type `ReturnItem` from type `integer` to `number` +- :warning: changed property `lastModifiedAt` of type `ReturnItem` from type `string` to `datetime` +- :warning: changed property `createdAt` of type `ReturnItem` from type `string` to `datetime` +- :warning: changed property `averageRating` of type `ReviewRatingStatistics` from type `integer` to `number` +- :warning: changed property `highestRating` of type `ReviewRatingStatistics` from type `integer` to `number` +- :warning: changed property `lowestRating` of type `ReviewRatingStatistics` from type `integer` to `number` +- :warning: changed property `previousValue` of type `SetAttributeChange` from type `AttributeValue` to `Attribute` +- :warning: changed property `nextValue` of type `SetAttributeChange` from type `AttributeValue` to `Attribute` +- :warning: changed property `previousValue` of type `SetCustomLineItemTaxedPriceChange` from type `Money` to `TaxedItemPrice` +- :warning: changed property `nextValue` of type `SetCustomLineItemTaxedPriceChange` from type `Money` to `TaxedItemPrice` +- :warning: changed property `previousValue` of type `SetDiscountedPriceChange` from type `Price` to `DiscountedPrice` +- :warning: changed property `nextValue` of type `SetDiscountedPriceChange` from type `Price` to `DiscountedPrice` +- :warning: changed property `previousValue` of type `SetOrderTaxedPriceChange` from type `TaxedItemPrice` to `TaxedPrice` +- :warning: changed property `nextValue` of type `SetOrderTaxedPriceChange` from type `TaxedItemPrice` to `TaxedPrice` +- :warning: changed property `previousValue` of type `SetShippingInfoTaxedPriceChange` from type `TaxedPrice` to `TaxedItemPrice` +- :warning: changed property `nextValue` of type `SetShippingInfoTaxedPriceChange` from type `TaxedPrice` to `TaxedItemPrice` +- :warning: changed property `previousValue` of type `SetShippingRateChange` from type `Money` to `ShippingRate` +- :warning: changed property `nextValue` of type `SetShippingRateChange` from type `Money` to `ShippingRate` +- :warning: changed property `previousValue` of type `SetStoreChange` from type `Reference` to `KeyReference` +- :warning: changed property `nextValue` of type `SetStoreChange` from type `Reference` to `KeyReference` +- :warning: changed property `price` of type `ShippingRate` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `freeAbove` of type `ShippingRate` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `amount` of type `SubRate` from type `integer` to `number` +- :warning: changed property `channel` of type `SyncInfo` from type `Reference` to `ChannelReference` +- :warning: changed property `syncedAt` of type `SyncInfo` from type `string` to `datetime` +- :warning: changed property `amount` of type `TaxRate` from type `integer` to `number` +- :warning: changed property `totalNet` of type `TaxedItemPrice` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `totalGross` of type `TaxedItemPrice` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `totalNet` of type `TaxedPrice` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `totalGross` of type `TaxedPrice` from type `Money` to `CentPrecisionMoney` +- :warning: changed property `addedAt` of type `TextLineItem` from type `string` to `datetime` +- :warning: changed property `quantity` of type `TextLineItem` from type `integer` to `number` +- :warning: changed property `timestamp` of type `Transaction` from type `string` to `datetime` +- :warning: changed property `amount` of type `Transaction` from type `Money` to `CentPrecisionMoney` +
+ + +
+Removed Property(s) + +- :warning: removed property `/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/` from type `CategoryOrderHints` +- :warning: removed property `variantId` from type `LineItem` +- :warning: removed property `fractionDigits` from type `Money` +- :warning: removed property `type` from type `Money` +- :warning: removed property `//` from type `ProductVariantChannelAvailabilityMap` +- :warning: removed property `skus` from type `ProductVariantSelection` +
+ + +
+Added Property(s) + +- added property `catalogData` to type `AddAssetChange` +- added property `variant` to type `AddAssetChange` +- added property `attributeName` to type `AddEnumValueChange` +- added property `variant` to type `AddExternalImageChange` +- added property `variant` to type `AddPriceChange` +- added property `catalogData` to type `AddToCategoryChange` +- added property `custom` to type `Address` +- added property `sources` to type `Asset` +- added property `tags` to type `Asset` +- added property `roles` to type `Associate` +- added property `level` to type `AttributeDefinition` +- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `CategoryOrderHints` +- added property `catalogData` to type `ChangeAssetNameChange` +- added property `variant` to type `ChangeAssetNameChange` +- added property `catalogData` to type `ChangeAssetOrderChange` +- added property `variant` to type `ChangeAssetOrderChange` +- added property `addedItems` to type `ChangeCartDiscountsChange` +- added property `removedItems` to type `ChangeCartDiscountsChange` +- added property `attributeName` to type `ChangeEnumValueLabelChange` +- added property `attributeName` to type `ChangeEnumValueOrderChange` +- added property `addedItems` to type `ChangeGroupsChange` +- added property `removedItems` to type `ChangeGroupsChange` +- added property `variant` to type `ChangePriceChange` +- added property `catalogData` to type `ChangeSlugChange` +- added property `key` to type `CustomLineItem` +- added property `taxedPricePortions` to type `CustomLineItem` +- added property `state` to type `CustomLineItem` +- added property `taxCategory` to type `CustomLineItem` +- added property `taxRate` to type `CustomLineItem` +- added property `perMethodTaxRate` to type `CustomLineItem` +- added property `discountedPricePerQuantity` to type `CustomLineItem` +- added property `custom` to type `CustomLineItem` +- added property `shippingDetails` to type `CustomLineItem` +- added property `priceMode` to type `CustomLineItem` +- added property `recurrenceInfo` to type `CustomLineItem` +- added property `key` to type `Delivery` +- added property `required` to type `FieldDefinition` +- added property `shippingMethodKey` to type `ItemShippingTarget` +- added property `key` to type `LineItem` +- added property `productKey` to type `LineItem` +- added property `price` to type `LineItem` +- added property `totalPrice` to type `LineItem` +- added property `discountedPricePerQuantity` to type `LineItem` +- added property `taxedPrice` to type `LineItem` +- added property `taxedPricePortions` to type `LineItem` +- added property `state` to type `LineItem` +- added property `taxRate` to type `LineItem` +- added property `perMethodTaxRate` to type `LineItem` +- added property `supplyChannel` to type `LineItem` +- added property `distributionChannel` to type `LineItem` +- added property `priceMode` to type `LineItem` +- added property `lineItemMode` to type `LineItem` +- added property `inventoryMode` to type `LineItem` +- added property `shippingDetails` to type `LineItem` +- added property `lastModifiedAt` to type `LineItem` +- added property `recurrenceInfo` to type `LineItem` +- added property `variant` to type `MoveImageToPositionChange` +- added property `key` to type `Parcel` +- added property `custom` to type `Parcel` +- added property `key` to type `Price` +- added property `country` to type `Price` +- added property `customerGroup` to type `Price` +- added property `channel` to type `Price` +- added property `validFrom` to type `Price` +- added property `validUntil` to type `Price` +- added property `discounted` to type `Price` +- added property `tiers` to type `Price` +- added property `custom` to type `Price` +- added property `recurrencePolicy` to type `Price` +- added property `id` to type `ProductVariantAvailability` +- added property `version` to type `ProductVariantAvailability` +- added property `id` to type `ProductVariantChannelAvailability` +- added property `version` to type `ProductVariantChannelAvailability` +- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap` +- added property `catalogData` to type `RemoveAssetChange` +- added property `variant` to type `RemoveAssetChange` +- added property `catalogData` to type `RemoveFromCategoryChange` +- added property `variant` to type `RemoveImageChange` +- added property `variant` to type `RemovePriceChange` +- added property `key` to type `ReturnItem` +- added property `custom` to type `ReturnItem` +- added property `catalogData` to type `SetAssetCustomFieldChange` +- added property `variant` to type `SetAssetCustomFieldChange` +- added property `catalogData` to type `SetAssetCustomTypeChange` +- added property `variant` to type `SetAssetCustomTypeChange` +- added property `catalogData` to type `SetAssetDescriptionChange` +- added property `variant` to type `SetAssetDescriptionChange` +- added property `catalogData` to type `SetAssetKeyChange` +- added property `variant` to type `SetAssetKeyChange` +- added property `catalogData` to type `SetAssetSourcesChange` +- added property `variant` to type `SetAssetSourcesChange` +- added property `catalogData` to type `SetAssetTagsChange` +- added property `variant` to type `SetAssetTagsChange` +- added property `variant` to type `SetAttributeChange` +- added property `addedItems` to type `SetChannelRolesChange` +- added property `removedItems` to type `SetChannelRolesChange` +- added property `addedItems` to type `SetCountriesChange` +- added property `removedItems` to type `SetCountriesChange` +- added property `customTypeId` to type `SetCustomLineItemCustomFieldChange` +- added property `customLineItem` to type `SetCustomLineItemShippingDetailsChange` +- added property `price` to type `SetDiscountedPriceChange` +- added property `addedItems` to type `SetDistributionChannelsChange` +- added property `removedItems` to type `SetDistributionChannelsChange` +- added property `variant` to type `SetImageLabelChange` +- added property `addedItems` to type `SetLanguagesChange` +- added property `removedItems` to type `SetLanguagesChange` +- added property `lineItemId` to type `SetLineItemDiscountedPriceChange` +- added property `lineItemId` to type `SetLineItemDiscountedPricePerQuantityChange` +- added property `lineItemId` to type `SetLineItemPriceChange` +- added property `lineItemId` to type `SetLineItemProductSlugChange` +- added property `lineItem` to type `SetLineItemShippingDetailsChange` +- added property `variant` to type `SetLineItemShippingDetailsChange` +- added property `lineItemId` to type `SetLineItemTaxAmountChange` +- added property `lineItemId` to type `SetLineItemTaxRateChange` +- added property `variant` to type `SetLineItemTaxedPriceChange` +- added property `lineItemId` to type `SetLineItemTotalPriceChange` +- added property `variant` to type `SetLineItemTotalPriceChange` +- added property `catalogData` to type `SetMetaDescriptionChange` +- added property `catalogData` to type `SetMetaKeywordsChange` +- added property `catalogData` to type `SetMetaTitleChange` +- added property `lineItemId` to type `SetOrderLineItemCustomFieldChange` +- added property `lineItemId` to type `SetOrderLineItemCustomTypeChange` +- added property `addedItems` to type `SetPermissionsChange` +- added property `removedItems` to type `SetPermissionsChange` +- added property `addedItems` to type `SetPricesChange` +- added property `removedItems` to type `SetPricesChange` +- added property `variant` to type `SetProductPriceCustomFieldChange` +- added property `priceId` to type `SetProductPriceCustomFieldChange` +- added property `customTypeId` to type `SetProductPriceCustomFieldChange` +- added property `name` to type `SetProductPriceCustomFieldChange` +- added property `variant` to type `SetProductPriceCustomTypeChange` +- added property `priceId` to type `SetProductPriceCustomTypeChange` +- added property `addedItems` to type `SetProductSelectionsChange` +- added property `removedItems` to type `SetProductSelectionsChange` +- added property `variant` to type `SetProductVariantKeyChange` +- added property `addedItems` to type `SetReservationsChange` +- added property `removedItems` to type `SetReservationsChange` +- added property `variant` to type `SetSkuChange` +- added property `addedItems` to type `SetStateRolesChange` +- added property `removedItems` to type `SetStateRolesChange` +- added property `addedItems` to type `SetStoresChange` +- added property `removedItems` to type `SetStoresChange` +- added property `addedItems` to type `SetSupplyChannelsChange` +- added property `removedItems` to type `SetSupplyChannelsChange` +- added property `addedItems` to type `SetTransitionsChange` +- added property `removedItems` to type `SetTransitionsChange` +- added property `key` to type `TaxRate` +- added property `taxPortions` to type `TaxedItemPrice` +- added property `totalTax` to type `TaxedItemPrice` +- added property `taxPortions` to type `TaxedPrice` +- added property `totalTax` to type `TaxedPrice` +- added property `key` to type `TextLineItem` +- added property `custom` to type `Transaction` +- added property `customLineItemId` to type `TransitionCustomLineItemStateChange` +
+ +**Checkout changes** + +
+Added Type(s) + +- added type `AllowedOrigins` +- added type `Application` +- added type `ApplicationAgreement` +- added type `ApplicationAgreementDraft` +- added type `ApplicationAgreementStatus` +- added type `ApplicationAgreementType` +- added type `ApplicationDraft` +- added type `ApplicationLogo` +- added type `ApplicationMode` +- added type `ApplicationStatus` +- added type `ApplicationUpdateAction` +- added type `ApplicationUpdateActions` +- added type `DiscountsConfiguration` +- added type `PaginatedApplication` +- added type `PaymentsConfiguration` +- added type `AddAllowedOriginUpdateAction` +- added type `AddApplicationAgreementUpdateAction` +- added type `AddCountryUpdateAction` +- added type `RemoveAllowedOriginUpdateAction` +- added type `RemoveApplicationAgreementUpdateAction` +- added type `RemoveCountryUpdateAction` +- added type `ReorderApplicationAgreementUpdateAction` +- added type `SetActivePaymentComponentTypeUpdateAction` +- added type `SetAllowAllOriginsUpdateAction` +- added type `SetAllowedOriginsUpdateAction` +- added type `SetApplicationAgreementNameUpdateAction` +- added type `SetApplicationAgreementStatusUpdateAction` +- added type `SetApplicationAgreementTextUpdateAction` +- added type `SetApplicationAgreementTypeUpdateAction` +- added type `SetApplicationAgreementsUpdateAction` +- added type `SetApplicationLogoUpdateAction` +- added type `SetApplicationNameUpdateAction` +- added type `SetApplicationStatusUpdateAction` +- added type `SetCountriesUpdateAction` +- added type `SetDescriptionUpdateAction` +- added type `SetDiscountsConfigurationUpdateAction` +- added type `SetPaymentReturnUrlUpdateAction` +- added type `SetPaymentsConfigurationUpdateAction` +- added type `CreatedBy` +- added type `LastModifiedBy` +- added type `LocalizedString` +- added type `LocalizedUrl` +- added type `ConcurrentModificationError` +- added type `DuplicateFieldWithConflictingResourceError` +- added type `ErrorResponse` +- added type `InvalidFieldError` +- added type `InvalidOperationError` +- added type `MaxResourceLimitExceededError` +- added type `MissingProjectKeyError` +- added type `ReferencedResourceNotFoundError` +- added type `ServiceUnavailableError` +- added type `SyntaxErrorError` +- added type `AutomatedReversalConfiguration` +- added type `ConnectorDeploymentReference` +- added type `DisplayInfo` +- added type `PaginatedPaymentIntegration` +- added type `PaymentComponentType` +- added type `PaymentIntegration` +- added type `PaymentIntegrationDraft` +- added type `PaymentIntegrationStatus` +- added type `PaymentIntegrationType` +- added type `SortingInfo` +- added type `PaymentIntegrationUpdateAction` +- added type `PaymentIntegrationUpdateActions` +- added type `SetAutomatedReversalConfigurationPredicateUpdateAction` +- added type `SetAutomatedReversalConfigurationStatusUpdateAction` +- added type `SetAutomatedReversalConfigurationUpdateAction` +- added type `SetConnectorDeploymentUpdateAction` +- added type `SetDisplayInfoDescriptionUpdateAction` +- added type `SetDisplayInfoLabelUpdateAction` +- added type `SetDisplayInfoLogoUrlUpdateAction` +- added type `SetDisplayInfoPayButtonTextUpdateAction` +- added type `SetDisplayInfoUpdateAction` +- added type `SetKeyUpdateAction` +- added type `SetNameUpdateAction` +- added type `SetPredicateUpdateAction` +- added type `SetSortingInfoUpdateAction` +- added type `SetStatusUpdateAction` +- added type `SetTypeUpdateAction` +
+ + +
+Added Enum(s) + +- added enum `deployment` to type `ReferenceTypeId` +
+ + +
+Required Property(s) + +- changed property `detailedErrorMessage` of type `InvalidJsonInputError` to be optional +
+ + +
+Changed Property(s) + +- :warning: changed property `application` of type `Transaction` from type `ApplicationResourceIdentifier` to `ApplicationReference` +
+ + +
+Added Property(s) + +- added property `resourceIdentifier` to type `ResourceNotFoundError` +- added property `resourceId` to type `ResourceNotFoundError` +
+ + +
+Changed MethodResponseBody(s) + +- :warning: changed response body for `400: application/json` of method `post /{projectKey}/transactions` from type `null` to `ErrorResponse` +- :warning: changed response body for `400: application/json` of method `post /{projectKey}/payment-intents/{paymentId}` from type `null` to `ErrorResponse` +- :warning: changed response body for `400: application/json` of method `get /{projectKey}/transactions/{id}` from type `null` to `ErrorResponse` +- :warning: changed response body for `400: application/json` of method `get /{projectKey}/transactions/key={key}` from type `null` to `ErrorResponse` +
+ + +
+Added Method(s) + +- added method `apiRoot.withProjectKey().paymentIntegrations().get()` +- added method `apiRoot.withProjectKey().paymentIntegrations().post()` +- added method `apiRoot.withProjectKey().applications().get()` +- added method `apiRoot.withProjectKey().applications().post()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withId().get()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withId().head()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withId().post()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withId().delete()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withKey().get()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withKey().post()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withKey().head()` +- added method `apiRoot.withProjectKey().paymentIntegrations().withKey().delete()` +- added method `apiRoot.withProjectKey().applications().withId().get()` +- added method `apiRoot.withProjectKey().applications().withId().head()` +- added method `apiRoot.withProjectKey().applications().withId().post()` +- added method `apiRoot.withProjectKey().applications().withId().delete()` +- added method `apiRoot.withProjectKey().applications().withKey().get()` +- added method `apiRoot.withProjectKey().applications().withKey().post()` +- added method `apiRoot.withProjectKey().applications().withKey().head()` +- added method `apiRoot.withProjectKey().applications().withKey().delete()` +
+ + +
+Added Resource(s) + +- added resource `/{projectKey}/payment-integrations` +- added resource `/{projectKey}/applications` +- added resource `/{projectKey}/payment-integrations/{id}` +- added resource `/{projectKey}/payment-integrations/key={key}` +- added resource `/{projectKey}/applications/{id}` +- added resource `/{projectKey}/applications/key={key}`
diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls index 1c3327bc96d..0a0c94b7e4d 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -2048,6 +2048,10 @@ input CartDraft { origin: CartOrigin = Customer } +type CartFrozen implements MessagePayload { + type: String! +} + type CartLimitWithCurrent implements LimitWithCurrent { limit: Long current: Long! @@ -2057,6 +2061,22 @@ type CartLimitsProjection { total: CartLimitWithCurrent! } +enum CartMergeMode { + """ + `LineItem`s of the anonymous cart will be copied to the customer’s active cart that has been modified most recently. + + The `CartState` of the anonymous cart gets changed to `Merged` while the `CartState` of the customer’s cart remains `Active`. + + `CustomLineItems` and `CustomFields` of the anonymous cart will not be copied to the customers cart. + + If a `LineItem` in the anonymous cart matches an existing line item in the customer’s cart (same product ID and variant ID), the maximum quantity of both LineItems is used as the new quantity. In that case `CustomFields` on the `LineItem` of the anonymous cart will not be in the resulting `LineItem`. + """ + MergeWithExistingCustomerCart + + "The anonymous cart is used as new active customer cart. No `LineItem`s get merged." + UseAsNewActiveCustomerCart +} + enum CartOrigin { "The cart was created by the customer. This is the default value" Customer @@ -2107,6 +2127,10 @@ enum CartState { Ordered } +type CartUnfrozen implements MessagePayload { + type: String! +} + input CartUpdateAction { addCustomShippingMethod: AddCartCustomShippingMethod addDiscountCode: AddCartDiscountCode @@ -4612,6 +4636,17 @@ input EnumValueInput { label: String! } +type RecurringOrderFailureError { + "Error identifier" + code: String! + + "Plain text description of the cause of the error." + message: String! + + "Information about the cause of the error." + details: Json! +} + type EventBridgeDestination implements Destination { source: String! region: String! @@ -5306,6 +5341,7 @@ type InventoryEntryQuantitySet implements MessagePayload { newQuantityOnStock: Long! oldAvailableQuantity: Long! newAvailableQuantity: Long! + sku: String supplyChannel: Channel supplyChannelRef: Reference type: String! @@ -5825,6 +5861,13 @@ interface MeQueryInterface implements CartQueryInterface & ActiveCartInterface & shoppingLists(where: String, sort: [String!], limit: Int, offset: Int): ShoppingListQueryResult! } +input MergeCartDraft { + anonymousCart: ResourceIdentifierInput + mergeMode: CartMergeMode = MergeWithExistingCustomerCart + anonymousId: String + updateProductData: Boolean = false +} + type Message implements Versioned & ReferenceExpandable { id: String! type: String! @@ -6442,6 +6485,11 @@ type Mutation { "Create/modify entity as an associate in business-unit." asAssociate: AsAssociateArgument): Cart + mergeCart(customerId: String!, draft: MergeCartDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): Cart + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" createMyCart(draft: MyCartDraft!, @@ -10452,10 +10500,10 @@ type Query { apiClient(id: String!): APIClientWithoutSecret apiClients(where: String, sort: [String!], limit: Int, offset: Int): APIClientWithoutSecretQueryResult! limits: ProjectCustomLimitsProjection! - productProjectionSearch(projectExpandedProducts: Boolean = false, locale: Locale, text: String, facets: [SearchFacetInput!] = [], filters: [SearchFilterInput!] = [], queryFilters: [SearchFilterInput!] = [], facetFilters: [SearchFilterInput!] = [], sorts: [String!] = [], limit: Int = 10, offset: Int = 0, fuzzy: Boolean = false, fuzzyLevel: Int, priceSelector: PriceSelectorInput, markMatchingVariants: Boolean = false, + productProjectionSearch(projectExpandedProducts: Boolean = false, locale: Locale, text: String, facets: [SearchFacetInput!] = [], filters: [SearchFilterInput!] = [], queryFilters: [SearchFilterInput!] = [], facetFilters: [SearchFilterInput!] = [], sorts: [String!] = [], limit: Int = 10, offset: Int = 0, fuzzy: Boolean = false, fuzzyLevel: Int, priceSelector: PriceSelectorInput, markMatchingVariants: Boolean, "Deprecated: please use 'markMatchingVariants'." - markMatchingVariant: Boolean = false, storeProjection: String, localeProjection: [Locale!], staged: Boolean = false): ProductProjectionSearchResult! + markMatchingVariant: Boolean, storeProjection: String, localeProjection: [Locale!], staged: Boolean = false): ProductProjectionSearchResult! """ StandalonePrices are managed and queried through the StandalonePrices API @@ -11016,6 +11064,15 @@ type RecurringOrderCustomFieldChanged implements MessagePayload { type: String! } +type RecurringOrderFailed implements MessagePayload { + cartId: String! + failedAt: DateTime! + failureReason: String! + orderScheduledAt: DateTime! + errors: [RecurringOrderFailureError!] + type: String! +} + type RecurringOrderCustomFieldRemoved implements MessagePayload { name: String! type: String! diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java new file mode 100644 index 00000000000..2f3680097f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePost.java @@ -0,0 +1,142 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. For more information, see Merge behavior.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .carts()
+ *            .customerIdWithCustomerIdValueMerge("{customerId}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCartsCustomerIdByCustomerIdMergePost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String customerId; + + private com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft; + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePost(final ApiHttpClient apiHttpClient, String projectKey, + String customerId, com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.customerId = customerId; + this.mergeCartDraft = mergeCartDraft; + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePost(ByProjectKeyCartsCustomerIdByCustomerIdMergePost t) { + super(t); + this.projectKey = t.projectKey; + this.customerId = t.customerId; + this.mergeCartDraft = t.mergeCartDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/carts/customer-id=%s/merge", encodePathParam(this.projectKey), + encodePathParam(this.customerId)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(mergeCartDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.cart.Cart.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.cart.Cart.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getCustomerId() { + return this.customerId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setCustomerId(final String customerId) { + this.customerId = customerId; + } + + public com.commercetools.api.models.cart.MergeCartDraft getBody() { + return mergeCartDraft; + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePost withBody( + com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + ByProjectKeyCartsCustomerIdByCustomerIdMergePost t = copy(); + t.mergeCartDraft = mergeCartDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCartsCustomerIdByCustomerIdMergePost that = (ByProjectKeyCartsCustomerIdByCustomerIdMergePost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(customerId, that.customerId) + .append(mergeCartDraft, that.mergeCartDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(customerId).append(mergeCartDraft).toHashCode(); + } + + @Override + protected ByProjectKeyCartsCustomerIdByCustomerIdMergePost copy() { + return new ByProjectKeyCartsCustomerIdByCustomerIdMergePost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java new file mode 100644 index 00000000000..21e88c72c4b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergePostString.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. For more information, see Merge behavior.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .carts()
+ *            .customerIdWithCustomerIdValueMerge("{customerId}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCartsCustomerIdByCustomerIdMergePostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String customerId; + + private String mergeCartDraft; + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePostString(final ApiHttpClient apiHttpClient, String projectKey, + String customerId, String mergeCartDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.customerId = customerId; + this.mergeCartDraft = mergeCartDraft; + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePostString( + ByProjectKeyCartsCustomerIdByCustomerIdMergePostString t) { + super(t); + this.projectKey = t.projectKey; + this.customerId = t.customerId; + this.mergeCartDraft = t.mergeCartDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/carts/customer-id=%s/merge", this.projectKey, this.customerId); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + mergeCartDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.cart.Cart.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.cart.Cart.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getCustomerId() { + return this.customerId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setCustomerId(final String customerId) { + this.customerId = customerId; + } + + public String getBody() { + return mergeCartDraft; + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePostString withBody(String mergeCartDraft) { + ByProjectKeyCartsCustomerIdByCustomerIdMergePostString t = copy(); + t.mergeCartDraft = mergeCartDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCartsCustomerIdByCustomerIdMergePostString that = (ByProjectKeyCartsCustomerIdByCustomerIdMergePostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(customerId, that.customerId) + .append(mergeCartDraft, that.mergeCartDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(customerId).append(mergeCartDraft).toHashCode(); + } + + @Override + protected ByProjectKeyCartsCustomerIdByCustomerIdMergePostString copy() { + return new ByProjectKeyCartsCustomerIdByCustomerIdMergePostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java new file mode 100644 index 00000000000..0033d1c5535 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java @@ -0,0 +1,39 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String customerId; + + public ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String customerId) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.customerId = customerId; + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePost post( + com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + return new ByProjectKeyCartsCustomerIdByCustomerIdMergePost(apiHttpClient, projectKey, customerId, + mergeCartDraft); + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePostString post(final String mergeCartDraft) { + return new ByProjectKeyCartsCustomerIdByCustomerIdMergePostString(apiHttpClient, projectKey, customerId, + mergeCartDraft); + } + + public ByProjectKeyCartsCustomerIdByCustomerIdMergePost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.MergeCartDraftBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsRequestBuilder.java index 17ae20d8da4..57378d29177 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCartsRequestBuilder.java @@ -45,6 +45,11 @@ public ByProjectKeyCartsCustomerIdByCustomerIdRequestBuilder withCustomerId(Stri return new ByProjectKeyCartsCustomerIdByCustomerIdRequestBuilder(apiHttpClient, projectKey, customerId); } + public ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder customerIdWithCustomerIdValueMerge( + String customerId) { + return new ByProjectKeyCartsCustomerIdByCustomerIdMergeRequestBuilder(apiHttpClient, projectKey, customerId); + } + public ByProjectKeyCartsKeyByKeyRequestBuilder withKey(String key) { return new ByProjectKeyCartsKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPost.java index 2b70b9b1b0e..5217f3d26b9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPost.java @@ -20,6 +20,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** + *

Allows converting an anonymous Cart to the active Cart of a Customer with cart merge.

*

Creating a Customer produces the CustomerCreated Message. Simultaneously creating two Customers with the same email address can return a LockedField error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPostString.java index 96bc6e435fa..738747e78e1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersPostString.java @@ -21,6 +21,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** + *

Allows converting an anonymous Cart to the active Cart of a Customer with cart merge.

*

Creating a Customer produces the CustomerCreated Message. Simultaneously creating two Customers with the same email address can return a LockedField error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java new file mode 100644 index 00000000000..7890c9a0f42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost.java @@ -0,0 +1,164 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart.

+ *

If the Cart exists in the Project but does not have a store specified, or the store field references a different Store, a ResourceNotFound error is returned.

+ *

For more information, see Merge behavior.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .carts()
+ *            .customerIdWithCustomerIdValueMerge("{customerId}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost extends + TypeBodyApiMethod + implements + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String customerId; + + private com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft; + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String customerId, + com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.customerId = customerId; + this.mergeCartDraft = mergeCartDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost( + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.customerId = t.customerId; + this.mergeCartDraft = t.mergeCartDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/carts/customer-id=%s/merge", + encodePathParam(this.projectKey), encodePathParam(this.storeKey), encodePathParam(this.customerId)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(mergeCartDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.cart.Cart.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.cart.Cart.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getCustomerId() { + return this.customerId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setCustomerId(final String customerId) { + this.customerId = customerId; + } + + public com.commercetools.api.models.cart.MergeCartDraft getBody() { + return mergeCartDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost withBody( + com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost t = copy(); + t.mergeCartDraft = mergeCartDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost that = (ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(customerId, that.customerId) + .append(mergeCartDraft, that.mergeCartDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(customerId) + .append(mergeCartDraft) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java new file mode 100644 index 00000000000..cf28b84295a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Merges items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart.

+ *

If the Cart exists in the Project but does not have a store specified, or the store field references a different Store, a ResourceNotFound error is returned.

+ *

For more information, see Merge behavior.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .carts()
+ *            .customerIdWithCustomerIdValueMerge("{customerId}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString extends + StringBodyApiMethod + implements + com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String customerId; + + private String mergeCartDraft; + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString(final ApiHttpClient apiHttpClient, + String projectKey, String storeKey, String customerId, String mergeCartDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.customerId = customerId; + this.mergeCartDraft = mergeCartDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString( + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.customerId = t.customerId; + this.mergeCartDraft = t.mergeCartDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/carts/customer-id=%s/merge", this.projectKey, + this.storeKey, this.customerId); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + mergeCartDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.cart.Cart.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.cart.Cart.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getCustomerId() { + return this.customerId; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setCustomerId(final String customerId) { + this.customerId = customerId; + } + + public String getBody() { + return mergeCartDraft; + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString withBody(String mergeCartDraft) { + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString t = copy(); + t.mergeCartDraft = mergeCartDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString that = (ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(customerId, that.customerId) + .append(mergeCartDraft, that.mergeCartDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(customerId) + .append(mergeCartDraft) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java new file mode 100644 index 00000000000..dfbbd31f1b6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String customerId; + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder( + final ApiHttpClient apiHttpClient, final String projectKey, final String storeKey, + final String customerId) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + this.customerId = customerId; + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost post( + com.commercetools.api.models.cart.MergeCartDraft mergeCartDraft) { + return new ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost(apiHttpClient, projectKey, + storeKey, customerId, mergeCartDraft); + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString post( + final String mergeCartDraft) { + return new ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePostString(apiHttpClient, projectKey, + storeKey, customerId, mergeCartDraft); + } + + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergePost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.cart.MergeCartDraftBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder.java index f534fb94aff..8635799915a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCartsRequestBuilder.java @@ -47,6 +47,12 @@ public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdRequestBuilder storeKey, customerId); } + public ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder customerIdWithCustomerIdValueMerge( + String customerId) { + return new ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeRequestBuilder(apiHttpClient, + projectKey, storeKey, customerId); + } + public ByProjectKeyInStoreKeyByStoreKeyCartsKeyByKeyRequestBuilder withKey(String key) { return new ByProjectKeyInStoreKeyByStoreKeyCartsKeyByKeyRequestBuilder(apiHttpClient, projectKey, storeKey, key); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPost.java index 9a7838ab464..2886aa018b1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPost.java @@ -22,7 +22,7 @@ /** *

When using this endpoint, if omitted, the Customer stores field is set to the Store specified in the path parameter.

*

If a Cart with a store field specified, the store field must reference the same Store specified in the {storeKey} path parameter.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows converting an anonymous Cart to the active Cart of a Customer with cart merge. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

Creating a Customer produces the CustomerCreated Message. Simultaneously creating two Customers with the same email address can return a LockedField error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPostString.java index 9b222ea4481..4d721cb9d94 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyCustomersPostString.java @@ -23,7 +23,7 @@ /** *

When using this endpoint, if omitted, the Customer stores field is set to the Store specified in the path parameter.

*

If a Cart with a store field specified, the store field must reference the same Store specified in the {storeKey} path parameter.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows converting an anonymous Cart to the active Cart of a Customer with cart merge. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

Creating a Customer produces the CustomerCreated Message. Simultaneously creating two Customers with the same email address can return a LockedField error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java index 1ade1088d0a..32019fd810d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPost.java @@ -17,7 +17,7 @@ /** *

Authenticates a Customer associated with a Store.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

If the Customer exists in the Project but the stores field references a different Store, this method returns an InvalidCredentials error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java index 1abf6667ec5..3b4947ab6c2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyLoginPostString.java @@ -18,7 +18,7 @@ /** *

Authenticates a Customer associated with a Store.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

If the Customer exists in the Project but the stores field references a different Store, this method returns an InvalidCredentials error.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java index 835bead9faa..e34e839db95 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPost.java @@ -17,7 +17,7 @@ /** *

Authenticates a global Customer.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

If an account with the given credentials is not found, an InvalidCredentials error is returned.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java index e2765ff1aad..91e9e010750 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyLoginPostString.java @@ -18,7 +18,7 @@ /** *

Authenticates a global Customer.

- *

If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

+ *

Allows merging items from an anonymous Cart into the most recently modified active Cart of a Customer. If no active Cart exists, the anonymous Cart becomes the Customer's active Cart. If the Customer has multiple active Carts, the anonymous Cart is merged into the most recently modified active Cart.

*

If an account with the given credentials is not found, an InvalidCredentials error is returned.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDeal.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDeal.java index 24f254d920a..2c816823237 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDeal.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDeal.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

Indicates the best deal logic applies to a Cart or Order and indicates the discount type that offers the best deal.

+ *

Indicates if a Product Discount or Cart Discount offers the best deal for a Cart or Order.

* *
* 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/BestDealImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDealImpl.java index 967b97cca13..431f74d95ad 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDealImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/BestDealImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

Indicates the best deal logic applies to a Cart or Order and indicates the discount type that offers the best deal.

+ *

Indicates if a Product Discount or Cart Discount offers the best deal for a Cart or Order.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class BestDealImpl implements BestDeal, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeAction.java index ef13f2481c1..a754dca5241 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeAction.java @@ -15,7 +15,8 @@ import jakarta.validation.constraints.NotNull; /** - *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

+ *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Cart, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Cart. For frozen Carts, the DiscountCodeState must be DoesNotMatchCart when adding a Discount Code.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

* diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeActionImpl.java index 232b7e2a68e..c0ae2b6bb19 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddDiscountCodeActionImpl.java @@ -17,7 +17,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

+ *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Cart, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Cart. For frozen Carts, the DiscountCodeState must be DoesNotMatchCart when adding a Discount Code.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

*/ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java index 75db4514edf..e14fe0715ac 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartAction.java @@ -14,6 +14,7 @@ /** *

Changes the CartState from Active to Frozen. Results in a Frozen Cart. Fails with InvalidOperation error when the Cart is empty.

+ *

Freezing a Cart produces the CartFrozen Message.

* *
* 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/CartFreezeCartActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java index be16e7ebb7c..29823be2c9d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartFreezeCartActionImpl.java @@ -17,6 +17,7 @@ /** *

Changes the CartState from Active to Frozen. Results in a Frozen Cart. Fails with InvalidOperation error when the Cart is empty.

+ *

Freezing a Cart produces the CartFrozen Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartFreezeCartActionImpl implements CartFreezeCartAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartMergeMode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartMergeMode.java new file mode 100644 index 00000000000..6b8b1ee96cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartMergeMode.java @@ -0,0 +1,115 @@ + +package com.commercetools.api.models.cart; + +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 how to manually merge an anonymous Cart with an existing Customer Cart.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface CartMergeMode extends JsonEnum { + + /** +

Merges the anonymous Cart with the existing Customer Cart. Line Items from the anonymous Cart are added to the Customer Cart.

*/ + CartMergeMode MERGE_WITH_EXISTING_CUSTOMER_CART = CartMergeModeEnum.MERGE_WITH_EXISTING_CUSTOMER_CART; + /** +

Uses the anonymous Cart as the new active Customer Cart, replacing the existing one.

*/ + CartMergeMode USE_AS_NEW_ACTIVE_CUSTOMER_CART = CartMergeModeEnum.USE_AS_NEW_ACTIVE_CUSTOMER_CART; + + /** + * possible values of CartMergeMode + */ + enum CartMergeModeEnum implements CartMergeMode { + /** + * MergeWithExistingCustomerCart + */ + MERGE_WITH_EXISTING_CUSTOMER_CART("MergeWithExistingCustomerCart"), + + /** + * UseAsNewActiveCustomerCart + */ + USE_AS_NEW_ACTIVE_CUSTOMER_CART("UseAsNewActiveCustomerCart"); + private final String jsonName; + + private CartMergeModeEnum(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 CartMergeMode + * 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 CartMergeMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new CartMergeMode() { + @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 CartMergeMode[] values() { + return CartMergeModeEnum.values(); + } + +} 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 de6e594061d..9f3d1873476 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 @@ -54,7 +54,7 @@ public interface CartRemoveLineItemAction extends CartUpdateAction { public String getLineItemKey(); /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, the LineItem is removed from the Cart.

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

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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 c9023b13b61..8dd2229ede4 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 } /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, the LineItem is removed from the Cart.

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

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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 637ae8eafb9..93ad0cfa771 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 @@ -86,7 +86,7 @@ public String getLineItemKey() { } /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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/CartSetLineItemTotalPriceAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceAction.java index 6d2dae90cd7..2ded74e6b8c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceAction.java @@ -15,7 +15,7 @@ import jakarta.validation.Valid; /** - *

Sets the LineItem totalPrice and price, and changes the priceMode to ExternalTotal LineItemPriceMode.

+ *

Sets the LineItem totalPrice and price, and changes the priceMode to ExternalTotal LineItemPriceMode. Cannot be used on Gift Line Items (see LineItemMode).

* *
* 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/CartSetLineItemTotalPriceActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceActionImpl.java index c69458ba615..7e02a1acf67 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetLineItemTotalPriceActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

Sets the LineItem totalPrice and price, and changes the priceMode to ExternalTotal LineItemPriceMode.

+ *

Sets the LineItem totalPrice and price, and changes the priceMode to ExternalTotal LineItemPriceMode. Cannot be used on Gift Line Items (see LineItemMode).

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartSetLineItemTotalPriceActionImpl implements CartSetLineItemTotalPriceAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartAction.java index 722b5af736c..90d48923956 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartAction.java @@ -14,6 +14,7 @@ /** *

Changes the CartState from Frozen to Active. Reactivates a Frozen Cart. This action updates all prices in the Cart according to latest Prices on related Product Variants and Shipping Methods and by applying all discounts currently being active and applicable for the Cart.

+ *

Unfreezing a Cart produces the CartUnfrozen Message.

* *
* 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/CartUnfreezeCartActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartActionImpl.java index 19d7cda001d..5620cf4267e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartUnfreezeCartActionImpl.java @@ -17,6 +17,7 @@ /** *

Changes the CartState from Frozen to Active. Reactivates a Frozen Cart. This action updates all prices in the Cart according to latest Prices on related Product Variants and Shipping Methods and by applying all discounts currently being active and applicable for the Cart.

+ *

Unfreezing a Cart produces the CartUnfrozen Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartUnfreezeCartActionImpl implements CartUnfreezeCartAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemMode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemMode.java index fd9072e8db3..827ac28563b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemMode.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemMode.java @@ -21,7 +21,8 @@ public interface LineItemMode extends JsonEnum { LineItemMode STANDARD = LineItemModeEnum.STANDARD; /**

One Line Item was added automatically to a Cart by a Cart Discount with CartDiscountValueGiftLineItemDraft.

-

The quantity cannot be increased, and it won't be merged when adding the same Line Item to the Cart. If the gift is removed, an entry is added to the refusedGifts array and the discount won't be applied to the Cart. The price cannot be changed externally.

+

The quantity cannot be increased, and it won't be merged when adding the same Line Item to the Cart. If the gift is removed, an entry is added to the refusedGifts array and the discount won't be applied to the Cart.

+

The totalPrice is always 0 and cannot be changed externally via the setLineItemTotalPrice action.

All other updates, such as the ones related to Custom Fields, can be used.

*/ LineItemMode GIFT_LINE_ITEM = LineItemModeEnum.GIFT_LINE_ITEM; diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraft.java new file mode 100644 index 00000000000..93a15d1775b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraft.java @@ -0,0 +1,181 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Used for merging an anonymous Cart with a Customer Cart with the Merge Cart and Merge Cart in Store endpoints. Either anonymousCart or anonymousId is required.

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

+ *     MergeCartDraft mergeCartDraft = MergeCartDraft.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MergeCartDraftImpl.class) +public interface MergeCartDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @return anonymousCart + */ + @Valid + @JsonProperty("anonymousCart") + public CartResourceIdentifier getAnonymousCart(); + + /** + *

Determines how to merge the anonymous Cart with the existing Customer Cart.

+ * @return mergeMode + */ + + @JsonProperty("mergeMode") + public CartMergeMode getMergeMode(); + + /** + *
    + *
  • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
  • + *
  • If false, only the prices, discounts, and tax rates will be updated.
  • + *
+ * @return updateProductData + */ + + @JsonProperty("updateProductData") + public Boolean getUpdateProductData(); + + /** + *

Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

+ * @return anonymousId + */ + + @JsonProperty("anonymousId") + public String getAnonymousId(); + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @param anonymousCart value to be set + */ + + public void setAnonymousCart(final CartResourceIdentifier anonymousCart); + + /** + *

Determines how to merge the anonymous Cart with the existing Customer Cart.

+ * @param mergeMode value to be set + */ + + public void setMergeMode(final CartMergeMode mergeMode); + + /** + *
    + *
  • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
  • + *
  • If false, only the prices, discounts, and tax rates will be updated.
  • + *
+ * @param updateProductData value to be set + */ + + public void setUpdateProductData(final Boolean updateProductData); + + /** + *

Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

+ * @param anonymousId value to be set + */ + + public void setAnonymousId(final String anonymousId); + + /** + * factory method + * @return instance of MergeCartDraft + */ + public static MergeCartDraft of() { + return new MergeCartDraftImpl(); + } + + /** + * factory method to create a shallow copy MergeCartDraft + * @param template instance to be copied + * @return copy instance + */ + public static MergeCartDraft of(final MergeCartDraft template) { + MergeCartDraftImpl instance = new MergeCartDraftImpl(); + instance.setAnonymousCart(template.getAnonymousCart()); + instance.setMergeMode(template.getMergeMode()); + instance.setUpdateProductData(template.getUpdateProductData()); + instance.setAnonymousId(template.getAnonymousId()); + return instance; + } + + public MergeCartDraft copyDeep(); + + /** + * factory method to create a deep copy of MergeCartDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MergeCartDraft deepCopy(@Nullable final MergeCartDraft template) { + if (template == null) { + return null; + } + MergeCartDraftImpl instance = new MergeCartDraftImpl(); + instance.setAnonymousCart( + com.commercetools.api.models.cart.CartResourceIdentifier.deepCopy(template.getAnonymousCart())); + instance.setMergeMode(template.getMergeMode()); + instance.setUpdateProductData(template.getUpdateProductData()); + instance.setAnonymousId(template.getAnonymousId()); + return instance; + } + + /** + * builder factory method for MergeCartDraft + * @return builder + */ + public static MergeCartDraftBuilder builder() { + return MergeCartDraftBuilder.of(); + } + + /** + * create builder for MergeCartDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MergeCartDraftBuilder builder(final MergeCartDraft template) { + return MergeCartDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMergeCartDraft(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/cart/MergeCartDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraftBuilder.java new file mode 100644 index 00000000000..5dac2d6ecf1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraftBuilder.java @@ -0,0 +1,192 @@ + +package com.commercetools.api.models.cart; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MergeCartDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     MergeCartDraft mergeCartDraft = MergeCartDraft.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MergeCartDraftBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.cart.CartResourceIdentifier anonymousCart; + + @Nullable + private com.commercetools.api.models.cart.CartMergeMode mergeMode; + + @Nullable + private Boolean updateProductData; + + @Nullable + private String anonymousId; + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @param builder function to build the anonymousCart value + * @return Builder + */ + + public MergeCartDraftBuilder anonymousCart( + Function builder) { + this.anonymousCart = builder.apply(com.commercetools.api.models.cart.CartResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @param builder function to build the anonymousCart value + * @return Builder + */ + + public MergeCartDraftBuilder withAnonymousCart( + Function builder) { + this.anonymousCart = builder.apply(com.commercetools.api.models.cart.CartResourceIdentifierBuilder.of()); + return this; + } + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @param anonymousCart value to be set + * @return Builder + */ + + public MergeCartDraftBuilder anonymousCart( + @Nullable final com.commercetools.api.models.cart.CartResourceIdentifier anonymousCart) { + this.anonymousCart = anonymousCart; + return this; + } + + /** + *

Determines how to merge the anonymous Cart with the existing Customer Cart.

+ * @param mergeMode value to be set + * @return Builder + */ + + public MergeCartDraftBuilder mergeMode(@Nullable final com.commercetools.api.models.cart.CartMergeMode mergeMode) { + this.mergeMode = mergeMode; + return this; + } + + /** + *
    + *
  • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
  • + *
  • If false, only the prices, discounts, and tax rates will be updated.
  • + *
+ * @param updateProductData value to be set + * @return Builder + */ + + public MergeCartDraftBuilder updateProductData(@Nullable final Boolean updateProductData) { + this.updateProductData = updateProductData; + return this; + } + + /** + *

Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

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

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ * @return anonymousCart + */ + + @Nullable + public com.commercetools.api.models.cart.CartResourceIdentifier getAnonymousCart() { + return this.anonymousCart; + } + + /** + *

Determines how to merge the anonymous Cart with the existing Customer Cart.

+ * @return mergeMode + */ + + @Nullable + public com.commercetools.api.models.cart.CartMergeMode getMergeMode() { + return this.mergeMode; + } + + /** + *
    + *
  • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
  • + *
  • If false, only the prices, discounts, and tax rates will be updated.
  • + *
+ * @return updateProductData + */ + + @Nullable + public Boolean getUpdateProductData() { + return this.updateProductData; + } + + /** + *

Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

+ * @return anonymousId + */ + + @Nullable + public String getAnonymousId() { + return this.anonymousId; + } + + /** + * builds MergeCartDraft with checking for non-null required values + * @return MergeCartDraft + */ + public MergeCartDraft build() { + return new MergeCartDraftImpl(anonymousCart, mergeMode, updateProductData, anonymousId); + } + + /** + * builds MergeCartDraft without checking for non-null required values + * @return MergeCartDraft + */ + public MergeCartDraft buildUnchecked() { + return new MergeCartDraftImpl(anonymousCart, mergeMode, updateProductData, anonymousId); + } + + /** + * factory method for an instance of MergeCartDraftBuilder + * @return builder + */ + public static MergeCartDraftBuilder of() { + return new MergeCartDraftBuilder(); + } + + /** + * create builder for MergeCartDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MergeCartDraftBuilder of(final MergeCartDraft template) { + MergeCartDraftBuilder builder = new MergeCartDraftBuilder(); + builder.anonymousCart = template.getAnonymousCart(); + builder.mergeMode = template.getMergeMode(); + builder.updateProductData = template.getUpdateProductData(); + builder.anonymousId = template.getAnonymousId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraftImpl.java new file mode 100644 index 00000000000..674fa67007d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/MergeCartDraftImpl.java @@ -0,0 +1,148 @@ + +package com.commercetools.api.models.cart; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Used for merging an anonymous Cart with a Customer Cart with the Merge Cart and Merge Cart in Store endpoints. Either anonymousCart or anonymousId is required.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MergeCartDraftImpl implements MergeCartDraft, ModelBase { + + private com.commercetools.api.models.cart.CartResourceIdentifier anonymousCart; + + private com.commercetools.api.models.cart.CartMergeMode mergeMode; + + private Boolean updateProductData; + + private String anonymousId; + + /** + * create instance with all properties + */ + @JsonCreator + MergeCartDraftImpl( + @JsonProperty("anonymousCart") final com.commercetools.api.models.cart.CartResourceIdentifier anonymousCart, + @JsonProperty("mergeMode") final com.commercetools.api.models.cart.CartMergeMode mergeMode, + @JsonProperty("updateProductData") final Boolean updateProductData, + @JsonProperty("anonymousId") final String anonymousId) { + this.anonymousCart = anonymousCart; + this.mergeMode = mergeMode; + this.updateProductData = updateProductData; + this.anonymousId = anonymousId; + } + + /** + * create empty instance + */ + public MergeCartDraftImpl() { + } + + /** + *

ResourceIdentifier to the anonymous Cart to be merged. Required if anonymousId is not provided.

+ */ + + public com.commercetools.api.models.cart.CartResourceIdentifier getAnonymousCart() { + return this.anonymousCart; + } + + /** + *

Determines how to merge the anonymous Cart with the existing Customer Cart.

+ */ + + public com.commercetools.api.models.cart.CartMergeMode getMergeMode() { + return this.mergeMode; + } + + /** + *
    + *
  • If true, the LineItem Product data (name, variant, and productType) of the returned Cart will be updated.
  • + *
  • If false, only the prices, discounts, and tax rates will be updated.
  • + *
+ */ + + public Boolean getUpdateProductData() { + return this.updateProductData; + } + + /** + *

Assigns the Customer to the Carts that have the same anonymousId. Required if anonymousCart is not provided. If both anonymousCart and anonymousId are provided, this value must match the anonymousId of the anonymous Cart otherwise, an InvalidOperation error is returned.

+ */ + + public String getAnonymousId() { + return this.anonymousId; + } + + public void setAnonymousCart(final com.commercetools.api.models.cart.CartResourceIdentifier anonymousCart) { + this.anonymousCart = anonymousCart; + } + + public void setMergeMode(final com.commercetools.api.models.cart.CartMergeMode mergeMode) { + this.mergeMode = mergeMode; + } + + public void setUpdateProductData(final Boolean updateProductData) { + this.updateProductData = updateProductData; + } + + public void setAnonymousId(final String anonymousId) { + this.anonymousId = anonymousId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MergeCartDraftImpl that = (MergeCartDraftImpl) o; + + return new EqualsBuilder().append(anonymousCart, that.anonymousCart) + .append(mergeMode, that.mergeMode) + .append(updateProductData, that.updateProductData) + .append(anonymousId, that.anonymousId) + .append(anonymousCart, that.anonymousCart) + .append(mergeMode, that.mergeMode) + .append(updateProductData, that.updateProductData) + .append(anonymousId, that.anonymousId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(anonymousCart) + .append(mergeMode) + .append(updateProductData) + .append(anonymousId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("anonymousCart", anonymousCart) + .append("mergeMode", mergeMode) + .append("updateProductData", updateProductData) + .append("anonymousId", anonymousId) + .build(); + } + + @Override + public MergeCartDraft copyDeep() { + return MergeCartDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscount.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscount.java index 76e39725dd7..fd62064afd7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscount.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscount.java @@ -212,7 +212,7 @@ public interface CartDiscount public Boolean getRequiresDiscountCode(); /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @return references */ @NotNull @@ -388,7 +388,7 @@ public interface CartDiscount public void setRequiresDiscountCode(final Boolean requiresDiscountCode); /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references values to be set */ @@ -396,7 +396,7 @@ public interface CartDiscount public void setReferences(final Reference... references); /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountBuilder.java index 393491c6e62..a42bc32ac8a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountBuilder.java @@ -512,7 +512,7 @@ public CartDiscountBuilder requiresDiscountCode(final Boolean requiresDiscountCo } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -523,7 +523,7 @@ public CartDiscountBuilder references(final com.commercetools.api.models.common. } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -535,7 +535,7 @@ public CartDiscountBuilder references( } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -549,7 +549,7 @@ public CartDiscountBuilder plusReferences(final com.commercetools.api.models.com } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -564,7 +564,7 @@ public CartDiscountBuilder plusReferences( } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -838,7 +838,7 @@ public Boolean getRequiresDiscountCode() { } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @return references */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountImpl.java index de427d4f867..f7ccd32f560 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountImpl.java @@ -272,7 +272,7 @@ public Boolean getRequiresDiscountCode() { } /** - *

References of all resources that are addressed in the predicate. The API generates this array from the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

*/ public java.util.List getReferences() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java index 0d88687786d..bf210b47fd9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java @@ -159,7 +159,7 @@ public interface DiscountCode public Boolean getIsActive(); /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @return references */ @NotNull @@ -323,7 +323,7 @@ public interface DiscountCode public void setIsActive(final Boolean isActive); /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references values to be set */ @@ -331,7 +331,7 @@ public interface DiscountCode public void setReferences(final Reference... references); /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java index a5464cba2bd..c0c41fec03c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java @@ -410,7 +410,7 @@ public DiscountCodeBuilder isActive(final Boolean isActive) { } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -421,7 +421,7 @@ public DiscountCodeBuilder references(final com.commercetools.api.models.common. } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -433,7 +433,7 @@ public DiscountCodeBuilder references( } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -447,7 +447,7 @@ public DiscountCodeBuilder plusReferences(final com.commercetools.api.models.com } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -462,7 +462,7 @@ public DiscountCodeBuilder plusReferences( } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -724,7 +724,7 @@ public Boolean getIsActive() { } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

* @return references */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java index 5d2163efde4..3a6cb1a22d1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java @@ -221,7 +221,7 @@ public Boolean getIsActive() { } /** - *

Array generated from the Cart predicate. It contains the references of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the cartPredicate by their IDs. This value is generated by the platform.

*/ public java.util.List getReferences() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableError.java index ff27729cd0f..b92d62bc31d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableError.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableError.java @@ -19,12 +19,14 @@ *

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart or ApplicationStoppedByGroupBestDeal.

*

The error is returned as a failed response to:

* * diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableErrorImpl.java index 8b0d5096371..596cefa82e4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableErrorImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/DiscountCodeNonApplicableErrorImpl.java @@ -21,12 +21,14 @@ *

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart or ApplicationStoppedByGroupBestDeal.

*

The error is returned as a failed response to:

* */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java index 5a6aea1343d..bc503b897f4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java @@ -623,6 +623,14 @@ public static com.commercetools.api.models.error.QueryTimedOutErrorBuilder query return com.commercetools.api.models.error.QueryTimedOutErrorBuilder.of(); } + /** + * builder for recurringOrderFailure subtype + * @return builder + */ + public static com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder recurringOrderFailureBuilder() { + return com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of(); + } + /** * builder for referenceExists subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java index 96b898d8cd2..cac68e68a11 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java @@ -275,6 +275,10 @@ public com.commercetools.api.models.error.QueryTimedOutErrorBuilder queryTimedOu return com.commercetools.api.models.error.QueryTimedOutErrorBuilder.of(); } + public com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder recurringOrderFailureBuilder() { + return com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of(); + } + public com.commercetools.api.models.error.ReferenceExistsErrorBuilder referenceExistsBuilder() { return com.commercetools.api.models.error.ReferenceExistsErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableError.java index 90c54dd782a..df1dd92dc04 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableError.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableError.java @@ -19,12 +19,14 @@ *

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart or ApplicationStoppedByGroupBestDeal.

*

The error is returned as a failed response to:

* * diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableErrorImpl.java index e1fdb7c666f..dfc094898b2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableErrorImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLDiscountCodeNonApplicableErrorImpl.java @@ -21,12 +21,14 @@ *

Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart or ApplicationStoppedByGroupBestDeal.

*

The error is returned as a failed response to:

* */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java index f81cef32220..27d28627feb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java @@ -605,6 +605,14 @@ public static com.commercetools.api.models.error.GraphQLQueryTimedOutErrorBuilde return com.commercetools.api.models.error.GraphQLQueryTimedOutErrorBuilder.of(); } + /** + * builder for recurringOrderFailure subtype + * @return builder + */ + public static com.commercetools.api.models.error.GraphQLRecurringOrderFailureErrorBuilder recurringOrderFailureBuilder() { + return com.commercetools.api.models.error.GraphQLRecurringOrderFailureErrorBuilder.of(); + } + /** * builder for referenceExists subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java index 64f2e7e3d62..6cb3ffa31ee 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java @@ -275,6 +275,10 @@ public com.commercetools.api.models.error.GraphQLQueryTimedOutErrorBuilder query return com.commercetools.api.models.error.GraphQLQueryTimedOutErrorBuilder.of(); } + public com.commercetools.api.models.error.GraphQLRecurringOrderFailureErrorBuilder recurringOrderFailureBuilder() { + return com.commercetools.api.models.error.GraphQLRecurringOrderFailureErrorBuilder.of(); + } + public com.commercetools.api.models.error.GraphQLReferenceExistsErrorBuilder referenceExistsBuilder() { return com.commercetools.api.models.error.GraphQLReferenceExistsErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureError.java new file mode 100644 index 00000000000..7b138f1e967 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureError.java @@ -0,0 +1,140 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when a subsequent Order for a Recurring Order could not be processed.

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

+ *     GraphQLRecurringOrderFailureError graphQLRecurringOrderFailureError = GraphQLRecurringOrderFailureError.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderFailure") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GraphQLRecurringOrderFailureErrorImpl.class) +public interface GraphQLRecurringOrderFailureError extends GraphQLErrorObject { + + /** + * discriminator value for GraphQLRecurringOrderFailureError + */ + String RECURRING_ORDER_FAILURE = "RecurringOrderFailure"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Details about the error's cause and the entities involved.

+ * @return details + */ + @NotNull + @JsonProperty("details") + public Object getDetails(); + + /** + *

Details about the error's cause and the entities involved.

+ * @param details value to be set + */ + + public void setDetails(final Object details); + + /** + * factory method + * @return instance of GraphQLRecurringOrderFailureError + */ + public static GraphQLRecurringOrderFailureError of() { + return new GraphQLRecurringOrderFailureErrorImpl(); + } + + /** + * factory method to create a shallow copy GraphQLRecurringOrderFailureError + * @param template instance to be copied + * @return copy instance + */ + public static GraphQLRecurringOrderFailureError of(final GraphQLRecurringOrderFailureError template) { + GraphQLRecurringOrderFailureErrorImpl instance = new GraphQLRecurringOrderFailureErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setDetails(template.getDetails()); + return instance; + } + + public GraphQLRecurringOrderFailureError copyDeep(); + + /** + * factory method to create a deep copy of GraphQLRecurringOrderFailureError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLRecurringOrderFailureError deepCopy( + @Nullable final GraphQLRecurringOrderFailureError template) { + if (template == null) { + return null; + } + GraphQLRecurringOrderFailureErrorImpl instance = new GraphQLRecurringOrderFailureErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setDetails(template.getDetails()); + return instance; + } + + /** + * builder factory method for GraphQLRecurringOrderFailureError + * @return builder + */ + public static GraphQLRecurringOrderFailureErrorBuilder builder() { + return GraphQLRecurringOrderFailureErrorBuilder.of(); + } + + /** + * create builder for GraphQLRecurringOrderFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLRecurringOrderFailureErrorBuilder builder(final GraphQLRecurringOrderFailureError template) { + return GraphQLRecurringOrderFailureErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLRecurringOrderFailureError(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/error/GraphQLRecurringOrderFailureErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorBuilder.java new file mode 100644 index 00000000000..b269f48a7c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorBuilder.java @@ -0,0 +1,119 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GraphQLRecurringOrderFailureErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLRecurringOrderFailureError graphQLRecurringOrderFailureError = GraphQLRecurringOrderFailureError.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLRecurringOrderFailureErrorBuilder implements Builder { + + private Map values = new HashMap<>(); + + private java.lang.Object details; + + /** + *

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public GraphQLRecurringOrderFailureErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public GraphQLRecurringOrderFailureErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

Details about the error's cause and the entities involved.

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

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

Details about the error's cause and the entities involved.

+ * @return details + */ + + public java.lang.Object getDetails() { + return this.details; + } + + /** + * builds GraphQLRecurringOrderFailureError with checking for non-null required values + * @return GraphQLRecurringOrderFailureError + */ + public GraphQLRecurringOrderFailureError build() { + Objects.requireNonNull(details, GraphQLRecurringOrderFailureError.class + ": details is missing"); + return new GraphQLRecurringOrderFailureErrorImpl(values, details); + } + + /** + * builds GraphQLRecurringOrderFailureError without checking for non-null required values + * @return GraphQLRecurringOrderFailureError + */ + public GraphQLRecurringOrderFailureError buildUnchecked() { + return new GraphQLRecurringOrderFailureErrorImpl(values, details); + } + + /** + * factory method for an instance of GraphQLRecurringOrderFailureErrorBuilder + * @return builder + */ + public static GraphQLRecurringOrderFailureErrorBuilder of() { + return new GraphQLRecurringOrderFailureErrorBuilder(); + } + + /** + * create builder for GraphQLRecurringOrderFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLRecurringOrderFailureErrorBuilder of(final GraphQLRecurringOrderFailureError template) { + GraphQLRecurringOrderFailureErrorBuilder builder = new GraphQLRecurringOrderFailureErrorBuilder(); + builder.values = template.values(); + builder.details = template.getDetails(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorImpl.java new file mode 100644 index 00000000000..0303eba75a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorImpl.java @@ -0,0 +1,122 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when a subsequent Order for a Recurring Order could not be processed.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLRecurringOrderFailureErrorImpl implements GraphQLRecurringOrderFailureError, ModelBase { + + private String code; + + private Map values; + + private java.lang.Object details; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLRecurringOrderFailureErrorImpl( + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("details") final java.lang.Object details) { + this.values = values; + this.details = details; + this.code = RECURRING_ORDER_FAILURE; + } + + /** + * create empty instance + */ + public GraphQLRecurringOrderFailureErrorImpl() { + this.code = RECURRING_ORDER_FAILURE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

Details about the error's cause and the entities involved.

+ */ + + public java.lang.Object getDetails() { + return this.details; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setDetails(final java.lang.Object details) { + this.details = details; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLRecurringOrderFailureErrorImpl that = (GraphQLRecurringOrderFailureErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(details, that.details) + .append(code, that.code) + .append(values, that.values) + .append(details, that.details) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(values).append(details).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .append("details", details) + .build(); + } + + @Override + public GraphQLRecurringOrderFailureError copyDeep() { + return GraphQLRecurringOrderFailureError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureError.java new file mode 100644 index 00000000000..0f5458d19f2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureError.java @@ -0,0 +1,157 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned when a subsequent Order for a Recurring Order could not be processed.

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

+ *     RecurringOrderFailureError recurringOrderFailureError = RecurringOrderFailureError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderFailure") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderFailureErrorImpl.class) +public interface RecurringOrderFailureError extends ErrorObject { + + /** + * discriminator value for RecurringOrderFailureError + */ + String RECURRING_ORDER_FAILURE = "RecurringOrderFailure"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Plain text description of the error.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

Details about the error's cause and the entities involved.

+ * @return details + */ + @NotNull + @JsonProperty("details") + public Object getDetails(); + + /** + *

Plain text description of the error.

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

Details about the error's cause and the entities involved.

+ * @param details value to be set + */ + + public void setDetails(final Object details); + + /** + * factory method + * @return instance of RecurringOrderFailureError + */ + public static RecurringOrderFailureError of() { + return new RecurringOrderFailureErrorImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderFailureError + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderFailureError of(final RecurringOrderFailureError template) { + RecurringOrderFailureErrorImpl instance = new RecurringOrderFailureErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setDetails(template.getDetails()); + return instance; + } + + public RecurringOrderFailureError copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderFailureError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderFailureError deepCopy(@Nullable final RecurringOrderFailureError template) { + if (template == null) { + return null; + } + RecurringOrderFailureErrorImpl instance = new RecurringOrderFailureErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setDetails(template.getDetails()); + return instance; + } + + /** + * builder factory method for RecurringOrderFailureError + * @return builder + */ + public static RecurringOrderFailureErrorBuilder builder() { + return RecurringOrderFailureErrorBuilder.of(); + } + + /** + * create builder for RecurringOrderFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailureErrorBuilder builder(final RecurringOrderFailureError template) { + return RecurringOrderFailureErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderFailureError(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/error/RecurringOrderFailureErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorBuilder.java new file mode 100644 index 00000000000..f73b332ae2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorBuilder.java @@ -0,0 +1,144 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderFailureErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RecurringOrderFailureError recurringOrderFailureError = RecurringOrderFailureError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailureErrorBuilder implements Builder { + + private String message; + + private Map values = new HashMap<>(); + + private java.lang.Object details; + + /** + *

Plain text description of the error.

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

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public RecurringOrderFailureErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public RecurringOrderFailureErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

Details about the error's cause and the entities involved.

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

Plain text description of the error.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

Details about the error's cause and the entities involved.

+ * @return details + */ + + public java.lang.Object getDetails() { + return this.details; + } + + /** + * builds RecurringOrderFailureError with checking for non-null required values + * @return RecurringOrderFailureError + */ + public RecurringOrderFailureError build() { + Objects.requireNonNull(message, RecurringOrderFailureError.class + ": message is missing"); + Objects.requireNonNull(details, RecurringOrderFailureError.class + ": details is missing"); + return new RecurringOrderFailureErrorImpl(message, values, details); + } + + /** + * builds RecurringOrderFailureError without checking for non-null required values + * @return RecurringOrderFailureError + */ + public RecurringOrderFailureError buildUnchecked() { + return new RecurringOrderFailureErrorImpl(message, values, details); + } + + /** + * factory method for an instance of RecurringOrderFailureErrorBuilder + * @return builder + */ + public static RecurringOrderFailureErrorBuilder of() { + return new RecurringOrderFailureErrorBuilder(); + } + + /** + * create builder for RecurringOrderFailureError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailureErrorBuilder of(final RecurringOrderFailureError template) { + RecurringOrderFailureErrorBuilder builder = new RecurringOrderFailureErrorBuilder(); + builder.message = template.getMessage(); + builder.values = template.values(); + builder.details = template.getDetails(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorImpl.java new file mode 100644 index 00000000000..5693f12596e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorImpl.java @@ -0,0 +1,140 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned when a subsequent Order for a Recurring Order could not be processed.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailureErrorImpl implements RecurringOrderFailureError, ModelBase { + + private String code; + + private String message; + + private Map values; + + private java.lang.Object details; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderFailureErrorImpl(@JsonProperty("message") final String message, + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("details") final java.lang.Object details) { + this.message = message; + this.values = values; + this.details = details; + this.code = RECURRING_ORDER_FAILURE; + } + + /** + * create empty instance + */ + public RecurringOrderFailureErrorImpl() { + this.code = RECURRING_ORDER_FAILURE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Plain text description of the error.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

Details about the error's cause and the entities involved.

+ */ + + public java.lang.Object getDetails() { + return this.details; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setDetails(final java.lang.Object details) { + this.details = details; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderFailureErrorImpl that = (RecurringOrderFailureErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(details, that.details) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(details, that.details) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(values).append(details).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .append("details", details) + .build(); + } + + @Override + public RecurringOrderFailureError copyDeep() { + return RecurringOrderFailureError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeAction.java index c5558b4962d..7bdfcd23da6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeAction.java @@ -15,7 +15,8 @@ import jakarta.validation.constraints.NotNull; /** - *

Adds a DiscountCode to the Cart to activate the related CartDiscounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

+ *

Adds a DiscountCode to the Cart to activate the related CartDiscounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Cart, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Cart. For frozen Carts, the DiscountCodeState must be DoesNotMatchCart when adding a Discount Code.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

* diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeActionImpl.java index 3dd5e60617a..795d33ea5ef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/me/MyCartAddDiscountCodeActionImpl.java @@ -17,7 +17,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

Adds a DiscountCode to the Cart to activate the related CartDiscounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Cart. Discount Codes can be added to frozen Carts, but their DiscountCodeState is then DoesNotMatchCart.

+ *

Adds a DiscountCode to the Cart to activate the related CartDiscounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Cart, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Cart. For frozen Carts, the DiscountCodeState must be DoesNotMatchCart when adding a Discount Code.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

*/ 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 1fd7c06b756..fabc4a8358b 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 @@ -56,7 +56,7 @@ public interface MyCartRemoveLineItemAction extends MyCartUpdateAction { public String getLineItemKey(); /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, the LineItem is removed from the Cart.

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

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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 6f2708c9470..73aa146d191 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,7 +64,7 @@ public MyCartRemoveLineItemActionBuilder lineItemKey(@Nullable final String line } /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, the LineItem is removed from the Cart.

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

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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 8207b0a02ff..cea250fee16 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 @@ -86,7 +86,7 @@ public String getLineItemKey() { } /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, 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/message/CartFrozenMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessage.java new file mode 100644 index 00000000000..8ba0929c321 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessage.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Generated after a successful Freeze Cart update action.

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

+ *     CartFrozenMessage cartFrozenMessage = CartFrozenMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CartFrozen") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartFrozenMessageImpl.class) +public interface CartFrozenMessage extends Message { + + /** + * discriminator value for CartFrozenMessage + */ + String CART_FROZEN = "CartFrozen"; + + /** + * factory method + * @return instance of CartFrozenMessage + */ + public static CartFrozenMessage of() { + return new CartFrozenMessageImpl(); + } + + /** + * factory method to create a shallow copy CartFrozenMessage + * @param template instance to be copied + * @return copy instance + */ + public static CartFrozenMessage of(final CartFrozenMessage template) { + CartFrozenMessageImpl instance = new CartFrozenMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + return instance; + } + + public CartFrozenMessage copyDeep(); + + /** + * factory method to create a deep copy of CartFrozenMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartFrozenMessage deepCopy(@Nullable final CartFrozenMessage template) { + if (template == null) { + return null; + } + CartFrozenMessageImpl instance = new CartFrozenMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + return instance; + } + + /** + * builder factory method for CartFrozenMessage + * @return builder + */ + public static CartFrozenMessageBuilder builder() { + return CartFrozenMessageBuilder.of(); + } + + /** + * create builder for CartFrozenMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartFrozenMessageBuilder builder(final CartFrozenMessage template) { + return CartFrozenMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartFrozenMessage(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/message/CartFrozenMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessageBuilder.java new file mode 100644 index 00000000000..9f330e84e71 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessageBuilder.java @@ -0,0 +1,401 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartFrozenMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartFrozenMessage cartFrozenMessage = CartFrozenMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartFrozenMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

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

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public CartFrozenMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public CartFrozenMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public CartFrozenMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public CartFrozenMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public CartFrozenMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartFrozenMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartFrozenMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public CartFrozenMessageBuilder createdBy(@Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

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

Reference to the resource on which the change or action was performed.

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

Reference to the resource on which the change or action was performed.

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

Version of the resource on which the change or action was performed.

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

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public CartFrozenMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public CartFrozenMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public CartFrozenMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + * builds CartFrozenMessage with checking for non-null required values + * @return CartFrozenMessage + */ + public CartFrozenMessage build() { + Objects.requireNonNull(id, CartFrozenMessage.class + ": id is missing"); + Objects.requireNonNull(version, CartFrozenMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CartFrozenMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CartFrozenMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CartFrozenMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CartFrozenMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CartFrozenMessage.class + ": resourceVersion is missing"); + return new CartFrozenMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers); + } + + /** + * builds CartFrozenMessage without checking for non-null required values + * @return CartFrozenMessage + */ + public CartFrozenMessage buildUnchecked() { + return new CartFrozenMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers); + } + + /** + * factory method for an instance of CartFrozenMessageBuilder + * @return builder + */ + public static CartFrozenMessageBuilder of() { + return new CartFrozenMessageBuilder(); + } + + /** + * create builder for CartFrozenMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartFrozenMessageBuilder of(final CartFrozenMessage template) { + CartFrozenMessageBuilder builder = new CartFrozenMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessageImpl.java new file mode 100644 index 00000000000..fde98167473 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessageImpl.java @@ -0,0 +1,280 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Freeze Cart update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartFrozenMessageImpl implements CartFrozenMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + * create instance with all properties + */ + @JsonCreator + CartFrozenMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.type = CART_FROZEN; + } + + /** + * create empty instance + */ + public CartFrozenMessageImpl() { + this.type = CART_FROZEN; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

Message Type of the Message.

+ */ + + public String getType() { + return this.type; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartFrozenMessageImpl that = (CartFrozenMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .build(); + } + + @Override + public CartFrozenMessage copyDeep() { + return CartFrozenMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayload.java new file mode 100644 index 00000000000..89df22c436a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayload.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Generated after a successful Freeze Cart update action.

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

+ *     CartFrozenMessagePayload cartFrozenMessagePayload = CartFrozenMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CartFrozen") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartFrozenMessagePayloadImpl.class) +public interface CartFrozenMessagePayload extends MessagePayload { + + /** + * discriminator value for CartFrozenMessagePayload + */ + String CART_FROZEN = "CartFrozen"; + + /** + * factory method + * @return instance of CartFrozenMessagePayload + */ + public static CartFrozenMessagePayload of() { + return new CartFrozenMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CartFrozenMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CartFrozenMessagePayload of(final CartFrozenMessagePayload template) { + CartFrozenMessagePayloadImpl instance = new CartFrozenMessagePayloadImpl(); + return instance; + } + + public CartFrozenMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of CartFrozenMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartFrozenMessagePayload deepCopy(@Nullable final CartFrozenMessagePayload template) { + if (template == null) { + return null; + } + CartFrozenMessagePayloadImpl instance = new CartFrozenMessagePayloadImpl(); + return instance; + } + + /** + * builder factory method for CartFrozenMessagePayload + * @return builder + */ + public static CartFrozenMessagePayloadBuilder builder() { + return CartFrozenMessagePayloadBuilder.of(); + } + + /** + * create builder for CartFrozenMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartFrozenMessagePayloadBuilder builder(final CartFrozenMessagePayload template) { + return CartFrozenMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartFrozenMessagePayload(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/message/CartFrozenMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadBuilder.java new file mode 100644 index 00000000000..5f4684db965 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartFrozenMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartFrozenMessagePayload cartFrozenMessagePayload = CartFrozenMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartFrozenMessagePayloadBuilder implements Builder { + + /** + * builds CartFrozenMessagePayload with checking for non-null required values + * @return CartFrozenMessagePayload + */ + public CartFrozenMessagePayload build() { + return new CartFrozenMessagePayloadImpl(); + } + + /** + * builds CartFrozenMessagePayload without checking for non-null required values + * @return CartFrozenMessagePayload + */ + public CartFrozenMessagePayload buildUnchecked() { + return new CartFrozenMessagePayloadImpl(); + } + + /** + * factory method for an instance of CartFrozenMessagePayloadBuilder + * @return builder + */ + public static CartFrozenMessagePayloadBuilder of() { + return new CartFrozenMessagePayloadBuilder(); + } + + /** + * create builder for CartFrozenMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartFrozenMessagePayloadBuilder of(final CartFrozenMessagePayload template) { + CartFrozenMessagePayloadBuilder builder = new CartFrozenMessagePayloadBuilder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadImpl.java new file mode 100644 index 00000000000..7cd0319edc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadImpl.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Freeze Cart update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartFrozenMessagePayloadImpl implements CartFrozenMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + public CartFrozenMessagePayloadImpl() { + this.type = CART_FROZEN; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartFrozenMessagePayloadImpl that = (CartFrozenMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public CartFrozenMessagePayload copyDeep() { + return CartFrozenMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessage.java new file mode 100644 index 00000000000..07521c706d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessage.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Generated after a successful Unfreeze Cart update action.

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

+ *     CartUnfrozenMessage cartUnfrozenMessage = CartUnfrozenMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CartUnfrozen") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartUnfrozenMessageImpl.class) +public interface CartUnfrozenMessage extends Message { + + /** + * discriminator value for CartUnfrozenMessage + */ + String CART_UNFROZEN = "CartUnfrozen"; + + /** + * factory method + * @return instance of CartUnfrozenMessage + */ + public static CartUnfrozenMessage of() { + return new CartUnfrozenMessageImpl(); + } + + /** + * factory method to create a shallow copy CartUnfrozenMessage + * @param template instance to be copied + * @return copy instance + */ + public static CartUnfrozenMessage of(final CartUnfrozenMessage template) { + CartUnfrozenMessageImpl instance = new CartUnfrozenMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + return instance; + } + + public CartUnfrozenMessage copyDeep(); + + /** + * factory method to create a deep copy of CartUnfrozenMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartUnfrozenMessage deepCopy(@Nullable final CartUnfrozenMessage template) { + if (template == null) { + return null; + } + CartUnfrozenMessageImpl instance = new CartUnfrozenMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + return instance; + } + + /** + * builder factory method for CartUnfrozenMessage + * @return builder + */ + public static CartUnfrozenMessageBuilder builder() { + return CartUnfrozenMessageBuilder.of(); + } + + /** + * create builder for CartUnfrozenMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartUnfrozenMessageBuilder builder(final CartUnfrozenMessage template) { + return CartUnfrozenMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartUnfrozenMessage(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/message/CartUnfrozenMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageBuilder.java new file mode 100644 index 00000000000..3bcc02c3561 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageBuilder.java @@ -0,0 +1,402 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartUnfrozenMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartUnfrozenMessage cartUnfrozenMessage = CartUnfrozenMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartUnfrozenMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

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

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public CartUnfrozenMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public CartUnfrozenMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public CartUnfrozenMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public CartUnfrozenMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public CartUnfrozenMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartUnfrozenMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartUnfrozenMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public CartUnfrozenMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

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

Reference to the resource on which the change or action was performed.

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

Reference to the resource on which the change or action was performed.

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

Version of the resource on which the change or action was performed.

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

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public CartUnfrozenMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public CartUnfrozenMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public CartUnfrozenMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + * builds CartUnfrozenMessage with checking for non-null required values + * @return CartUnfrozenMessage + */ + public CartUnfrozenMessage build() { + Objects.requireNonNull(id, CartUnfrozenMessage.class + ": id is missing"); + Objects.requireNonNull(version, CartUnfrozenMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CartUnfrozenMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CartUnfrozenMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CartUnfrozenMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CartUnfrozenMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CartUnfrozenMessage.class + ": resourceVersion is missing"); + return new CartUnfrozenMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers); + } + + /** + * builds CartUnfrozenMessage without checking for non-null required values + * @return CartUnfrozenMessage + */ + public CartUnfrozenMessage buildUnchecked() { + return new CartUnfrozenMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers); + } + + /** + * factory method for an instance of CartUnfrozenMessageBuilder + * @return builder + */ + public static CartUnfrozenMessageBuilder of() { + return new CartUnfrozenMessageBuilder(); + } + + /** + * create builder for CartUnfrozenMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartUnfrozenMessageBuilder of(final CartUnfrozenMessage template) { + CartUnfrozenMessageBuilder builder = new CartUnfrozenMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageImpl.java new file mode 100644 index 00000000000..ddd6f9345d3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageImpl.java @@ -0,0 +1,280 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Unfreeze Cart update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartUnfrozenMessageImpl implements CartUnfrozenMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + * create instance with all properties + */ + @JsonCreator + CartUnfrozenMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.type = CART_UNFROZEN; + } + + /** + * create empty instance + */ + public CartUnfrozenMessageImpl() { + this.type = CART_UNFROZEN; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

Message Type of the Message.

+ */ + + public String getType() { + return this.type; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartUnfrozenMessageImpl that = (CartUnfrozenMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .build(); + } + + @Override + public CartUnfrozenMessage copyDeep() { + return CartUnfrozenMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayload.java new file mode 100644 index 00000000000..8b8fb1e1296 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayload.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Generated after a successful Unfreeze Cart update action.

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

+ *     CartUnfrozenMessagePayload cartUnfrozenMessagePayload = CartUnfrozenMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("CartUnfrozen") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartUnfrozenMessagePayloadImpl.class) +public interface CartUnfrozenMessagePayload extends MessagePayload { + + /** + * discriminator value for CartUnfrozenMessagePayload + */ + String CART_UNFROZEN = "CartUnfrozen"; + + /** + * factory method + * @return instance of CartUnfrozenMessagePayload + */ + public static CartUnfrozenMessagePayload of() { + return new CartUnfrozenMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CartUnfrozenMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CartUnfrozenMessagePayload of(final CartUnfrozenMessagePayload template) { + CartUnfrozenMessagePayloadImpl instance = new CartUnfrozenMessagePayloadImpl(); + return instance; + } + + public CartUnfrozenMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of CartUnfrozenMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartUnfrozenMessagePayload deepCopy(@Nullable final CartUnfrozenMessagePayload template) { + if (template == null) { + return null; + } + CartUnfrozenMessagePayloadImpl instance = new CartUnfrozenMessagePayloadImpl(); + return instance; + } + + /** + * builder factory method for CartUnfrozenMessagePayload + * @return builder + */ + public static CartUnfrozenMessagePayloadBuilder builder() { + return CartUnfrozenMessagePayloadBuilder.of(); + } + + /** + * create builder for CartUnfrozenMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartUnfrozenMessagePayloadBuilder builder(final CartUnfrozenMessagePayload template) { + return CartUnfrozenMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartUnfrozenMessagePayload(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/message/CartUnfrozenMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadBuilder.java new file mode 100644 index 00000000000..ef6e322cef8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.api.models.message; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartUnfrozenMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CartUnfrozenMessagePayload cartUnfrozenMessagePayload = CartUnfrozenMessagePayload.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartUnfrozenMessagePayloadBuilder implements Builder { + + /** + * builds CartUnfrozenMessagePayload with checking for non-null required values + * @return CartUnfrozenMessagePayload + */ + public CartUnfrozenMessagePayload build() { + return new CartUnfrozenMessagePayloadImpl(); + } + + /** + * builds CartUnfrozenMessagePayload without checking for non-null required values + * @return CartUnfrozenMessagePayload + */ + public CartUnfrozenMessagePayload buildUnchecked() { + return new CartUnfrozenMessagePayloadImpl(); + } + + /** + * factory method for an instance of CartUnfrozenMessagePayloadBuilder + * @return builder + */ + public static CartUnfrozenMessagePayloadBuilder of() { + return new CartUnfrozenMessagePayloadBuilder(); + } + + /** + * create builder for CartUnfrozenMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartUnfrozenMessagePayloadBuilder of(final CartUnfrozenMessagePayload template) { + CartUnfrozenMessagePayloadBuilder builder = new CartUnfrozenMessagePayloadBuilder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadImpl.java new file mode 100644 index 00000000000..001af8b4cb5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadImpl.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Unfreeze Cart update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartUnfrozenMessagePayloadImpl implements CartUnfrozenMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + public CartUnfrozenMessagePayloadImpl() { + this.type = CART_UNFROZEN; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartUnfrozenMessagePayloadImpl that = (CartUnfrozenMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public CartUnfrozenMessagePayload copyDeep() { + return CartUnfrozenMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessage.java index 2df38aa67a0..b78618075a2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessage.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessage.java @@ -81,6 +81,14 @@ public interface InventoryEntryQuantitySetMessage extends Message { @JsonProperty("newAvailableQuantity") public Long getNewAvailableQuantity(); + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ * @return sku + */ + + @JsonProperty("sku") + public String getSku(); + /** *

Reference to the Channel where the InventoryEntry quantity was set.

* @return supplyChannel @@ -117,6 +125,13 @@ public interface InventoryEntryQuantitySetMessage extends Message { public void setNewAvailableQuantity(final Long newAvailableQuantity); + /** + *

SKU of the InventoryEntry for which the quantity was updated.

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

Reference to the Channel where the InventoryEntry quantity was set.

* @param supplyChannel value to be set @@ -153,6 +168,7 @@ public static InventoryEntryQuantitySetMessage of(final InventoryEntryQuantitySe instance.setNewQuantityOnStock(template.getNewQuantityOnStock()); instance.setOldAvailableQuantity(template.getOldAvailableQuantity()); instance.setNewAvailableQuantity(template.getNewAvailableQuantity()); + instance.setSku(template.getSku()); instance.setSupplyChannel(template.getSupplyChannel()); return instance; } @@ -186,6 +202,7 @@ public static InventoryEntryQuantitySetMessage deepCopy(@Nullable final Inventor instance.setNewQuantityOnStock(template.getNewQuantityOnStock()); instance.setOldAvailableQuantity(template.getOldAvailableQuantity()); instance.setNewAvailableQuantity(template.getNewAvailableQuantity()); + instance.setSku(template.getSku()); instance.setSupplyChannel( com.commercetools.api.models.channel.ChannelReference.deepCopy(template.getSupplyChannel())); return instance; diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageBuilder.java index c4c9390b47b..2de3ee8df2b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageBuilder.java @@ -65,6 +65,9 @@ public class InventoryEntryQuantitySetMessageBuilder implements BuilderSKU of the InventoryEntry for which the quantity was updated.

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

Reference to the Channel where the InventoryEntry quantity was set.

* @param builder function to build the supplyChannel value @@ -478,6 +492,16 @@ public Long getNewAvailableQuantity() { return this.newAvailableQuantity; } + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ * @return sku + */ + + @Nullable + public String getSku() { + return this.sku; + } + /** *

Reference to the Channel where the InventoryEntry quantity was set.

* @return supplyChannel @@ -511,7 +535,7 @@ public InventoryEntryQuantitySetMessage build() { InventoryEntryQuantitySetMessage.class + ": newAvailableQuantity is missing"); return new InventoryEntryQuantitySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, oldQuantityOnStock, - newQuantityOnStock, oldAvailableQuantity, newAvailableQuantity, supplyChannel); + newQuantityOnStock, oldAvailableQuantity, newAvailableQuantity, sku, supplyChannel); } /** @@ -521,7 +545,7 @@ public InventoryEntryQuantitySetMessage build() { public InventoryEntryQuantitySetMessage buildUnchecked() { return new InventoryEntryQuantitySetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, oldQuantityOnStock, - newQuantityOnStock, oldAvailableQuantity, newAvailableQuantity, supplyChannel); + newQuantityOnStock, oldAvailableQuantity, newAvailableQuantity, sku, supplyChannel); } /** @@ -553,6 +577,7 @@ public static InventoryEntryQuantitySetMessageBuilder of(final InventoryEntryQua builder.newQuantityOnStock = template.getNewQuantityOnStock(); builder.oldAvailableQuantity = template.getOldAvailableQuantity(); builder.newAvailableQuantity = template.getNewAvailableQuantity(); + builder.sku = template.getSku(); builder.supplyChannel = template.getSupplyChannel(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageImpl.java index e873f89a1fc..1f1a3b63b4f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageImpl.java @@ -52,6 +52,8 @@ public class InventoryEntryQuantitySetMessageImpl implements InventoryEntryQuant private Long newAvailableQuantity; + private String sku; + private com.commercetools.api.models.channel.ChannelReference supplyChannel; /** @@ -72,6 +74,7 @@ public class InventoryEntryQuantitySetMessageImpl implements InventoryEntryQuant @JsonProperty("newQuantityOnStock") final Long newQuantityOnStock, @JsonProperty("oldAvailableQuantity") final Long oldAvailableQuantity, @JsonProperty("newAvailableQuantity") final Long newAvailableQuantity, + @JsonProperty("sku") final String sku, @JsonProperty("supplyChannel") final com.commercetools.api.models.channel.ChannelReference supplyChannel) { this.id = id; this.version = version; @@ -87,6 +90,7 @@ public class InventoryEntryQuantitySetMessageImpl implements InventoryEntryQuant this.newQuantityOnStock = newQuantityOnStock; this.oldAvailableQuantity = oldAvailableQuantity; this.newAvailableQuantity = newAvailableQuantity; + this.sku = sku; this.supplyChannel = supplyChannel; this.type = INVENTORY_ENTRY_QUANTITY_SET; } @@ -218,6 +222,14 @@ public Long getNewAvailableQuantity() { return this.newAvailableQuantity; } + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ */ + + public String getSku() { + return this.sku; + } + /** *

Reference to the Channel where the InventoryEntry quantity was set.

*/ @@ -283,6 +295,10 @@ public void setNewAvailableQuantity(final Long newAvailableQuantity) { this.newAvailableQuantity = newAvailableQuantity; } + public void setSku(final String sku) { + this.sku = sku; + } + public void setSupplyChannel(final com.commercetools.api.models.channel.ChannelReference supplyChannel) { this.supplyChannel = supplyChannel; } @@ -312,6 +328,7 @@ public boolean equals(Object o) { .append(newQuantityOnStock, that.newQuantityOnStock) .append(oldAvailableQuantity, that.oldAvailableQuantity) .append(newAvailableQuantity, that.newAvailableQuantity) + .append(sku, that.sku) .append(supplyChannel, that.supplyChannel) .append(id, that.id) .append(version, that.version) @@ -328,6 +345,7 @@ public boolean equals(Object o) { .append(newQuantityOnStock, that.newQuantityOnStock) .append(oldAvailableQuantity, that.oldAvailableQuantity) .append(newAvailableQuantity, that.newAvailableQuantity) + .append(sku, that.sku) .append(supplyChannel, that.supplyChannel) .isEquals(); } @@ -349,6 +367,7 @@ public int hashCode() { .append(newQuantityOnStock) .append(oldAvailableQuantity) .append(newAvailableQuantity) + .append(sku) .append(supplyChannel) .toHashCode(); } @@ -370,6 +389,7 @@ public String toString() { .append("newQuantityOnStock", newQuantityOnStock) .append("oldAvailableQuantity", oldAvailableQuantity) .append("newAvailableQuantity", newAvailableQuantity) + .append("sku", sku) .append("supplyChannel", supplyChannel) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayload.java index c9e0dcb0a5b..8efd6116f9e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayload.java @@ -74,6 +74,14 @@ public interface InventoryEntryQuantitySetMessagePayload extends MessagePayload @JsonProperty("newAvailableQuantity") public Long getNewAvailableQuantity(); + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ * @return sku + */ + + @JsonProperty("sku") + public String getSku(); + /** *

Reference to the Channel where the InventoryEntry quantity was set.

* @return supplyChannel @@ -110,6 +118,13 @@ public interface InventoryEntryQuantitySetMessagePayload extends MessagePayload public void setNewAvailableQuantity(final Long newAvailableQuantity); + /** + *

SKU of the InventoryEntry for which the quantity was updated.

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

Reference to the Channel where the InventoryEntry quantity was set.

* @param supplyChannel value to be set @@ -136,6 +151,7 @@ public static InventoryEntryQuantitySetMessagePayload of(final InventoryEntryQua instance.setNewQuantityOnStock(template.getNewQuantityOnStock()); instance.setOldAvailableQuantity(template.getOldAvailableQuantity()); instance.setNewAvailableQuantity(template.getNewAvailableQuantity()); + instance.setSku(template.getSku()); instance.setSupplyChannel(template.getSupplyChannel()); return instance; } @@ -158,6 +174,7 @@ public static InventoryEntryQuantitySetMessagePayload deepCopy( instance.setNewQuantityOnStock(template.getNewQuantityOnStock()); instance.setOldAvailableQuantity(template.getOldAvailableQuantity()); instance.setNewAvailableQuantity(template.getNewAvailableQuantity()); + instance.setSku(template.getSku()); instance.setSupplyChannel( com.commercetools.api.models.channel.ChannelReference.deepCopy(template.getSupplyChannel())); return instance; diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadBuilder.java index 3bcc4ae05ab..cfb74ddfe34 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadBuilder.java @@ -36,6 +36,9 @@ public class InventoryEntryQuantitySetMessagePayloadBuilder private Long newAvailableQuantity; + @Nullable + private String sku; + @Nullable private com.commercetools.api.models.channel.ChannelReference supplyChannel; @@ -83,6 +86,17 @@ public InventoryEntryQuantitySetMessagePayloadBuilder newAvailableQuantity(final return this; } + /** + *

SKU of the InventoryEntry for which the quantity was updated.

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

Reference to the Channel where the InventoryEntry quantity was set.

* @param builder function to build the supplyChannel value @@ -155,6 +169,16 @@ public Long getNewAvailableQuantity() { return this.newAvailableQuantity; } + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ * @return sku + */ + + @Nullable + public String getSku() { + return this.sku; + } + /** *

Reference to the Channel where the InventoryEntry quantity was set.

* @return supplyChannel @@ -179,7 +203,7 @@ public InventoryEntryQuantitySetMessagePayload build() { Objects.requireNonNull(newAvailableQuantity, InventoryEntryQuantitySetMessagePayload.class + ": newAvailableQuantity is missing"); return new InventoryEntryQuantitySetMessagePayloadImpl(oldQuantityOnStock, newQuantityOnStock, - oldAvailableQuantity, newAvailableQuantity, supplyChannel); + oldAvailableQuantity, newAvailableQuantity, sku, supplyChannel); } /** @@ -188,7 +212,7 @@ public InventoryEntryQuantitySetMessagePayload build() { */ public InventoryEntryQuantitySetMessagePayload buildUnchecked() { return new InventoryEntryQuantitySetMessagePayloadImpl(oldQuantityOnStock, newQuantityOnStock, - oldAvailableQuantity, newAvailableQuantity, supplyChannel); + oldAvailableQuantity, newAvailableQuantity, sku, supplyChannel); } /** @@ -211,6 +235,7 @@ public static InventoryEntryQuantitySetMessagePayloadBuilder of( builder.newQuantityOnStock = template.getNewQuantityOnStock(); builder.oldAvailableQuantity = template.getOldAvailableQuantity(); builder.newAvailableQuantity = template.getNewAvailableQuantity(); + builder.sku = template.getSku(); builder.supplyChannel = template.getSupplyChannel(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadImpl.java index 02a5f9a6473..ad4f51a3a0a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadImpl.java @@ -32,6 +32,8 @@ public class InventoryEntryQuantitySetMessagePayloadImpl implements InventoryEnt private Long newAvailableQuantity; + private String sku; + private com.commercetools.api.models.channel.ChannelReference supplyChannel; /** @@ -42,11 +44,13 @@ public class InventoryEntryQuantitySetMessagePayloadImpl implements InventoryEnt @JsonProperty("newQuantityOnStock") final Long newQuantityOnStock, @JsonProperty("oldAvailableQuantity") final Long oldAvailableQuantity, @JsonProperty("newAvailableQuantity") final Long newAvailableQuantity, + @JsonProperty("sku") final String sku, @JsonProperty("supplyChannel") final com.commercetools.api.models.channel.ChannelReference supplyChannel) { this.oldQuantityOnStock = oldQuantityOnStock; this.newQuantityOnStock = newQuantityOnStock; this.oldAvailableQuantity = oldAvailableQuantity; this.newAvailableQuantity = newAvailableQuantity; + this.sku = sku; this.supplyChannel = supplyChannel; this.type = INVENTORY_ENTRY_QUANTITY_SET; } @@ -98,6 +102,14 @@ public Long getNewAvailableQuantity() { return this.newAvailableQuantity; } + /** + *

SKU of the InventoryEntry for which the quantity was updated.

+ */ + + public String getSku() { + return this.sku; + } + /** *

Reference to the Channel where the InventoryEntry quantity was set.

*/ @@ -122,6 +134,10 @@ public void setNewAvailableQuantity(final Long newAvailableQuantity) { this.newAvailableQuantity = newAvailableQuantity; } + public void setSku(final String sku) { + this.sku = sku; + } + public void setSupplyChannel(final com.commercetools.api.models.channel.ChannelReference supplyChannel) { this.supplyChannel = supplyChannel; } @@ -141,12 +157,14 @@ public boolean equals(Object o) { .append(newQuantityOnStock, that.newQuantityOnStock) .append(oldAvailableQuantity, that.oldAvailableQuantity) .append(newAvailableQuantity, that.newAvailableQuantity) + .append(sku, that.sku) .append(supplyChannel, that.supplyChannel) .append(type, that.type) .append(oldQuantityOnStock, that.oldQuantityOnStock) .append(newQuantityOnStock, that.newQuantityOnStock) .append(oldAvailableQuantity, that.oldAvailableQuantity) .append(newAvailableQuantity, that.newAvailableQuantity) + .append(sku, that.sku) .append(supplyChannel, that.supplyChannel) .isEquals(); } @@ -158,6 +176,7 @@ public int hashCode() { .append(newQuantityOnStock) .append(oldAvailableQuantity) .append(newAvailableQuantity) + .append(sku) .append(supplyChannel) .toHashCode(); } @@ -169,6 +188,7 @@ public String toString() { .append("newQuantityOnStock", newQuantityOnStock) .append("oldAvailableQuantity", oldAvailableQuantity) .append("newAvailableQuantity", newAvailableQuantity) + .append("sku", sku) .append("supplyChannel", supplyChannel) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java index 3722b35a36f..4de63a9e56e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java @@ -725,6 +725,22 @@ public static com.commercetools.api.models.message.CartDiscountStoresSetMessageB return com.commercetools.api.models.message.CartDiscountStoresSetMessageBuilder.of(); } + /** + * builder for cartFrozen subtype + * @return builder + */ + public static com.commercetools.api.models.message.CartFrozenMessageBuilder cartFrozenBuilder() { + return com.commercetools.api.models.message.CartFrozenMessageBuilder.of(); + } + + /** + * builder for cartUnfrozen subtype + * @return builder + */ + public static com.commercetools.api.models.message.CartUnfrozenMessageBuilder cartUnfrozenBuilder() { + return com.commercetools.api.models.message.CartUnfrozenMessageBuilder.of(); + } + /** * builder for categoryCreated subtype * @return builder @@ -1429,6 +1445,14 @@ public static com.commercetools.api.models.message.OrderPaymentAddedMessageBuild return com.commercetools.api.models.message.OrderPaymentAddedMessageBuilder.of(); } + /** + * builder for orderPaymentRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.OrderPaymentRemovedMessageBuilder orderPaymentRemovedBuilder() { + return com.commercetools.api.models.message.OrderPaymentRemovedMessageBuilder.of(); + } + /** * builder for orderPaymentStateChanged subtype * @return builder @@ -2301,6 +2325,14 @@ public static com.commercetools.api.models.message.RecurringOrderExpiresAtSetMes return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder.of(); } + /** + * builder for recurringOrderFailed subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderFailedMessageBuilder recurringOrderFailedBuilder() { + return com.commercetools.api.models.message.RecurringOrderFailedMessageBuilder.of(); + } + /** * builder for recurringOrderKeySet subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java index cce0d9b8a32..9fc539b7e10 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java @@ -255,6 +255,14 @@ public com.commercetools.api.models.message.CartDiscountStoresSetMessageBuilder return com.commercetools.api.models.message.CartDiscountStoresSetMessageBuilder.of(); } + public com.commercetools.api.models.message.CartFrozenMessageBuilder cartFrozenBuilder() { + return com.commercetools.api.models.message.CartFrozenMessageBuilder.of(); + } + + public com.commercetools.api.models.message.CartUnfrozenMessageBuilder cartUnfrozenBuilder() { + return com.commercetools.api.models.message.CartUnfrozenMessageBuilder.of(); + } + public com.commercetools.api.models.message.CategoryCreatedMessageBuilder categoryCreatedBuilder() { return com.commercetools.api.models.message.CategoryCreatedMessageBuilder.of(); } @@ -607,6 +615,10 @@ public com.commercetools.api.models.message.OrderPaymentAddedMessageBuilder orde return com.commercetools.api.models.message.OrderPaymentAddedMessageBuilder.of(); } + public com.commercetools.api.models.message.OrderPaymentRemovedMessageBuilder orderPaymentRemovedBuilder() { + return com.commercetools.api.models.message.OrderPaymentRemovedMessageBuilder.of(); + } + public com.commercetools.api.models.message.OrderPaymentStateChangedMessageBuilder orderPaymentStateChangedBuilder() { return com.commercetools.api.models.message.OrderPaymentStateChangedMessageBuilder.of(); } @@ -1043,6 +1055,10 @@ public com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBui return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder.of(); } + public com.commercetools.api.models.message.RecurringOrderFailedMessageBuilder recurringOrderFailedBuilder() { + return com.commercetools.api.models.message.RecurringOrderFailedMessageBuilder.of(); + } + public com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder recurringOrderKeySetBuilder() { return com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java index a040ebe1dd6..e31a6795fe7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java @@ -549,6 +549,22 @@ public static com.commercetools.api.models.message.CartDiscountStoresSetMessageP return com.commercetools.api.models.message.CartDiscountStoresSetMessagePayloadBuilder.of(); } + /** + * builder for cartFrozen subtype + * @return builder + */ + public static com.commercetools.api.models.message.CartFrozenMessagePayloadBuilder cartFrozenBuilder() { + return com.commercetools.api.models.message.CartFrozenMessagePayloadBuilder.of(); + } + + /** + * builder for cartUnfrozen subtype + * @return builder + */ + public static com.commercetools.api.models.message.CartUnfrozenMessagePayloadBuilder cartUnfrozenBuilder() { + return com.commercetools.api.models.message.CartUnfrozenMessagePayloadBuilder.of(); + } + /** * builder for categoryCreated subtype * @return builder @@ -1253,6 +1269,14 @@ public static com.commercetools.api.models.message.OrderPaymentAddedMessagePaylo return com.commercetools.api.models.message.OrderPaymentAddedMessagePayloadBuilder.of(); } + /** + * builder for orderPaymentRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.OrderPaymentRemovedMessagePayloadBuilder orderPaymentRemovedBuilder() { + return com.commercetools.api.models.message.OrderPaymentRemovedMessagePayloadBuilder.of(); + } + /** * builder for orderPaymentStateChanged subtype * @return builder @@ -2125,6 +2149,14 @@ public static com.commercetools.api.models.message.RecurringOrderExpiresAtSetMes return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder.of(); } + /** + * builder for recurringOrderFailed subtype + * @return builder + */ + public static com.commercetools.api.models.message.RecurringOrderFailedMessagePayloadBuilder recurringOrderFailedBuilder() { + return com.commercetools.api.models.message.RecurringOrderFailedMessagePayloadBuilder.of(); + } + /** * builder for recurringOrderKeySet subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java index e54ffe3b736..d7956416d3d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java @@ -255,6 +255,14 @@ public com.commercetools.api.models.message.CartDiscountStoresSetMessagePayloadB return com.commercetools.api.models.message.CartDiscountStoresSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.CartFrozenMessagePayloadBuilder cartFrozenBuilder() { + return com.commercetools.api.models.message.CartFrozenMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.CartUnfrozenMessagePayloadBuilder cartUnfrozenBuilder() { + return com.commercetools.api.models.message.CartUnfrozenMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.CategoryCreatedMessagePayloadBuilder categoryCreatedBuilder() { return com.commercetools.api.models.message.CategoryCreatedMessagePayloadBuilder.of(); } @@ -607,6 +615,10 @@ public com.commercetools.api.models.message.OrderPaymentAddedMessagePayloadBuild return com.commercetools.api.models.message.OrderPaymentAddedMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.OrderPaymentRemovedMessagePayloadBuilder orderPaymentRemovedBuilder() { + return com.commercetools.api.models.message.OrderPaymentRemovedMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.OrderPaymentStateChangedMessagePayloadBuilder orderPaymentStateChangedBuilder() { return com.commercetools.api.models.message.OrderPaymentStateChangedMessagePayloadBuilder.of(); } @@ -1043,6 +1055,10 @@ public com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePay return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.RecurringOrderFailedMessagePayloadBuilder recurringOrderFailedBuilder() { + return com.commercetools.api.models.message.RecurringOrderFailedMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder recurringOrderKeySetBuilder() { return com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessage.java index 3770fe66d88..4ef55f64a1e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessage.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessage.java @@ -31,7 +31,7 @@ * .sequenceNumber(0.3) * .resource(resourceBuilder -> resourceBuilder) * .resourceVersion(0.3) - * .payment(paymentBuilder -> paymentBuilder) + * .paymentRef(paymentRefBuilder -> paymentRefBuilder) * .build() * * @@ -48,19 +48,19 @@ public interface OrderPaymentAddedMessage extends Message { /** *

Payment that was added to the Order.

- * @return payment + * @return paymentRef */ @NotNull @Valid - @JsonProperty("payment") - public PaymentReference getPayment(); + @JsonProperty("paymentRef") + public PaymentReference getPaymentRef(); /** *

Payment that was added to the Order.

- * @param payment value to be set + * @param paymentRef value to be set */ - public void setPayment(final PaymentReference payment); + public void setPaymentRef(final PaymentReference paymentRef); /** * factory method @@ -87,7 +87,7 @@ public static OrderPaymentAddedMessage of(final OrderPaymentAddedMessage templat instance.setResource(template.getResource()); instance.setResourceVersion(template.getResourceVersion()); instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); - instance.setPayment(template.getPayment()); + instance.setPaymentRef(template.getPaymentRef()); return instance; } @@ -116,7 +116,8 @@ public static OrderPaymentAddedMessage deepCopy(@Nullable final OrderPaymentAdde instance.setResourceVersion(template.getResourceVersion()); instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers .deepCopy(template.getResourceUserProvidedIdentifiers())); - instance.setPayment(com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPayment())); + instance.setPaymentRef( + com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPaymentRef())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageBuilder.java index ef85164b01d..8f740295ec7 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageBuilder.java @@ -23,7 +23,7 @@ * .sequenceNumber(0.3) * .resource(resourceBuilder -> resourceBuilder) * .resourceVersion(0.3) - * .payment(paymentBuilder -> paymentBuilder) + * .paymentRef(paymentRefBuilder -> paymentRefBuilder) * .build() * * @@ -54,7 +54,7 @@ public class OrderPaymentAddedMessageBuilder implements BuilderUnique identifier of the Message. Can be used to track which Messages have been processed.

@@ -258,37 +258,37 @@ public OrderPaymentAddedMessageBuilder resourceUserProvidedIdentifiers( /** *

Payment that was added to the Order.

- * @param builder function to build the payment value + * @param builder function to build the paymentRef value * @return Builder */ - public OrderPaymentAddedMessageBuilder payment( + public OrderPaymentAddedMessageBuilder paymentRef( Function builder) { - this.payment = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); return this; } /** *

Payment that was added to the Order.

- * @param builder function to build the payment value + * @param builder function to build the paymentRef value * @return Builder */ - public OrderPaymentAddedMessageBuilder withPayment( + public OrderPaymentAddedMessageBuilder withPaymentRef( Function builder) { - this.payment = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); return this; } /** *

Payment that was added to the Order.

- * @param payment value to be set + * @param paymentRef value to be set * @return Builder */ - public OrderPaymentAddedMessageBuilder payment( - final com.commercetools.api.models.payment.PaymentReference payment) { - this.payment = payment; + public OrderPaymentAddedMessageBuilder paymentRef( + final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; return this; } @@ -387,11 +387,11 @@ public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceU /** *

Payment that was added to the Order.

- * @return payment + * @return paymentRef */ - public com.commercetools.api.models.payment.PaymentReference getPayment() { - return this.payment; + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; } /** @@ -406,9 +406,9 @@ public OrderPaymentAddedMessage build() { Objects.requireNonNull(sequenceNumber, OrderPaymentAddedMessage.class + ": sequenceNumber is missing"); Objects.requireNonNull(resource, OrderPaymentAddedMessage.class + ": resource is missing"); Objects.requireNonNull(resourceVersion, OrderPaymentAddedMessage.class + ": resourceVersion is missing"); - Objects.requireNonNull(payment, OrderPaymentAddedMessage.class + ": payment is missing"); + Objects.requireNonNull(paymentRef, OrderPaymentAddedMessage.class + ": paymentRef is missing"); return new OrderPaymentAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, - sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, payment); + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, paymentRef); } /** @@ -417,7 +417,7 @@ public OrderPaymentAddedMessage build() { */ public OrderPaymentAddedMessage buildUnchecked() { return new OrderPaymentAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, - sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, payment); + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, paymentRef); } /** @@ -445,7 +445,7 @@ public static OrderPaymentAddedMessageBuilder of(final OrderPaymentAddedMessage builder.resource = template.getResource(); builder.resourceVersion = template.getResourceVersion(); builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); - builder.payment = template.getPayment(); + builder.paymentRef = template.getPaymentRef(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageImpl.java index 4fe597a18b9..c80b532d932 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageImpl.java @@ -44,7 +44,7 @@ public class OrderPaymentAddedMessageImpl implements OrderPaymentAddedMessage, M private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; - private com.commercetools.api.models.payment.PaymentReference payment; + private com.commercetools.api.models.payment.PaymentReference paymentRef; /** * create instance with all properties @@ -59,7 +59,7 @@ public class OrderPaymentAddedMessageImpl implements OrderPaymentAddedMessage, M @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, @JsonProperty("resourceVersion") final Long resourceVersion, @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, - @JsonProperty("payment") final com.commercetools.api.models.payment.PaymentReference payment) { + @JsonProperty("paymentRef") final com.commercetools.api.models.payment.PaymentReference paymentRef) { this.id = id; this.version = version; this.createdAt = createdAt; @@ -70,7 +70,7 @@ public class OrderPaymentAddedMessageImpl implements OrderPaymentAddedMessage, M this.resource = resource; this.resourceVersion = resourceVersion; this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; - this.payment = payment; + this.paymentRef = paymentRef; this.type = ORDER_PAYMENT_ADDED; } @@ -173,8 +173,8 @@ public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceU *

Payment that was added to the Order.

*/ - public com.commercetools.api.models.payment.PaymentReference getPayment() { - return this.payment; + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; } public void setId(final String id) { @@ -218,8 +218,8 @@ public void setResourceUserProvidedIdentifiers( this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; } - public void setPayment(final com.commercetools.api.models.payment.PaymentReference payment) { - this.payment = payment; + public void setPaymentRef(final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; } @Override @@ -243,7 +243,7 @@ public boolean equals(Object o) { .append(resourceVersion, that.resourceVersion) .append(type, that.type) .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) - .append(payment, that.payment) + .append(paymentRef, that.paymentRef) .append(id, that.id) .append(version, that.version) .append(createdAt, that.createdAt) @@ -255,7 +255,7 @@ public boolean equals(Object o) { .append(resourceVersion, that.resourceVersion) .append(type, that.type) .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) - .append(payment, that.payment) + .append(paymentRef, that.paymentRef) .isEquals(); } @@ -272,7 +272,7 @@ public int hashCode() { .append(resourceVersion) .append(type) .append(resourceUserProvidedIdentifiers) - .append(payment) + .append(paymentRef) .toHashCode(); } @@ -289,7 +289,7 @@ public String toString() { .append("resourceVersion", resourceVersion) .append("type", type) .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) - .append("payment", payment) + .append("paymentRef", paymentRef) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayload.java index d646a1fa534..4409e7dc365 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayload.java @@ -24,7 +24,7 @@ *
*

  *     OrderPaymentAddedMessagePayload orderPaymentAddedMessagePayload = OrderPaymentAddedMessagePayload.builder()
- *             .payment(paymentBuilder -> paymentBuilder)
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
  *             .build()
  * 
*
@@ -41,19 +41,19 @@ public interface OrderPaymentAddedMessagePayload extends MessagePayload { /** *

Payment that was added to the Order.

- * @return payment + * @return paymentRef */ @NotNull @Valid - @JsonProperty("payment") - public PaymentReference getPayment(); + @JsonProperty("paymentRef") + public PaymentReference getPaymentRef(); /** *

Payment that was added to the Order.

- * @param payment value to be set + * @param paymentRef value to be set */ - public void setPayment(final PaymentReference payment); + public void setPaymentRef(final PaymentReference paymentRef); /** * factory method @@ -70,7 +70,7 @@ public static OrderPaymentAddedMessagePayload of() { */ public static OrderPaymentAddedMessagePayload of(final OrderPaymentAddedMessagePayload template) { OrderPaymentAddedMessagePayloadImpl instance = new OrderPaymentAddedMessagePayloadImpl(); - instance.setPayment(template.getPayment()); + instance.setPaymentRef(template.getPaymentRef()); return instance; } @@ -87,7 +87,8 @@ public static OrderPaymentAddedMessagePayload deepCopy(@Nullable final OrderPaym return null; } OrderPaymentAddedMessagePayloadImpl instance = new OrderPaymentAddedMessagePayloadImpl(); - instance.setPayment(com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPayment())); + instance.setPaymentRef( + com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPaymentRef())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadBuilder.java index deaaf232f60..b3b84d55593 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadBuilder.java @@ -14,7 +14,7 @@ *
*

  *     OrderPaymentAddedMessagePayload orderPaymentAddedMessagePayload = OrderPaymentAddedMessagePayload.builder()
- *             .payment(paymentBuilder -> paymentBuilder)
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
  *             .build()
  * 
*
@@ -22,51 +22,51 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class OrderPaymentAddedMessagePayloadBuilder implements Builder { - private com.commercetools.api.models.payment.PaymentReference payment; + private com.commercetools.api.models.payment.PaymentReference paymentRef; /** *

Payment that was added to the Order.

- * @param builder function to build the payment value + * @param builder function to build the paymentRef value * @return Builder */ - public OrderPaymentAddedMessagePayloadBuilder payment( + public OrderPaymentAddedMessagePayloadBuilder paymentRef( Function builder) { - this.payment = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); return this; } /** *

Payment that was added to the Order.

- * @param builder function to build the payment value + * @param builder function to build the paymentRef value * @return Builder */ - public OrderPaymentAddedMessagePayloadBuilder withPayment( + public OrderPaymentAddedMessagePayloadBuilder withPaymentRef( Function builder) { - this.payment = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); return this; } /** *

Payment that was added to the Order.

- * @param payment value to be set + * @param paymentRef value to be set * @return Builder */ - public OrderPaymentAddedMessagePayloadBuilder payment( - final com.commercetools.api.models.payment.PaymentReference payment) { - this.payment = payment; + public OrderPaymentAddedMessagePayloadBuilder paymentRef( + final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; return this; } /** *

Payment that was added to the Order.

- * @return payment + * @return paymentRef */ - public com.commercetools.api.models.payment.PaymentReference getPayment() { - return this.payment; + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; } /** @@ -74,8 +74,8 @@ public com.commercetools.api.models.payment.PaymentReference getPayment() { * @return OrderPaymentAddedMessagePayload */ public OrderPaymentAddedMessagePayload build() { - Objects.requireNonNull(payment, OrderPaymentAddedMessagePayload.class + ": payment is missing"); - return new OrderPaymentAddedMessagePayloadImpl(payment); + Objects.requireNonNull(paymentRef, OrderPaymentAddedMessagePayload.class + ": paymentRef is missing"); + return new OrderPaymentAddedMessagePayloadImpl(paymentRef); } /** @@ -83,7 +83,7 @@ public OrderPaymentAddedMessagePayload build() { * @return OrderPaymentAddedMessagePayload */ public OrderPaymentAddedMessagePayload buildUnchecked() { - return new OrderPaymentAddedMessagePayloadImpl(payment); + return new OrderPaymentAddedMessagePayloadImpl(paymentRef); } /** @@ -101,7 +101,7 @@ public static OrderPaymentAddedMessagePayloadBuilder of() { */ public static OrderPaymentAddedMessagePayloadBuilder of(final OrderPaymentAddedMessagePayload template) { OrderPaymentAddedMessagePayloadBuilder builder = new OrderPaymentAddedMessagePayloadBuilder(); - builder.payment = template.getPayment(); + builder.paymentRef = template.getPaymentRef(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadImpl.java index b3fcda8adf6..815f5e422a9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadImpl.java @@ -24,15 +24,15 @@ public class OrderPaymentAddedMessagePayloadImpl implements OrderPaymentAddedMes private String type; - private com.commercetools.api.models.payment.PaymentReference payment; + private com.commercetools.api.models.payment.PaymentReference paymentRef; /** * create instance with all properties */ @JsonCreator OrderPaymentAddedMessagePayloadImpl( - @JsonProperty("payment") final com.commercetools.api.models.payment.PaymentReference payment) { - this.payment = payment; + @JsonProperty("paymentRef") final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; this.type = ORDER_PAYMENT_ADDED; } @@ -55,12 +55,12 @@ public String getType() { *

Payment that was added to the Order.

*/ - public com.commercetools.api.models.payment.PaymentReference getPayment() { - return this.payment; + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; } - public void setPayment(final com.commercetools.api.models.payment.PaymentReference payment) { - this.payment = payment; + public void setPaymentRef(final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; } @Override @@ -74,21 +74,21 @@ public boolean equals(Object o) { OrderPaymentAddedMessagePayloadImpl that = (OrderPaymentAddedMessagePayloadImpl) o; return new EqualsBuilder().append(type, that.type) - .append(payment, that.payment) + .append(paymentRef, that.paymentRef) .append(type, that.type) - .append(payment, that.payment) + .append(paymentRef, that.paymentRef) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(payment).toHashCode(); + return new HashCodeBuilder(17, 37).append(type).append(paymentRef).toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) - .append("payment", payment) + .append("paymentRef", paymentRef) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessage.java new file mode 100644 index 00000000000..126e551fe68 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessage.java @@ -0,0 +1,181 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.payment.PaymentReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Remove Payment update action or when a Payment is removed via Order Edits.

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

+ *     OrderPaymentRemovedMessage orderPaymentRemovedMessage = OrderPaymentRemovedMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
+ *             .removedPaymentInfo(true)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("OrderPaymentRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderPaymentRemovedMessageImpl.class) +public interface OrderPaymentRemovedMessage extends Message { + + /** + * discriminator value for OrderPaymentRemovedMessage + */ + String ORDER_PAYMENT_REMOVED = "OrderPaymentRemoved"; + + /** + *

Payment that was removed from the Order.

+ * @return paymentRef + */ + @NotNull + @Valid + @JsonProperty("paymentRef") + public PaymentReference getPaymentRef(); + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @return removedPaymentInfo + */ + @NotNull + @JsonProperty("removedPaymentInfo") + public Boolean getRemovedPaymentInfo(); + + /** + *

Payment that was removed from the Order.

+ * @param paymentRef value to be set + */ + + public void setPaymentRef(final PaymentReference paymentRef); + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @param removedPaymentInfo value to be set + */ + + public void setRemovedPaymentInfo(final Boolean removedPaymentInfo); + + /** + * factory method + * @return instance of OrderPaymentRemovedMessage + */ + public static OrderPaymentRemovedMessage of() { + return new OrderPaymentRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy OrderPaymentRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static OrderPaymentRemovedMessage of(final OrderPaymentRemovedMessage template) { + OrderPaymentRemovedMessageImpl instance = new OrderPaymentRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setPaymentRef(template.getPaymentRef()); + instance.setRemovedPaymentInfo(template.getRemovedPaymentInfo()); + return instance; + } + + public OrderPaymentRemovedMessage copyDeep(); + + /** + * factory method to create a deep copy of OrderPaymentRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderPaymentRemovedMessage deepCopy(@Nullable final OrderPaymentRemovedMessage template) { + if (template == null) { + return null; + } + OrderPaymentRemovedMessageImpl instance = new OrderPaymentRemovedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setPaymentRef( + com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPaymentRef())); + instance.setRemovedPaymentInfo(template.getRemovedPaymentInfo()); + return instance; + } + + /** + * builder factory method for OrderPaymentRemovedMessage + * @return builder + */ + public static OrderPaymentRemovedMessageBuilder builder() { + return OrderPaymentRemovedMessageBuilder.of(); + } + + /** + * create builder for OrderPaymentRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderPaymentRemovedMessageBuilder builder(final OrderPaymentRemovedMessage template) { + return OrderPaymentRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderPaymentRemovedMessage(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/message/OrderPaymentRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageBuilder.java new file mode 100644 index 00000000000..dc0e75ba7b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageBuilder.java @@ -0,0 +1,478 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderPaymentRemovedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderPaymentRemovedMessage orderPaymentRemovedMessage = OrderPaymentRemovedMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
+ *             .removedPaymentInfo(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderPaymentRemovedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.payment.PaymentReference paymentRef; + + private Boolean removedPaymentInfo; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

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

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

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

Reference to the resource on which the change or action was performed.

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

Reference to the resource on which the change or action was performed.

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

Version of the resource on which the change or action was performed.

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

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

Payment that was removed from the Order.

+ * @param builder function to build the paymentRef value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder paymentRef( + Function builder) { + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Payment that was removed from the Order.

+ * @param builder function to build the paymentRef value + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder withPaymentRef( + Function builder) { + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Payment that was removed from the Order.

+ * @param paymentRef value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessageBuilder paymentRef( + final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; + return this; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

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

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Payment that was removed from the Order.

+ * @return paymentRef + */ + + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @return removedPaymentInfo + */ + + public Boolean getRemovedPaymentInfo() { + return this.removedPaymentInfo; + } + + /** + * builds OrderPaymentRemovedMessage with checking for non-null required values + * @return OrderPaymentRemovedMessage + */ + public OrderPaymentRemovedMessage build() { + Objects.requireNonNull(id, OrderPaymentRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, OrderPaymentRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, OrderPaymentRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, OrderPaymentRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, OrderPaymentRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, OrderPaymentRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, OrderPaymentRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(paymentRef, OrderPaymentRemovedMessage.class + ": paymentRef is missing"); + Objects.requireNonNull(removedPaymentInfo, + OrderPaymentRemovedMessage.class + ": removedPaymentInfo is missing"); + return new OrderPaymentRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, paymentRef, removedPaymentInfo); + } + + /** + * builds OrderPaymentRemovedMessage without checking for non-null required values + * @return OrderPaymentRemovedMessage + */ + public OrderPaymentRemovedMessage buildUnchecked() { + return new OrderPaymentRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, paymentRef, removedPaymentInfo); + } + + /** + * factory method for an instance of OrderPaymentRemovedMessageBuilder + * @return builder + */ + public static OrderPaymentRemovedMessageBuilder of() { + return new OrderPaymentRemovedMessageBuilder(); + } + + /** + * create builder for OrderPaymentRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderPaymentRemovedMessageBuilder of(final OrderPaymentRemovedMessage template) { + OrderPaymentRemovedMessageBuilder builder = new OrderPaymentRemovedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.paymentRef = template.getPaymentRef(); + builder.removedPaymentInfo = template.getRemovedPaymentInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageImpl.java new file mode 100644 index 00000000000..8615e23b399 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageImpl.java @@ -0,0 +1,320 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Remove Payment update action or when a Payment is removed via Order Edits.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderPaymentRemovedMessageImpl implements OrderPaymentRemovedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.payment.PaymentReference paymentRef; + + private Boolean removedPaymentInfo; + + /** + * create instance with all properties + */ + @JsonCreator + OrderPaymentRemovedMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("paymentRef") final com.commercetools.api.models.payment.PaymentReference paymentRef, + @JsonProperty("removedPaymentInfo") final Boolean removedPaymentInfo) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.paymentRef = paymentRef; + this.removedPaymentInfo = removedPaymentInfo; + this.type = ORDER_PAYMENT_REMOVED; + } + + /** + * create empty instance + */ + public OrderPaymentRemovedMessageImpl() { + this.type = ORDER_PAYMENT_REMOVED; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

Message Type of the Message.

+ */ + + public String getType() { + return this.type; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

Payment that was removed from the Order.

+ */ + + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ */ + + public Boolean getRemovedPaymentInfo() { + return this.removedPaymentInfo; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setPaymentRef(final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; + } + + public void setRemovedPaymentInfo(final Boolean removedPaymentInfo) { + this.removedPaymentInfo = removedPaymentInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderPaymentRemovedMessageImpl that = (OrderPaymentRemovedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(paymentRef, that.paymentRef) + .append(removedPaymentInfo, that.removedPaymentInfo) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(paymentRef, that.paymentRef) + .append(removedPaymentInfo, that.removedPaymentInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(paymentRef) + .append(removedPaymentInfo) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("paymentRef", paymentRef) + .append("removedPaymentInfo", removedPaymentInfo) + .build(); + } + + @Override + public OrderPaymentRemovedMessage copyDeep() { + return OrderPaymentRemovedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayload.java new file mode 100644 index 00000000000..16cbd7509c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayload.java @@ -0,0 +1,153 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.payment.PaymentReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Remove Payment update action or when a Payment is removed via Order Edits.

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

+ *     OrderPaymentRemovedMessagePayload orderPaymentRemovedMessagePayload = OrderPaymentRemovedMessagePayload.builder()
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
+ *             .removedPaymentInfo(true)
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("OrderPaymentRemoved") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = OrderPaymentRemovedMessagePayloadImpl.class) +public interface OrderPaymentRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for OrderPaymentRemovedMessagePayload + */ + String ORDER_PAYMENT_REMOVED = "OrderPaymentRemoved"; + + /** + *

Payment that was removed from the Order.

+ * @return paymentRef + */ + @NotNull + @Valid + @JsonProperty("paymentRef") + public PaymentReference getPaymentRef(); + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @return removedPaymentInfo + */ + @NotNull + @JsonProperty("removedPaymentInfo") + public Boolean getRemovedPaymentInfo(); + + /** + *

Payment that was removed from the Order.

+ * @param paymentRef value to be set + */ + + public void setPaymentRef(final PaymentReference paymentRef); + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @param removedPaymentInfo value to be set + */ + + public void setRemovedPaymentInfo(final Boolean removedPaymentInfo); + + /** + * factory method + * @return instance of OrderPaymentRemovedMessagePayload + */ + public static OrderPaymentRemovedMessagePayload of() { + return new OrderPaymentRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy OrderPaymentRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static OrderPaymentRemovedMessagePayload of(final OrderPaymentRemovedMessagePayload template) { + OrderPaymentRemovedMessagePayloadImpl instance = new OrderPaymentRemovedMessagePayloadImpl(); + instance.setPaymentRef(template.getPaymentRef()); + instance.setRemovedPaymentInfo(template.getRemovedPaymentInfo()); + return instance; + } + + public OrderPaymentRemovedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of OrderPaymentRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static OrderPaymentRemovedMessagePayload deepCopy( + @Nullable final OrderPaymentRemovedMessagePayload template) { + if (template == null) { + return null; + } + OrderPaymentRemovedMessagePayloadImpl instance = new OrderPaymentRemovedMessagePayloadImpl(); + instance.setPaymentRef( + com.commercetools.api.models.payment.PaymentReference.deepCopy(template.getPaymentRef())); + instance.setRemovedPaymentInfo(template.getRemovedPaymentInfo()); + return instance; + } + + /** + * builder factory method for OrderPaymentRemovedMessagePayload + * @return builder + */ + public static OrderPaymentRemovedMessagePayloadBuilder builder() { + return OrderPaymentRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for OrderPaymentRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderPaymentRemovedMessagePayloadBuilder builder(final OrderPaymentRemovedMessagePayload template) { + return OrderPaymentRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withOrderPaymentRemovedMessagePayload(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/message/OrderPaymentRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadBuilder.java new file mode 100644 index 00000000000..1e57caff234 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * OrderPaymentRemovedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     OrderPaymentRemovedMessagePayload orderPaymentRemovedMessagePayload = OrderPaymentRemovedMessagePayload.builder()
+ *             .paymentRef(paymentRefBuilder -> paymentRefBuilder)
+ *             .removedPaymentInfo(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderPaymentRemovedMessagePayloadBuilder implements Builder { + + private com.commercetools.api.models.payment.PaymentReference paymentRef; + + private Boolean removedPaymentInfo; + + /** + *

Payment that was removed from the Order.

+ * @param builder function to build the paymentRef value + * @return Builder + */ + + public OrderPaymentRemovedMessagePayloadBuilder paymentRef( + Function builder) { + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()).build(); + return this; + } + + /** + *

Payment that was removed from the Order.

+ * @param builder function to build the paymentRef value + * @return Builder + */ + + public OrderPaymentRemovedMessagePayloadBuilder withPaymentRef( + Function builder) { + this.paymentRef = builder.apply(com.commercetools.api.models.payment.PaymentReferenceBuilder.of()); + return this; + } + + /** + *

Payment that was removed from the Order.

+ * @param paymentRef value to be set + * @return Builder + */ + + public OrderPaymentRemovedMessagePayloadBuilder paymentRef( + final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; + return this; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

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

Payment that was removed from the Order.

+ * @return paymentRef + */ + + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ * @return removedPaymentInfo + */ + + public Boolean getRemovedPaymentInfo() { + return this.removedPaymentInfo; + } + + /** + * builds OrderPaymentRemovedMessagePayload with checking for non-null required values + * @return OrderPaymentRemovedMessagePayload + */ + public OrderPaymentRemovedMessagePayload build() { + Objects.requireNonNull(paymentRef, OrderPaymentRemovedMessagePayload.class + ": paymentRef is missing"); + Objects.requireNonNull(removedPaymentInfo, + OrderPaymentRemovedMessagePayload.class + ": removedPaymentInfo is missing"); + return new OrderPaymentRemovedMessagePayloadImpl(paymentRef, removedPaymentInfo); + } + + /** + * builds OrderPaymentRemovedMessagePayload without checking for non-null required values + * @return OrderPaymentRemovedMessagePayload + */ + public OrderPaymentRemovedMessagePayload buildUnchecked() { + return new OrderPaymentRemovedMessagePayloadImpl(paymentRef, removedPaymentInfo); + } + + /** + * factory method for an instance of OrderPaymentRemovedMessagePayloadBuilder + * @return builder + */ + public static OrderPaymentRemovedMessagePayloadBuilder of() { + return new OrderPaymentRemovedMessagePayloadBuilder(); + } + + /** + * create builder for OrderPaymentRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static OrderPaymentRemovedMessagePayloadBuilder of(final OrderPaymentRemovedMessagePayload template) { + OrderPaymentRemovedMessagePayloadBuilder builder = new OrderPaymentRemovedMessagePayloadBuilder(); + builder.paymentRef = template.getPaymentRef(); + builder.removedPaymentInfo = template.getRemovedPaymentInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadImpl.java new file mode 100644 index 00000000000..04987e5287c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a successful Remove Payment update action or when a Payment is removed via Order Edits.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class OrderPaymentRemovedMessagePayloadImpl implements OrderPaymentRemovedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.payment.PaymentReference paymentRef; + + private Boolean removedPaymentInfo; + + /** + * create instance with all properties + */ + @JsonCreator + OrderPaymentRemovedMessagePayloadImpl( + @JsonProperty("paymentRef") final com.commercetools.api.models.payment.PaymentReference paymentRef, + @JsonProperty("removedPaymentInfo") final Boolean removedPaymentInfo) { + this.paymentRef = paymentRef; + this.removedPaymentInfo = removedPaymentInfo; + this.type = ORDER_PAYMENT_REMOVED; + } + + /** + * create empty instance + */ + public OrderPaymentRemovedMessagePayloadImpl() { + this.type = ORDER_PAYMENT_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

Payment that was removed from the Order.

+ */ + + public com.commercetools.api.models.payment.PaymentReference getPaymentRef() { + return this.paymentRef; + } + + /** + *

Indicates whether the removal of the Payment resulted in no Payments remaining on the Order. The value is true if all Payments have been removed (none remain), and false if there are still Payments associated with the Order after the removal.

+ */ + + public Boolean getRemovedPaymentInfo() { + return this.removedPaymentInfo; + } + + public void setPaymentRef(final com.commercetools.api.models.payment.PaymentReference paymentRef) { + this.paymentRef = paymentRef; + } + + public void setRemovedPaymentInfo(final Boolean removedPaymentInfo) { + this.removedPaymentInfo = removedPaymentInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + OrderPaymentRemovedMessagePayloadImpl that = (OrderPaymentRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(paymentRef, that.paymentRef) + .append(removedPaymentInfo, that.removedPaymentInfo) + .append(type, that.type) + .append(paymentRef, that.paymentRef) + .append(removedPaymentInfo, that.removedPaymentInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(paymentRef).append(removedPaymentInfo).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("paymentRef", paymentRef) + .append("removedPaymentInfo", removedPaymentInfo) + .build(); + } + + @Override + public OrderPaymentRemovedMessagePayload copyDeep() { + return OrderPaymentRemovedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessage.java new file mode 100644 index 00000000000..364a68dd21d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessage.java @@ -0,0 +1,246 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.error.RecurringOrderFailureError; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a RecurringOrder failed to process an Order.

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

+ *     RecurringOrderFailedMessage recurringOrderFailedMessage = RecurringOrderFailedMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .cartId("{cartId}")
+ *             .failedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .failureReason("{failureReason}")
+ *             .orderScheduledAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderFailed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderFailedMessageImpl.class) +public interface RecurringOrderFailedMessage extends Message { + + /** + * discriminator value for RecurringOrderFailedMessage + */ + String RECURRING_ORDER_FAILED = "RecurringOrderFailed"; + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ * @return cartId + */ + @NotNull + @JsonProperty("cartId") + public String getCartId(); + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ * @return failedAt + */ + @NotNull + @JsonProperty("failedAt") + public ZonedDateTime getFailedAt(); + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ * @return failureReason + */ + @NotNull + @JsonProperty("failureReason") + public String getFailureReason(); + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ * @return orderScheduledAt + */ + @NotNull + @JsonProperty("orderScheduledAt") + public ZonedDateTime getOrderScheduledAt(); + + /** + *

Errors due to which the Order creation failed.

+ * @return errors + */ + @Valid + @JsonProperty("errors") + public List getErrors(); + + /** + *

ID of the Cart used in the failed Order creation attempt.

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

Date and time (UTC) when the Order creation attempt failed.

+ * @param failedAt value to be set + */ + + public void setFailedAt(final ZonedDateTime failedAt); + + /** + *

Description of why the Order creation failed, such as insufficient stock.

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

Date and time (UTC) the Order was scheduled to be created.

+ * @param orderScheduledAt value to be set + */ + + public void setOrderScheduledAt(final ZonedDateTime orderScheduledAt); + + /** + *

Errors due to which the Order creation failed.

+ * @param errors values to be set + */ + + @JsonIgnore + public void setErrors(final RecurringOrderFailureError... errors); + + /** + *

Errors due to which the Order creation failed.

+ * @param errors values to be set + */ + + public void setErrors(final List errors); + + /** + * factory method + * @return instance of RecurringOrderFailedMessage + */ + public static RecurringOrderFailedMessage of() { + return new RecurringOrderFailedMessageImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderFailedMessage + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderFailedMessage of(final RecurringOrderFailedMessage template) { + RecurringOrderFailedMessageImpl instance = new RecurringOrderFailedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setCartId(template.getCartId()); + instance.setFailedAt(template.getFailedAt()); + instance.setFailureReason(template.getFailureReason()); + instance.setOrderScheduledAt(template.getOrderScheduledAt()); + instance.setErrors(template.getErrors()); + return instance; + } + + public RecurringOrderFailedMessage copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderFailedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderFailedMessage deepCopy(@Nullable final RecurringOrderFailedMessage template) { + if (template == null) { + return null; + } + RecurringOrderFailedMessageImpl instance = new RecurringOrderFailedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setCartId(template.getCartId()); + instance.setFailedAt(template.getFailedAt()); + instance.setFailureReason(template.getFailureReason()); + instance.setOrderScheduledAt(template.getOrderScheduledAt()); + instance.setErrors(Optional.ofNullable(template.getErrors()) + .map(t -> t.stream() + .map(com.commercetools.api.models.error.RecurringOrderFailureError::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurringOrderFailedMessage + * @return builder + */ + public static RecurringOrderFailedMessageBuilder builder() { + return RecurringOrderFailedMessageBuilder.of(); + } + + /** + * create builder for RecurringOrderFailedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailedMessageBuilder builder(final RecurringOrderFailedMessage template) { + return RecurringOrderFailedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderFailedMessage(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/message/RecurringOrderFailedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageBuilder.java new file mode 100644 index 00000000000..c0bcb874b68 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageBuilder.java @@ -0,0 +1,609 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderFailedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RecurringOrderFailedMessage recurringOrderFailedMessage = RecurringOrderFailedMessage.builder()
+ *             .id("{id}")
+ *             .version(0.3)
+ *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .sequenceNumber(0.3)
+ *             .resource(resourceBuilder -> resourceBuilder)
+ *             .resourceVersion(0.3)
+ *             .cartId("{cartId}")
+ *             .failedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .failureReason("{failureReason}")
+ *             .orderScheduledAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String cartId; + + private java.time.ZonedDateTime failedAt; + + private String failureReason; + + private java.time.ZonedDateTime orderScheduledAt; + + @Nullable + private java.util.List errors; + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

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

Version of a resource. In case of Messages, this is always 1.

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

Date and time (UTC) the Message was generated.

+ * @param createdAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

Value of createdAt.

+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder.apply(com.commercetools.api.models.common.LastModifiedByBuilder.of()); + return this; + } + + /** + *

IDs and references that last modified the Message.

+ * @param lastModifiedBy value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder lastModifiedBy( + @Nullable final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()).build(); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param builder function to build the createdBy value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.api.models.common.CreatedByBuilder.of()); + return this; + } + + /** + *

IDs and references that created the Message.

+ * @param createdBy value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

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

Reference to the resource on which the change or action was performed.

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

Reference to the resource on which the change or action was performed.

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

Version of the resource on which the change or action was performed.

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

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder resourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()) + .build(); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param builder function to build the resourceUserProvidedIdentifiers value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder withResourceUserProvidedIdentifiers( + Function builder) { + this.resourceUserProvidedIdentifiers = builder + .apply(com.commercetools.api.models.message.UserProvidedIdentifiersBuilder.of()); + return this; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @param resourceUserProvidedIdentifiers value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder resourceUserProvidedIdentifiers( + @Nullable final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + return this; + } + + /** + *

ID of the Cart used in the failed Order creation attempt.

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

Date and time (UTC) when the Order creation attempt failed.

+ * @param failedAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder failedAt(final java.time.ZonedDateTime failedAt) { + this.failedAt = failedAt; + return this; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

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

Date and time (UTC) the Order was scheduled to be created.

+ * @param orderScheduledAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder orderScheduledAt(final java.time.ZonedDateTime orderScheduledAt) { + this.orderScheduledAt = orderScheduledAt; + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder errors( + @Nullable final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder errors( + @Nullable final java.util.List errors) { + this.errors = errors; + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder plusErrors( + @Nullable final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.addAll(Arrays.asList(errors)); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder plusErrors( + Function builder) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors + .add(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder withErrors( + Function builder) { + this.errors = new ArrayList<>(); + this.errors + .add(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder addErrors( + Function builder) { + return plusErrors(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of())); + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessageBuilder setErrors( + Function builder) { + return errors(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of())); + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ * @return sequenceNumber + */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ * @return resourceUserProvidedIdentifiers + */ + + @Nullable + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ * @return cartId + */ + + public String getCartId() { + return this.cartId; + } + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ * @return failedAt + */ + + public java.time.ZonedDateTime getFailedAt() { + return this.failedAt; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ * @return failureReason + */ + + public String getFailureReason() { + return this.failureReason; + } + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ * @return orderScheduledAt + */ + + public java.time.ZonedDateTime getOrderScheduledAt() { + return this.orderScheduledAt; + } + + /** + *

Errors due to which the Order creation failed.

+ * @return errors + */ + + @Nullable + public java.util.List getErrors() { + return this.errors; + } + + /** + * builds RecurringOrderFailedMessage with checking for non-null required values + * @return RecurringOrderFailedMessage + */ + public RecurringOrderFailedMessage build() { + Objects.requireNonNull(id, RecurringOrderFailedMessage.class + ": id is missing"); + Objects.requireNonNull(version, RecurringOrderFailedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, RecurringOrderFailedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, RecurringOrderFailedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, RecurringOrderFailedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, RecurringOrderFailedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, RecurringOrderFailedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(cartId, RecurringOrderFailedMessage.class + ": cartId is missing"); + Objects.requireNonNull(failedAt, RecurringOrderFailedMessage.class + ": failedAt is missing"); + Objects.requireNonNull(failureReason, RecurringOrderFailedMessage.class + ": failureReason is missing"); + Objects.requireNonNull(orderScheduledAt, RecurringOrderFailedMessage.class + ": orderScheduledAt is missing"); + return new RecurringOrderFailedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, cartId, failedAt, failureReason, + orderScheduledAt, errors); + } + + /** + * builds RecurringOrderFailedMessage without checking for non-null required values + * @return RecurringOrderFailedMessage + */ + public RecurringOrderFailedMessage buildUnchecked() { + return new RecurringOrderFailedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, cartId, failedAt, failureReason, + orderScheduledAt, errors); + } + + /** + * factory method for an instance of RecurringOrderFailedMessageBuilder + * @return builder + */ + public static RecurringOrderFailedMessageBuilder of() { + return new RecurringOrderFailedMessageBuilder(); + } + + /** + * create builder for RecurringOrderFailedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailedMessageBuilder of(final RecurringOrderFailedMessage template) { + RecurringOrderFailedMessageBuilder builder = new RecurringOrderFailedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.cartId = template.getCartId(); + builder.failedAt = template.getFailedAt(); + builder.failureReason = template.getFailureReason(); + builder.orderScheduledAt = template.getOrderScheduledAt(); + builder.errors = template.getErrors(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageImpl.java new file mode 100644 index 00000000000..5a77ab5fa6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageImpl.java @@ -0,0 +1,384 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a RecurringOrder failed to process an Order.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailedMessageImpl implements RecurringOrderFailedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String cartId; + + private java.time.ZonedDateTime failedAt; + + private String failureReason; + + private java.time.ZonedDateTime orderScheduledAt; + + private java.util.List errors; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderFailedMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("cartId") final String cartId, + @JsonProperty("failedAt") final java.time.ZonedDateTime failedAt, + @JsonProperty("failureReason") final String failureReason, + @JsonProperty("orderScheduledAt") final java.time.ZonedDateTime orderScheduledAt, + @JsonProperty("errors") final java.util.List errors) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.cartId = cartId; + this.failedAt = failedAt; + this.failureReason = failureReason; + this.orderScheduledAt = orderScheduledAt; + this.errors = errors; + this.type = RECURRING_ORDER_FAILED; + } + + /** + * create empty instance + */ + public RecurringOrderFailedMessageImpl() { + this.type = RECURRING_ORDER_FAILED; + } + + /** + *

Unique identifier of the Message. Can be used to track which Messages have been processed.

+ */ + + public String getId() { + return this.id; + } + + /** + *

Version of a resource. In case of Messages, this is always 1.

+ */ + + public Long getVersion() { + return this.version; + } + + /** + *

Date and time (UTC) the Message was generated.

+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

Value of createdAt.

+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

IDs and references that last modified the Message.

+ */ + + public com.commercetools.api.models.common.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + *

IDs and references that created the Message.

+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

Message number in relation to other Messages for a given resource. The sequenceNumber of the next Message for the resource is the successor of the sequenceNumber of the current Message. Meaning, the sequenceNumber of the next Message equals the sequenceNumber of the current Message + 1. sequenceNumber can be used to ensure that Messages are processed in the correct order for a particular resource.

+ */ + + public Long getSequenceNumber() { + return this.sequenceNumber; + } + + /** + *

Reference to the resource on which the change or action was performed.

+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *

Version of the resource on which the change or action was performed.

+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *

Message Type of the Message.

+ */ + + public String getType() { + return this.type; + } + + /** + *

User-provided identifiers of the resource, such as key or externalId. Only present if the resource has such identifiers.

+ */ + + public com.commercetools.api.models.message.UserProvidedIdentifiers getResourceUserProvidedIdentifiers() { + return this.resourceUserProvidedIdentifiers; + } + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ */ + + public String getCartId() { + return this.cartId; + } + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ */ + + public java.time.ZonedDateTime getFailedAt() { + return this.failedAt; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ */ + + public String getFailureReason() { + return this.failureReason; + } + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ */ + + public java.time.ZonedDateTime getOrderScheduledAt() { + return this.orderScheduledAt; + } + + /** + *

Errors due to which the Order creation failed.

+ */ + + public java.util.List getErrors() { + return this.errors; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setCartId(final String cartId) { + this.cartId = cartId; + } + + public void setFailedAt(final java.time.ZonedDateTime failedAt) { + this.failedAt = failedAt; + } + + public void setFailureReason(final String failureReason) { + this.failureReason = failureReason; + } + + public void setOrderScheduledAt(final java.time.ZonedDateTime orderScheduledAt) { + this.orderScheduledAt = orderScheduledAt; + } + + public void setErrors(final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + } + + public void setErrors(final java.util.List errors) { + this.errors = errors; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderFailedMessageImpl that = (RecurringOrderFailedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(cartId, that.cartId) + .append(failedAt, that.failedAt) + .append(failureReason, that.failureReason) + .append(orderScheduledAt, that.orderScheduledAt) + .append(errors, that.errors) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(cartId, that.cartId) + .append(failedAt, that.failedAt) + .append(failureReason, that.failureReason) + .append(orderScheduledAt, that.orderScheduledAt) + .append(errors, that.errors) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(cartId) + .append(failedAt) + .append(failureReason) + .append(orderScheduledAt) + .append(errors) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("cartId", cartId) + .append("failedAt", failedAt) + .append("failureReason", failureReason) + .append("orderScheduledAt", orderScheduledAt) + .append("errors", errors) + .build(); + } + + @Override + public RecurringOrderFailedMessage copyDeep() { + return RecurringOrderFailedMessage.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayload.java new file mode 100644 index 00000000000..f766fcfc12a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayload.java @@ -0,0 +1,218 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.error.RecurringOrderFailureError; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a RecurringOrder failed to process an Order.

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

+ *     RecurringOrderFailedMessagePayload recurringOrderFailedMessagePayload = RecurringOrderFailedMessagePayload.builder()
+ *             .cartId("{cartId}")
+ *             .failedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .failureReason("{failureReason}")
+ *             .orderScheduledAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderFailed") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurringOrderFailedMessagePayloadImpl.class) +public interface RecurringOrderFailedMessagePayload extends MessagePayload { + + /** + * discriminator value for RecurringOrderFailedMessagePayload + */ + String RECURRING_ORDER_FAILED = "RecurringOrderFailed"; + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ * @return cartId + */ + @NotNull + @JsonProperty("cartId") + public String getCartId(); + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ * @return failedAt + */ + @NotNull + @JsonProperty("failedAt") + public ZonedDateTime getFailedAt(); + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ * @return failureReason + */ + @NotNull + @JsonProperty("failureReason") + public String getFailureReason(); + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ * @return orderScheduledAt + */ + @NotNull + @JsonProperty("orderScheduledAt") + public ZonedDateTime getOrderScheduledAt(); + + /** + *

Errors due to which the Order creation failed.

+ * @return errors + */ + @Valid + @JsonProperty("errors") + public List getErrors(); + + /** + *

ID of the Cart used in the failed Order creation attempt.

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

Date and time (UTC) when the Order creation attempt failed.

+ * @param failedAt value to be set + */ + + public void setFailedAt(final ZonedDateTime failedAt); + + /** + *

Description of why the Order creation failed, such as insufficient stock.

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

Date and time (UTC) the Order was scheduled to be created.

+ * @param orderScheduledAt value to be set + */ + + public void setOrderScheduledAt(final ZonedDateTime orderScheduledAt); + + /** + *

Errors due to which the Order creation failed.

+ * @param errors values to be set + */ + + @JsonIgnore + public void setErrors(final RecurringOrderFailureError... errors); + + /** + *

Errors due to which the Order creation failed.

+ * @param errors values to be set + */ + + public void setErrors(final List errors); + + /** + * factory method + * @return instance of RecurringOrderFailedMessagePayload + */ + public static RecurringOrderFailedMessagePayload of() { + return new RecurringOrderFailedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy RecurringOrderFailedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static RecurringOrderFailedMessagePayload of(final RecurringOrderFailedMessagePayload template) { + RecurringOrderFailedMessagePayloadImpl instance = new RecurringOrderFailedMessagePayloadImpl(); + instance.setCartId(template.getCartId()); + instance.setFailedAt(template.getFailedAt()); + instance.setFailureReason(template.getFailureReason()); + instance.setOrderScheduledAt(template.getOrderScheduledAt()); + instance.setErrors(template.getErrors()); + return instance; + } + + public RecurringOrderFailedMessagePayload copyDeep(); + + /** + * factory method to create a deep copy of RecurringOrderFailedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurringOrderFailedMessagePayload deepCopy( + @Nullable final RecurringOrderFailedMessagePayload template) { + if (template == null) { + return null; + } + RecurringOrderFailedMessagePayloadImpl instance = new RecurringOrderFailedMessagePayloadImpl(); + instance.setCartId(template.getCartId()); + instance.setFailedAt(template.getFailedAt()); + instance.setFailureReason(template.getFailureReason()); + instance.setOrderScheduledAt(template.getOrderScheduledAt()); + instance.setErrors(Optional.ofNullable(template.getErrors()) + .map(t -> t.stream() + .map(com.commercetools.api.models.error.RecurringOrderFailureError::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for RecurringOrderFailedMessagePayload + * @return builder + */ + public static RecurringOrderFailedMessagePayloadBuilder builder() { + return RecurringOrderFailedMessagePayloadBuilder.of(); + } + + /** + * create builder for RecurringOrderFailedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailedMessagePayloadBuilder builder(final RecurringOrderFailedMessagePayload template) { + return RecurringOrderFailedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurringOrderFailedMessagePayload(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/message/RecurringOrderFailedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadBuilder.java new file mode 100644 index 00000000000..e3229aa28c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadBuilder.java @@ -0,0 +1,266 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurringOrderFailedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     RecurringOrderFailedMessagePayload recurringOrderFailedMessagePayload = RecurringOrderFailedMessagePayload.builder()
+ *             .cartId("{cartId}")
+ *             .failedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .failureReason("{failureReason}")
+ *             .orderScheduledAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailedMessagePayloadBuilder implements Builder { + + private String cartId; + + private java.time.ZonedDateTime failedAt; + + private String failureReason; + + private java.time.ZonedDateTime orderScheduledAt; + + @Nullable + private java.util.List errors; + + /** + *

ID of the Cart used in the failed Order creation attempt.

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

Date and time (UTC) when the Order creation attempt failed.

+ * @param failedAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder failedAt(final java.time.ZonedDateTime failedAt) { + this.failedAt = failedAt; + return this; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

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

Date and time (UTC) the Order was scheduled to be created.

+ * @param orderScheduledAt value to be set + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder orderScheduledAt(final java.time.ZonedDateTime orderScheduledAt) { + this.orderScheduledAt = orderScheduledAt; + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder errors( + @Nullable final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder errors( + @Nullable final java.util.List errors) { + this.errors = errors; + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param errors value to be set + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder plusErrors( + @Nullable final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.addAll(Arrays.asList(errors)); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder plusErrors( + Function builder) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors + .add(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder withErrors( + Function builder) { + this.errors = new ArrayList<>(); + this.errors + .add(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of()).build()); + return this; + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder addErrors( + Function builder) { + return plusErrors(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of())); + } + + /** + *

Errors due to which the Order creation failed.

+ * @param builder function to build the errors value + * @return Builder + */ + + public RecurringOrderFailedMessagePayloadBuilder setErrors( + Function builder) { + return errors(builder.apply(com.commercetools.api.models.error.RecurringOrderFailureErrorBuilder.of())); + } + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ * @return cartId + */ + + public String getCartId() { + return this.cartId; + } + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ * @return failedAt + */ + + public java.time.ZonedDateTime getFailedAt() { + return this.failedAt; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ * @return failureReason + */ + + public String getFailureReason() { + return this.failureReason; + } + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ * @return orderScheduledAt + */ + + public java.time.ZonedDateTime getOrderScheduledAt() { + return this.orderScheduledAt; + } + + /** + *

Errors due to which the Order creation failed.

+ * @return errors + */ + + @Nullable + public java.util.List getErrors() { + return this.errors; + } + + /** + * builds RecurringOrderFailedMessagePayload with checking for non-null required values + * @return RecurringOrderFailedMessagePayload + */ + public RecurringOrderFailedMessagePayload build() { + Objects.requireNonNull(cartId, RecurringOrderFailedMessagePayload.class + ": cartId is missing"); + Objects.requireNonNull(failedAt, RecurringOrderFailedMessagePayload.class + ": failedAt is missing"); + Objects.requireNonNull(failureReason, RecurringOrderFailedMessagePayload.class + ": failureReason is missing"); + Objects.requireNonNull(orderScheduledAt, + RecurringOrderFailedMessagePayload.class + ": orderScheduledAt is missing"); + return new RecurringOrderFailedMessagePayloadImpl(cartId, failedAt, failureReason, orderScheduledAt, errors); + } + + /** + * builds RecurringOrderFailedMessagePayload without checking for non-null required values + * @return RecurringOrderFailedMessagePayload + */ + public RecurringOrderFailedMessagePayload buildUnchecked() { + return new RecurringOrderFailedMessagePayloadImpl(cartId, failedAt, failureReason, orderScheduledAt, errors); + } + + /** + * factory method for an instance of RecurringOrderFailedMessagePayloadBuilder + * @return builder + */ + public static RecurringOrderFailedMessagePayloadBuilder of() { + return new RecurringOrderFailedMessagePayloadBuilder(); + } + + /** + * create builder for RecurringOrderFailedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurringOrderFailedMessagePayloadBuilder of(final RecurringOrderFailedMessagePayload template) { + RecurringOrderFailedMessagePayloadBuilder builder = new RecurringOrderFailedMessagePayloadBuilder(); + builder.cartId = template.getCartId(); + builder.failedAt = template.getFailedAt(); + builder.failureReason = template.getFailureReason(); + builder.orderScheduledAt = template.getOrderScheduledAt(); + builder.errors = template.getErrors(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadImpl.java new file mode 100644 index 00000000000..1efaf6845c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadImpl.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Generated after a RecurringOrder failed to process an Order.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurringOrderFailedMessagePayloadImpl implements RecurringOrderFailedMessagePayload, ModelBase { + + private String type; + + private String cartId; + + private java.time.ZonedDateTime failedAt; + + private String failureReason; + + private java.time.ZonedDateTime orderScheduledAt; + + private java.util.List errors; + + /** + * create instance with all properties + */ + @JsonCreator + RecurringOrderFailedMessagePayloadImpl(@JsonProperty("cartId") final String cartId, + @JsonProperty("failedAt") final java.time.ZonedDateTime failedAt, + @JsonProperty("failureReason") final String failureReason, + @JsonProperty("orderScheduledAt") final java.time.ZonedDateTime orderScheduledAt, + @JsonProperty("errors") final java.util.List errors) { + this.cartId = cartId; + this.failedAt = failedAt; + this.failureReason = failureReason; + this.orderScheduledAt = orderScheduledAt; + this.errors = errors; + this.type = RECURRING_ORDER_FAILED; + } + + /** + * create empty instance + */ + public RecurringOrderFailedMessagePayloadImpl() { + this.type = RECURRING_ORDER_FAILED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

ID of the Cart used in the failed Order creation attempt.

+ */ + + public String getCartId() { + return this.cartId; + } + + /** + *

Date and time (UTC) when the Order creation attempt failed.

+ */ + + public java.time.ZonedDateTime getFailedAt() { + return this.failedAt; + } + + /** + *

Description of why the Order creation failed, such as insufficient stock.

+ */ + + public String getFailureReason() { + return this.failureReason; + } + + /** + *

Date and time (UTC) the Order was scheduled to be created.

+ */ + + public java.time.ZonedDateTime getOrderScheduledAt() { + return this.orderScheduledAt; + } + + /** + *

Errors due to which the Order creation failed.

+ */ + + public java.util.List getErrors() { + return this.errors; + } + + public void setCartId(final String cartId) { + this.cartId = cartId; + } + + public void setFailedAt(final java.time.ZonedDateTime failedAt) { + this.failedAt = failedAt; + } + + public void setFailureReason(final String failureReason) { + this.failureReason = failureReason; + } + + public void setOrderScheduledAt(final java.time.ZonedDateTime orderScheduledAt) { + this.orderScheduledAt = orderScheduledAt; + } + + public void setErrors(final com.commercetools.api.models.error.RecurringOrderFailureError... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + } + + public void setErrors(final java.util.List errors) { + this.errors = errors; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurringOrderFailedMessagePayloadImpl that = (RecurringOrderFailedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(cartId, that.cartId) + .append(failedAt, that.failedAt) + .append(failureReason, that.failureReason) + .append(orderScheduledAt, that.orderScheduledAt) + .append(errors, that.errors) + .append(type, that.type) + .append(cartId, that.cartId) + .append(failedAt, that.failedAt) + .append(failureReason, that.failureReason) + .append(orderScheduledAt, that.orderScheduledAt) + .append(errors, that.errors) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(cartId) + .append(failedAt) + .append(failureReason) + .append(orderScheduledAt) + .append(errors) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("cartId", cartId) + .append("failedAt", failedAt) + .append("failureReason", failureReason) + .append("orderScheduledAt", orderScheduledAt) + .append("errors", errors) + .build(); + } + + @Override + public RecurringOrderFailedMessagePayload copyDeep() { + return RecurringOrderFailedMessagePayload.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemBuilder.java index 644dc407d27..650f9e8d46b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemBuilder.java @@ -173,7 +173,7 @@ public CustomLineItemReturnItemBuilder lastModifiedAt(final java.time.ZonedDateT } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @param createdAt value to be set * @return Builder */ @@ -274,7 +274,7 @@ public java.time.ZonedDateTime getLastModifiedAt() { } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @return createdAt */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemImpl.java index 1d23af23271..ad1b5bad92f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/CustomLineItemReturnItemImpl.java @@ -153,7 +153,7 @@ public java.time.ZonedDateTime getLastModifiedAt() { } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

*/ public java.time.ZonedDateTime getCreatedAt() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemBuilder.java index ce1b27512d7..a4792caac29 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemBuilder.java @@ -172,7 +172,7 @@ public LineItemReturnItemBuilder lastModifiedAt(final java.time.ZonedDateTime la } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @param createdAt value to be set * @return Builder */ @@ -273,7 +273,7 @@ public java.time.ZonedDateTime getLastModifiedAt() { } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @return createdAt */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemImpl.java index e81a427edc1..b554a1b6189 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/LineItemReturnItemImpl.java @@ -153,7 +153,7 @@ public java.time.ZonedDateTime getLastModifiedAt() { } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

*/ public java.time.ZonedDateTime getCreatedAt() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryAction.java index 44fd03c00e5..40b38d6dc0e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryAction.java @@ -19,6 +19,7 @@ /** *

A Delivery can only be added to an Order if its shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.

+ *

Multiple Deliveries can be added to the same Order to represent split or partial shipments. However, the API doesn't validate that the cumulative quantities of Line Items or Custom Line Items across all Deliveries match or stay within the originally ordered quantities. For more information, see Multiple Deliveries on the Shipping and Delivery overview page.

*

Produces the Delivery Added Message.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryActionImpl.java index ca3748010a9..0e47628f2fb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddDeliveryActionImpl.java @@ -18,6 +18,7 @@ /** *

A Delivery can only be added to an Order if its shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.

+ *

Multiple Deliveries can be added to the same Order to represent split or partial shipments. However, the API doesn't validate that the cumulative quantities of Line Items or Custom Line Items across all Deliveries match or stay within the originally ordered quantities. For more information, see Multiple Deliveries on the Shipping and Delivery overview page.

*

Produces the Delivery Added Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentAction.java index 8bec0638add..354b82ac389 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentAction.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * OrderAddPaymentAction + *

Produces the Order Payment Added Message.

* *
* 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/order/OrderAddPaymentActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentActionImpl.java index a284cc20aa5..c4865b14d5c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderAddPaymentActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * OrderAddPaymentAction + *

Produces the Order Payment Added Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class OrderAddPaymentActionImpl implements OrderAddPaymentAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentAction.java index 33751c87746..ebdae709708 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentAction.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * OrderRemovePaymentAction + *

Produces the Order Payment Removed Message.

* *
* 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/order/OrderRemovePaymentActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentActionImpl.java index 5aaa0ed582c..708bdcac91e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/OrderRemovePaymentActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * OrderRemovePaymentAction + *

Produces the Order Payment Removed Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class OrderRemovePaymentActionImpl implements OrderRemovePaymentAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItem.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItem.java index 820d29104a0..5d9157cb669 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItem.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItem.java @@ -118,7 +118,7 @@ public interface ReturnItem extends com.commercetools.api.models.CustomizableDate and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @return createdAt */ @NotNull @@ -186,7 +186,7 @@ public interface ReturnItem extends com.commercetools.api.models.CustomizableDate and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

* @param createdAt value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItemImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItemImpl.java index 4f6d0cbcaec..5f6c507394e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItemImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order/ReturnItemImpl.java @@ -149,7 +149,7 @@ public java.time.ZonedDateTime getLastModifiedAt() { } /** - *

Date and time (UTC) the Return Item was intitially created.

+ *

Date and time (UTC) the Return Item was initially created.

*/ public java.time.ZonedDateTime getCreatedAt() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryAction.java index 810a6fb6ff6..e01040ffb4c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryAction.java @@ -22,6 +22,7 @@ /** *

A Delivery can only be added to an Order if its shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.

+ *

Multiple Deliveries can be added to the same Order to represent split or partial shipments. However, the API doesn't validate that the cumulative quantities of Line Items or Custom Line Items across all Deliveries match or stay within the originally ordered quantities. For more information, see Multiple Deliveries on the Shipping and Delivery overview page.

*

Produces the Delivery Added Message.

* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryActionImpl.java index 172d715b5e5..3e3cfc40068 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDeliveryActionImpl.java @@ -18,6 +18,7 @@ /** *

A Delivery can only be added to an Order if its shippingInfo (for shippingMode = Single), or its shipping (for shippingMode = Multiple) exists.

+ *

Multiple Deliveries can be added to the same Order to represent split or partial shipments. However, the API doesn't validate that the cumulative quantities of Line Items or Custom Line Items across all Deliveries match or stay within the originally ordered quantities. For more information, see Multiple Deliveries on the Shipping and Delivery overview page.

*

Produces the Delivery Added Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeAction.java index 1c663a6c2cd..b4989bdd4c9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeAction.java @@ -16,7 +16,8 @@ import jakarta.validation.constraints.NotNull; /** - *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Order.

+ *

Adds a DiscountCode to the Order to activate the related Cart Discounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Order, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Order.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

* diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeActionImpl.java index bc32580c4f7..2197fdb8e6b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddDiscountCodeActionImpl.java @@ -17,7 +17,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

Adds a DiscountCode to the Cart to activate the related Cart Discounts. Adding a Discount Code is only possible if no DirectDiscount has been applied to the Order.

+ *

Adds a DiscountCode to the Order to activate the related Cart Discounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Order, a DiscountCodeNonApplicableError is returned.

+ *

A Discount Code can be added only if no DirectDiscount has been applied to the Order.

*

The maximum number of Discount Codes in a Cart is restricted by a limit.

*

Specific Error Code: MatchingPriceNotFound

*/ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentAction.java index d9f571d84a1..09a3420874c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentAction.java @@ -18,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * StagedOrderAddPaymentAction + *

Produces the Order Payment Added Message.

* *
* 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/order_edit/StagedOrderAddPaymentActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentActionImpl.java index 22ac689eb14..7ea89ba231a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddPaymentActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * StagedOrderAddPaymentAction + *

Produces the Order Payment Added Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StagedOrderAddPaymentActionImpl implements StagedOrderAddPaymentAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemAction.java index 68b51737eb1..b3c7c0ce030 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemAction.java @@ -57,7 +57,7 @@ public interface StagedOrderRemoveLineItemAction extends StagedOrderUpdateAction 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 quantity. If omitted, the LineItem is removed from the Order.

* @return quantity */ @@ -104,7 +104,7 @@ public interface StagedOrderRemoveLineItemAction extends StagedOrderUpdateAction 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 quantity. If omitted, the LineItem is removed from the Order.

* @param quantity value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionBuilder.java index 4ccb0dd96e7..c81abec60bd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionBuilder.java @@ -64,7 +64,7 @@ public StagedOrderRemoveLineItemActionBuilder lineItemKey(@Nullable final String } /** - *

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

+ *

Amount to subtract from the LineItem quantity. If omitted, the LineItem is removed from the Order.

* @param quantity value to be set * @return Builder */ @@ -212,7 +212,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 quantity. If omitted, the LineItem is removed from the Order.

* @return quantity */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionImpl.java index 8f8a9cecc63..2ded7f1846f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemoveLineItemActionImpl.java @@ -86,7 +86,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 quantity. If omitted, the LineItem is removed from the Order.

*/ public Long getQuantity() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentAction.java index ce92f24ab34..b7a7ae79aef 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentAction.java @@ -18,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * StagedOrderRemovePaymentAction + *

Produces the Order Payment Removed Message.

* *
* 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/order_edit/StagedOrderRemovePaymentActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentActionImpl.java index 08a91097111..c6b11efa9d4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderRemovePaymentActionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * StagedOrderRemovePaymentAction + *

Produces the Order Payment Removed Message.

*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StagedOrderRemovePaymentActionImpl implements StagedOrderRemovePaymentAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscount.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscount.java index 2a7c7add5e2..8d69aa7a3b8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscount.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscount.java @@ -158,7 +158,7 @@ public interface ProductDiscount public Boolean getIsActive(); /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @return references */ @NotNull @@ -274,7 +274,7 @@ public interface ProductDiscount public void setIsActive(final Boolean isActive); /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param references values to be set */ @@ -282,7 +282,7 @@ public interface ProductDiscount public void setReferences(final Reference... references); /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param references values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountBuilder.java index d7eefbd1be0..ed86a369288 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountBuilder.java @@ -327,7 +327,7 @@ public ProductDiscountBuilder isActive(final Boolean isActive) { } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -338,7 +338,7 @@ public ProductDiscountBuilder references(final com.commercetools.api.models.comm } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -350,7 +350,7 @@ public ProductDiscountBuilder references( } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param references value to be set * @return Builder */ @@ -364,7 +364,7 @@ public ProductDiscountBuilder plusReferences(final com.commercetools.api.models. } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -379,7 +379,7 @@ public ProductDiscountBuilder plusReferences( } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @param builder function to build the references value * @return Builder */ @@ -535,7 +535,7 @@ public Boolean getIsActive() { } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

* @return references */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountImpl.java index 80d011a7e9f..add119ea82f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_discount/ProductDiscountImpl.java @@ -201,7 +201,7 @@ public Boolean getIsActive() { } /** - *

References of all the resources that are addressed in the predicate.

+ *

References to all resources addressed in the predicate by their IDs. This value is generated by the platform.

*/ public java.util.List getReferences() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierAction.java index 22a0e9a1080..6ec65ad5669 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierAction.java @@ -22,7 +22,7 @@ *
*

  *     StandalonePriceRemovePriceTierAction standalonePriceRemovePriceTierAction = StandalonePriceRemovePriceTierAction.builder()
- *             .tierMinimumQuantity(0.3)
+ *             .minimumQuantity(0.3)
  *             .build()
  * 
*
@@ -39,18 +39,18 @@ public interface StandalonePriceRemovePriceTierAction extends StandalonePriceUpd /** *

The minimumQuantity of the PriceTier to be removed from the tiers field of the StandalonePrice.

- * @return tierMinimumQuantity + * @return minimumQuantity */ @NotNull - @JsonProperty("tierMinimumQuantity") - public Long getTierMinimumQuantity(); + @JsonProperty("minimumQuantity") + public Long getMinimumQuantity(); /** *

The minimumQuantity of the PriceTier to be removed from the tiers field of the StandalonePrice.

- * @param tierMinimumQuantity value to be set + * @param minimumQuantity value to be set */ - public void setTierMinimumQuantity(final Long tierMinimumQuantity); + public void setMinimumQuantity(final Long minimumQuantity); /** * factory method @@ -67,7 +67,7 @@ public static StandalonePriceRemovePriceTierAction of() { */ public static StandalonePriceRemovePriceTierAction of(final StandalonePriceRemovePriceTierAction template) { StandalonePriceRemovePriceTierActionImpl instance = new StandalonePriceRemovePriceTierActionImpl(); - instance.setTierMinimumQuantity(template.getTierMinimumQuantity()); + instance.setMinimumQuantity(template.getMinimumQuantity()); return instance; } @@ -85,7 +85,7 @@ public static StandalonePriceRemovePriceTierAction deepCopy( return null; } StandalonePriceRemovePriceTierActionImpl instance = new StandalonePriceRemovePriceTierActionImpl(); - instance.setTierMinimumQuantity(template.getTierMinimumQuantity()); + instance.setMinimumQuantity(template.getMinimumQuantity()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionBuilder.java index 314f84aa5e3..abfcd4073b3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionBuilder.java @@ -13,7 +13,7 @@ *
*

  *     StandalonePriceRemovePriceTierAction standalonePriceRemovePriceTierAction = StandalonePriceRemovePriceTierAction.builder()
- *             .tierMinimumQuantity(0.3)
+ *             .minimumQuantity(0.3)
  *             .build()
  * 
*
@@ -21,26 +21,26 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StandalonePriceRemovePriceTierActionBuilder implements Builder { - private Long tierMinimumQuantity; + private Long minimumQuantity; /** *

The minimumQuantity of the PriceTier to be removed from the tiers field of the StandalonePrice.

- * @param tierMinimumQuantity value to be set + * @param minimumQuantity value to be set * @return Builder */ - public StandalonePriceRemovePriceTierActionBuilder tierMinimumQuantity(final Long tierMinimumQuantity) { - this.tierMinimumQuantity = tierMinimumQuantity; + public StandalonePriceRemovePriceTierActionBuilder minimumQuantity(final Long minimumQuantity) { + this.minimumQuantity = minimumQuantity; return this; } /** *

The minimumQuantity of the PriceTier to be removed from the tiers field of the StandalonePrice.

- * @return tierMinimumQuantity + * @return minimumQuantity */ - public Long getTierMinimumQuantity() { - return this.tierMinimumQuantity; + public Long getMinimumQuantity() { + return this.minimumQuantity; } /** @@ -48,9 +48,9 @@ public Long getTierMinimumQuantity() { * @return StandalonePriceRemovePriceTierAction */ public StandalonePriceRemovePriceTierAction build() { - Objects.requireNonNull(tierMinimumQuantity, - StandalonePriceRemovePriceTierAction.class + ": tierMinimumQuantity is missing"); - return new StandalonePriceRemovePriceTierActionImpl(tierMinimumQuantity); + Objects.requireNonNull(minimumQuantity, + StandalonePriceRemovePriceTierAction.class + ": minimumQuantity is missing"); + return new StandalonePriceRemovePriceTierActionImpl(minimumQuantity); } /** @@ -58,7 +58,7 @@ public StandalonePriceRemovePriceTierAction build() { * @return StandalonePriceRemovePriceTierAction */ public StandalonePriceRemovePriceTierAction buildUnchecked() { - return new StandalonePriceRemovePriceTierActionImpl(tierMinimumQuantity); + return new StandalonePriceRemovePriceTierActionImpl(minimumQuantity); } /** @@ -76,7 +76,7 @@ public static StandalonePriceRemovePriceTierActionBuilder of() { */ public static StandalonePriceRemovePriceTierActionBuilder of(final StandalonePriceRemovePriceTierAction template) { StandalonePriceRemovePriceTierActionBuilder builder = new StandalonePriceRemovePriceTierActionBuilder(); - builder.tierMinimumQuantity = template.getTierMinimumQuantity(); + builder.minimumQuantity = template.getMinimumQuantity(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionImpl.java index 335b47b6b9f..d696a05fc88 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionImpl.java @@ -24,14 +24,14 @@ public class StandalonePriceRemovePriceTierActionImpl implements StandalonePrice private String action; - private Long tierMinimumQuantity; + private Long minimumQuantity; /** * create instance with all properties */ @JsonCreator - StandalonePriceRemovePriceTierActionImpl(@JsonProperty("tierMinimumQuantity") final Long tierMinimumQuantity) { - this.tierMinimumQuantity = tierMinimumQuantity; + StandalonePriceRemovePriceTierActionImpl(@JsonProperty("minimumQuantity") final Long minimumQuantity) { + this.minimumQuantity = minimumQuantity; this.action = REMOVE_PRICE_TIER; } @@ -54,12 +54,12 @@ public String getAction() { *

The minimumQuantity of the PriceTier to be removed from the tiers field of the StandalonePrice.

*/ - public Long getTierMinimumQuantity() { - return this.tierMinimumQuantity; + public Long getMinimumQuantity() { + return this.minimumQuantity; } - public void setTierMinimumQuantity(final Long tierMinimumQuantity) { - this.tierMinimumQuantity = tierMinimumQuantity; + public void setMinimumQuantity(final Long minimumQuantity) { + this.minimumQuantity = minimumQuantity; } @Override @@ -73,21 +73,21 @@ public boolean equals(Object o) { StandalonePriceRemovePriceTierActionImpl that = (StandalonePriceRemovePriceTierActionImpl) o; return new EqualsBuilder().append(action, that.action) - .append(tierMinimumQuantity, that.tierMinimumQuantity) + .append(minimumQuantity, that.minimumQuantity) .append(action, that.action) - .append(tierMinimumQuantity, that.tierMinimumQuantity) + .append(minimumQuantity, that.minimumQuantity) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(action).append(tierMinimumQuantity).toHashCode(); + return new HashCodeBuilder(17, 37).append(action).append(minimumQuantity).toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) - .append("tierMinimumQuantity", tierMinimumQuantity) + .append("minimumQuantity", minimumQuantity) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/Store.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/Store.java index 1655e30bcde..4a7189c6af8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/Store.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/Store.java @@ -157,7 +157,7 @@ public interface Store extends BaseResource, StoreMixin, com.commercetools.api.m *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @return productSelections */ @@ -296,7 +296,7 @@ public interface Store extends BaseResource, StoreMixin, com.commercetools.api.m *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param productSelections values to be set */ @@ -310,7 +310,7 @@ public interface Store extends BaseResource, StoreMixin, com.commercetools.api.m *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param productSelections values to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreBuilder.java index 295050c7ef6..a7605aae5de 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreBuilder.java @@ -537,7 +537,7 @@ public StoreBuilder setSupplyChannels( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param productSelections value to be set * @return Builder @@ -555,7 +555,7 @@ public StoreBuilder productSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param productSelections value to be set * @return Builder @@ -573,7 +573,7 @@ public StoreBuilder productSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param productSelections value to be set * @return Builder @@ -594,7 +594,7 @@ public StoreBuilder plusProductSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param builder function to build the productSelections value * @return Builder @@ -616,7 +616,7 @@ public StoreBuilder plusProductSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param builder function to build the productSelections value * @return Builder @@ -636,7 +636,7 @@ public StoreBuilder withProductSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param builder function to build the productSelections value * @return Builder @@ -654,7 +654,7 @@ public StoreBuilder addProductSelections( *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @param builder function to build the productSelections value * @return Builder @@ -817,7 +817,7 @@ public java.util.List get *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * * @return productSelections */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreImpl.java index 9f695e7b01d..2fe1fb3db9e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/store/StoreImpl.java @@ -191,7 +191,7 @@ public java.util.List get *
  • Leave empty if all Products in the Project should be available in this Store.
  • *
  • If only inactive Product Selections with IndividualExclusion ProductSelectionMode are provided, all the Products are available in this Store.
  • *
  • If all the Product Selections provided are inactive and there's at least a Product Selection of mode Individual, no Product is available in this Store.
  • - *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availlability in this Store.
  • + *
  • If at least an active Product Selection is provided, only active Product Selections are considered to compute the availability in this Store.
  • * */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartFrozenMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartFrozenMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..fdbcde6e271 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartFrozenMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class CartFrozenMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private CartFrozenMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static CartFrozenMessageExpansionBuilderDsl of() { + return new CartFrozenMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static CartFrozenMessageExpansionBuilderDsl of(final List path) { + return new CartFrozenMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartUnfrozenMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartUnfrozenMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..1a4a0ab79b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/CartUnfrozenMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class CartUnfrozenMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private CartUnfrozenMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static CartUnfrozenMessageExpansionBuilderDsl of() { + return new CartUnfrozenMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static CartUnfrozenMessageExpansionBuilderDsl of(final List path) { + return new CartUnfrozenMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentAddedMessageExpansionBuilderDsl.java index 58a79e7f76a..90fce8c4ca4 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentAddedMessageExpansionBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentAddedMessageExpansionBuilderDsl.java @@ -44,8 +44,8 @@ public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuild .of(appendOne(path, "resource")); } - public com.commercetools.api.predicates.expansion.payment.PaymentReferenceExpansionBuilderDsl payment() { + public com.commercetools.api.predicates.expansion.payment.PaymentReferenceExpansionBuilderDsl paymentRef() { return com.commercetools.api.predicates.expansion.payment.PaymentReferenceExpansionBuilderDsl - .of(appendOne(path, "payment")); + .of(appendOne(path, "paymentRef")); } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..7d3ba996cc7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/OrderPaymentRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class OrderPaymentRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private OrderPaymentRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static OrderPaymentRemovedMessageExpansionBuilderDsl of() { + return new OrderPaymentRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static OrderPaymentRemovedMessageExpansionBuilderDsl of(final List path) { + return new OrderPaymentRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.payment.PaymentReferenceExpansionBuilderDsl paymentRef() { + return com.commercetools.api.predicates.expansion.payment.PaymentReferenceExpansionBuilderDsl + .of(appendOne(path, "paymentRef")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderFailedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderFailedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..4efdc210aad --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/RecurringOrderFailedMessageExpansionBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class RecurringOrderFailedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private RecurringOrderFailedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static RecurringOrderFailedMessageExpansionBuilderDsl of() { + return new RecurringOrderFailedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static RecurringOrderFailedMessageExpansionBuilderDsl of(final List path) { + return new RecurringOrderFailedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/MergeCartDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/MergeCartDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..bfd6b5de1bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/MergeCartDraftQueryBuilderDsl.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.predicates.query.cart; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class MergeCartDraftQueryBuilderDsl { + public MergeCartDraftQueryBuilderDsl() { + } + + public static MergeCartDraftQueryBuilderDsl of() { + return new MergeCartDraftQueryBuilderDsl(); + } + + public CombinationQueryPredicate anonymousCart( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("anonymousCart")) + .inner(fn.apply( + com.commercetools.api.predicates.query.cart.CartResourceIdentifierQueryBuilderDsl.of())), + MergeCartDraftQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder mergeMode() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("mergeMode")), + p -> new CombinationQueryPredicate<>(p, MergeCartDraftQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder updateProductData() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("updateProductData")), + p -> new CombinationQueryPredicate<>(p, MergeCartDraftQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder anonymousId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("anonymousId")), + p -> new CombinationQueryPredicate<>(p, MergeCartDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java index b1f6eadc7c4..47784bb26e3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java @@ -497,6 +497,13 @@ public CombinationQueryPredicate asQueryTimedOut( ErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderFailure( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.RecurringOrderFailureErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReferenceExists( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java index 3b4281e16f7..9fb2293619f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java @@ -505,6 +505,14 @@ public CombinationQueryPredicate asQueryTimed GraphQLErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderFailure( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.error.GraphQLRecurringOrderFailureErrorQueryBuilderDsl.of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asReferenceExists( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLRecurringOrderFailureErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLRecurringOrderFailureErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..f6e2edc035a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLRecurringOrderFailureErrorQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLRecurringOrderFailureErrorQueryBuilderDsl { + public GraphQLRecurringOrderFailureErrorQueryBuilderDsl() { + } + + public static GraphQLRecurringOrderFailureErrorQueryBuilderDsl of() { + return new GraphQLRecurringOrderFailureErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLRecurringOrderFailureErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder details() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("details")), + p -> new CombinationQueryPredicate<>(p, GraphQLRecurringOrderFailureErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/RecurringOrderFailureErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/RecurringOrderFailureErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..0c5c3b79034 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/RecurringOrderFailureErrorQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderFailureErrorQueryBuilderDsl { + public RecurringOrderFailureErrorQueryBuilderDsl() { + } + + public static RecurringOrderFailureErrorQueryBuilderDsl of() { + return new RecurringOrderFailureErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailureErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailureErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder details() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("details")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailureErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..8aaca1c780f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class CartFrozenMessagePayloadQueryBuilderDsl { + public CartFrozenMessagePayloadQueryBuilderDsl() { + } + + public static CartFrozenMessagePayloadQueryBuilderDsl of() { + return new CartFrozenMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..93c8b5cc866 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartFrozenMessageQueryBuilderDsl.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CartFrozenMessageQueryBuilderDsl { + public CartFrozenMessageQueryBuilderDsl() { + } + + public static CartFrozenMessageQueryBuilderDsl of() { + return new CartFrozenMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + CartFrozenMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + CartFrozenMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + CartFrozenMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CartFrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + CartFrozenMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..986906f92ff --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.message; + +import com.commercetools.api.predicates.query.*; + +public class CartUnfrozenMessagePayloadQueryBuilderDsl { + public CartUnfrozenMessagePayloadQueryBuilderDsl() { + } + + public static CartUnfrozenMessagePayloadQueryBuilderDsl of() { + return new CartUnfrozenMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..30812a2edc4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartUnfrozenMessageQueryBuilderDsl.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CartUnfrozenMessageQueryBuilderDsl { + public CartUnfrozenMessageQueryBuilderDsl() { + } + + public static CartUnfrozenMessageQueryBuilderDsl of() { + return new CartUnfrozenMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + CartUnfrozenMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + CartUnfrozenMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + CartUnfrozenMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, CartUnfrozenMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + CartUnfrozenMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl.java index 7c9719d989e..51b74897d95 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl.java @@ -43,6 +43,11 @@ public LongComparisonPredicateBuilder new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of)); } + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessagePayloadQueryBuilderDsl::of)); + } + public CombinationQueryPredicate supplyChannel( Function> fn) { return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessageQueryBuilderDsl.java index ce124d5b23a..db8cc173836 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/InventoryEntryQuantitySetMessageQueryBuilderDsl.java @@ -115,6 +115,11 @@ public LongComparisonPredicateBuilder new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessageQueryBuilderDsl::of)); } + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, InventoryEntryQuantitySetMessageQueryBuilderDsl::of)); + } + public CombinationQueryPredicate supplyChannel( Function> fn) { return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index 032952fac76..70eeecbd878 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java @@ -494,6 +494,20 @@ public CombinationQueryPredicate asCartDiscountSt MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asCartFrozen( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.CartFrozenMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asCartUnfrozen( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.CartUnfrozenMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCategoryCreated( Function> fn) { return new CombinationQueryPredicate<>( @@ -893,6 +907,14 @@ public CombinationQueryPredicate asOrderPaymentAd MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asOrderPaymentRemoved( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.OrderPaymentRemovedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asPaymentCreated( Function> fn) { return new CombinationQueryPredicate<>( @@ -1620,6 +1642,14 @@ public CombinationQueryPredicate asRecurringOrder MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderFailed( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.RecurringOrderFailedMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asRecurringOrderKeySet( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java index f6dcdb747b7..db8e67dd215 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java @@ -550,6 +550,20 @@ public CombinationQueryPredicate asCartDiscountStoresSet MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asCartFrozen( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.CartFrozenMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asCartUnfrozen( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.CartUnfrozenMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asCategoryCreated( Function> fn) { return new CombinationQueryPredicate<>( @@ -930,6 +944,13 @@ public CombinationQueryPredicate asOrderPaymentAdded( MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asOrderPaymentRemoved( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.OrderPaymentRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asPaymentCreated( Function> fn) { return new CombinationQueryPredicate<>( @@ -1618,6 +1639,13 @@ public CombinationQueryPredicate asRecurringOrderExpires MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asRecurringOrderFailed( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.message.RecurringOrderFailedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asRecurringOrderKeySet( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessagePayloadQueryBuilderDsl.java index 263df6b9068..551a17186b1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessagePayloadQueryBuilderDsl.java @@ -19,10 +19,10 @@ public StringComparisonPredicateBuilder new CombinationQueryPredicate<>(p, OrderPaymentAddedMessagePayloadQueryBuilderDsl::of)); } - public CombinationQueryPredicate payment( + public CombinationQueryPredicate paymentRef( Function> fn) { return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() - .parent(ConstantQueryPredicate.of().constant("payment")) + .parent(ConstantQueryPredicate.of().constant("paymentRef")) .inner(fn.apply(com.commercetools.api.predicates.query.payment.PaymentReferenceQueryBuilderDsl.of())), OrderPaymentAddedMessagePayloadQueryBuilderDsl::of); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessageQueryBuilderDsl.java index 8877d4adba0..c407f462982 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentAddedMessageQueryBuilderDsl.java @@ -91,10 +91,10 @@ public CombinationQueryPredicate resour OrderPaymentAddedMessageQueryBuilderDsl::of); } - public CombinationQueryPredicate payment( + public CombinationQueryPredicate paymentRef( Function> fn) { return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() - .parent(ConstantQueryPredicate.of().constant("payment")) + .parent(ConstantQueryPredicate.of().constant("paymentRef")) .inner(fn.apply(com.commercetools.api.predicates.query.payment.PaymentReferenceQueryBuilderDsl.of())), OrderPaymentAddedMessageQueryBuilderDsl::of); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..a98d8e567b2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class OrderPaymentRemovedMessagePayloadQueryBuilderDsl { + public OrderPaymentRemovedMessagePayloadQueryBuilderDsl() { + } + + public static OrderPaymentRemovedMessagePayloadQueryBuilderDsl of() { + return new OrderPaymentRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate paymentRef( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("paymentRef")) + .inner(fn.apply(com.commercetools.api.predicates.query.payment.PaymentReferenceQueryBuilderDsl.of())), + OrderPaymentRemovedMessagePayloadQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder removedPaymentInfo() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("removedPaymentInfo")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..1f855df8510 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/OrderPaymentRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,108 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class OrderPaymentRemovedMessageQueryBuilderDsl { + public OrderPaymentRemovedMessageQueryBuilderDsl() { + } + + public static OrderPaymentRemovedMessageQueryBuilderDsl of() { + return new OrderPaymentRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + OrderPaymentRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + OrderPaymentRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + OrderPaymentRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + OrderPaymentRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate paymentRef( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("paymentRef")) + .inner(fn.apply(com.commercetools.api.predicates.query.payment.PaymentReferenceQueryBuilderDsl.of())), + OrderPaymentRemovedMessageQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder removedPaymentInfo() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("removedPaymentInfo")), + p -> new CombinationQueryPredicate<>(p, OrderPaymentRemovedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..f58f8f1b2dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,61 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderFailedMessagePayloadQueryBuilderDsl { + public RecurringOrderFailedMessagePayloadQueryBuilderDsl() { + } + + public static RecurringOrderFailedMessagePayloadQueryBuilderDsl of() { + return new RecurringOrderFailedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder cartId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("cartId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder failedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("failedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder failureReason() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("failureReason")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder orderScheduledAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("orderScheduledAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate errors( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("errors")) + .inner(fn.apply( + com.commercetools.api.predicates.query.error.RecurringOrderFailureErrorQueryBuilderDsl.of())), + RecurringOrderFailedMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder errors() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("errors")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..ca8ab86d37a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/RecurringOrderFailedMessageQueryBuilderDsl.java @@ -0,0 +1,133 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class RecurringOrderFailedMessageQueryBuilderDsl { + public RecurringOrderFailedMessageQueryBuilderDsl() { + } + + public static RecurringOrderFailedMessageQueryBuilderDsl of() { + return new RecurringOrderFailedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + RecurringOrderFailedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + RecurringOrderFailedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + RecurringOrderFailedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + RecurringOrderFailedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder cartId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("cartId")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder failedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("failedAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder failureReason() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("failureReason")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder orderScheduledAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("orderScheduledAt")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate errors( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("errors")) + .inner(fn.apply( + com.commercetools.api.predicates.query.error.RecurringOrderFailureErrorQueryBuilderDsl.of())), + RecurringOrderFailedMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder errors() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("errors")), + p -> new CombinationQueryPredicate<>(p, RecurringOrderFailedMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceRemovePriceTierActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceRemovePriceTierActionQueryBuilderDsl.java index 449573e96d6..c863fdd10be 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceRemovePriceTierActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/standalone_price/StandalonePriceRemovePriceTierActionQueryBuilderDsl.java @@ -17,9 +17,9 @@ public StringComparisonPredicateBuilder new CombinationQueryPredicate<>(p, StandalonePriceRemovePriceTierActionQueryBuilderDsl::of)); } - public LongComparisonPredicateBuilder tierMinimumQuantity() { + public LongComparisonPredicateBuilder minimumQuantity() { return new LongComparisonPredicateBuilder<>( - BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tierMinimumQuantity")), + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("minimumQuantity")), p -> new CombinationQueryPredicate<>(p, StandalonePriceRemovePriceTierActionQueryBuilderDsl::of)); } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCartsCustomerIdByCustomerIdMergeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCartsCustomerIdByCustomerIdMergeTest.java new file mode 100644 index 00000000000..25a0b168905 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCartsCustomerIdByCustomerIdMergeTest.java @@ -0,0 +1,75 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCartsCustomerIdByCustomerIdMergeTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .carts() + .customerIdWithCustomerIdValueMerge("test_customerId") + .post(com.commercetools.api.models.cart.MergeCartDraft.of()) + .createHttpRequest(), + "post", "test_projectKey/carts/customer-id=test_customerId/merge", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .carts() + .customerIdWithCustomerIdValueMerge("test_customerId") + .post(com.commercetools.api.models.cart.MergeCartDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeTest.java new file mode 100644 index 00000000000..1de31ed17f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyCartsCustomerIdByCustomerIdMergeTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .carts() + .customerIdWithCustomerIdValueMerge("test_customerId") + .post(com.commercetools.api.models.cart.MergeCartDraft.of()) + .createHttpRequest(), + "post", "test_projectKey/in-store/key=test_storeKey/carts/customer-id=test_customerId/merge", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .carts() + .customerIdWithCustomerIdValueMerge("test_customerId") + .post(com.commercetools.api.models.cart.MergeCartDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/MergeCartDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/MergeCartDraftTest.java new file mode 100644 index 00000000000..619c3ea3d94 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/MergeCartDraftTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.models.cart; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MergeCartDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MergeCartDraftBuilder builder) { + MergeCartDraft mergeCartDraft = builder.buildUnchecked(); + Assertions.assertThat(mergeCartDraft).isInstanceOf(MergeCartDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "anonymousCart", + MergeCartDraft.builder() + .anonymousCart(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()) }, + new Object[] { "mergeMode", + MergeCartDraft.builder() + .mergeMode(com.commercetools.api.models.cart.CartMergeMode + .findEnum("MergeWithExistingCustomerCart")) }, + new Object[] { "updateProductData", MergeCartDraft.builder().updateProductData(true) }, + new Object[] { "anonymousId", MergeCartDraft.builder().anonymousId("anonymousId") } }; + } + + @Test + public void anonymousCart() { + MergeCartDraft value = MergeCartDraft.of(); + value.setAnonymousCart(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()); + Assertions.assertThat(value.getAnonymousCart()) + .isEqualTo(new com.commercetools.api.models.cart.CartResourceIdentifierImpl()); + } + + @Test + public void mergeMode() { + MergeCartDraft value = MergeCartDraft.of(); + value.setMergeMode(com.commercetools.api.models.cart.CartMergeMode.findEnum("MergeWithExistingCustomerCart")); + Assertions.assertThat(value.getMergeMode()) + .isEqualTo(com.commercetools.api.models.cart.CartMergeMode.findEnum("MergeWithExistingCustomerCart")); + } + + @Test + public void updateProductData() { + MergeCartDraft value = MergeCartDraft.of(); + value.setUpdateProductData(true); + Assertions.assertThat(value.getUpdateProductData()).isEqualTo(true); + } + + @Test + public void anonymousId() { + MergeCartDraft value = MergeCartDraft.of(); + value.setAnonymousId("anonymousId"); + Assertions.assertThat(value.getAnonymousId()).isEqualTo("anonymousId"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorTest.java new file mode 100644 index 00000000000..1211d337cda --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLRecurringOrderFailureErrorTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.api.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GraphQLRecurringOrderFailureErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GraphQLRecurringOrderFailureErrorBuilder builder) { + GraphQLRecurringOrderFailureError graphQLRecurringOrderFailureError = builder.buildUnchecked(); + Assertions.assertThat(graphQLRecurringOrderFailureError).isInstanceOf(GraphQLRecurringOrderFailureError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "details", GraphQLRecurringOrderFailureError.builder().details("details") } }; + } + + @Test + public void details() { + GraphQLRecurringOrderFailureError value = GraphQLRecurringOrderFailureError.of(); + value.setDetails("details"); + Assertions.assertThat(value.getDetails()).isEqualTo("details"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorTest.java new file mode 100644 index 00000000000..a7e346523f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/RecurringOrderFailureErrorTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderFailureErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderFailureErrorBuilder builder) { + RecurringOrderFailureError recurringOrderFailureError = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderFailureError).isInstanceOf(RecurringOrderFailureError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", RecurringOrderFailureError.builder().message("message") }, + new Object[] { "details", RecurringOrderFailureError.builder().details("details") } }; + } + + @Test + public void message() { + RecurringOrderFailureError value = RecurringOrderFailureError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void details() { + RecurringOrderFailureError value = RecurringOrderFailureError.of(); + value.setDetails("details"); + Assertions.assertThat(value.getDetails()).isEqualTo("details"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadTest.java new file mode 100644 index 00000000000..4cba872ba0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessagePayloadTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.message; + +public class CartFrozenMessagePayloadTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessageTest.java new file mode 100644 index 00000000000..da754e264d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartFrozenMessageTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.message; + +public class CartFrozenMessageTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadTest.java new file mode 100644 index 00000000000..f4f1ebd8a57 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessagePayloadTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.message; + +public class CartUnfrozenMessagePayloadTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageTest.java new file mode 100644 index 00000000000..871426ea614 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartUnfrozenMessageTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.api.models.message; + +public class CartUnfrozenMessageTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadTest.java index 4e920227517..de56b45c616 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessagePayloadTest.java @@ -26,6 +26,7 @@ public static Object[][] objectBuilder() { InventoryEntryQuantitySetMessagePayload.builder().oldAvailableQuantity(9L) }, new Object[] { "newAvailableQuantity", InventoryEntryQuantitySetMessagePayload.builder().newAvailableQuantity(8L) }, + new Object[] { "sku", InventoryEntryQuantitySetMessagePayload.builder().sku("sku") }, new Object[] { "supplyChannel", InventoryEntryQuantitySetMessagePayload.builder() .supplyChannel(new com.commercetools.api.models.channel.ChannelReferenceImpl()) } }; } @@ -58,6 +59,13 @@ public void newAvailableQuantity() { Assertions.assertThat(value.getNewAvailableQuantity()).isEqualTo(8L); } + @Test + public void sku() { + InventoryEntryQuantitySetMessagePayload value = InventoryEntryQuantitySetMessagePayload.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + @Test public void supplyChannel() { InventoryEntryQuantitySetMessagePayload value = InventoryEntryQuantitySetMessagePayload.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageTest.java index e22bd94653c..bb63a01b3b2 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/InventoryEntryQuantitySetMessageTest.java @@ -25,6 +25,7 @@ public static Object[][] objectBuilder() { InventoryEntryQuantitySetMessage.builder().oldAvailableQuantity(9L) }, new Object[] { "newAvailableQuantity", InventoryEntryQuantitySetMessage.builder().newAvailableQuantity(8L) }, + new Object[] { "sku", InventoryEntryQuantitySetMessage.builder().sku("sku") }, new Object[] { "supplyChannel", InventoryEntryQuantitySetMessage.builder() .supplyChannel(new com.commercetools.api.models.channel.ChannelReferenceImpl()) } }; } @@ -57,6 +58,13 @@ public void newAvailableQuantity() { Assertions.assertThat(value.getNewAvailableQuantity()).isEqualTo(8L); } + @Test + public void sku() { + InventoryEntryQuantitySetMessage value = InventoryEntryQuantitySetMessage.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + @Test public void supplyChannel() { InventoryEntryQuantitySetMessage value = InventoryEntryQuantitySetMessage.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadTest.java index 6dec286d603..52e297a5d39 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessagePayloadTest.java @@ -16,15 +16,15 @@ public void buildUnchecked(String name, OrderPaymentAddedMessagePayloadBuilder b } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "payment", OrderPaymentAddedMessagePayload.builder() - .payment(new com.commercetools.api.models.payment.PaymentReferenceImpl()) } }; + return new Object[][] { new Object[] { "paymentRef", OrderPaymentAddedMessagePayload.builder() + .paymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()) } }; } @Test - public void payment() { + public void paymentRef() { OrderPaymentAddedMessagePayload value = OrderPaymentAddedMessagePayload.of(); - value.setPayment(new com.commercetools.api.models.payment.PaymentReferenceImpl()); - Assertions.assertThat(value.getPayment()) + value.setPaymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPaymentRef()) .isEqualTo(new com.commercetools.api.models.payment.PaymentReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageTest.java index 3563fa3febd..f0da01de4dc 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentAddedMessageTest.java @@ -16,15 +16,15 @@ public void buildUnchecked(String name, OrderPaymentAddedMessageBuilder builder) } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "payment", OrderPaymentAddedMessage.builder() - .payment(new com.commercetools.api.models.payment.PaymentReferenceImpl()) } }; + return new Object[][] { new Object[] { "paymentRef", OrderPaymentAddedMessage.builder() + .paymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()) } }; } @Test - public void payment() { + public void paymentRef() { OrderPaymentAddedMessage value = OrderPaymentAddedMessage.of(); - value.setPayment(new com.commercetools.api.models.payment.PaymentReferenceImpl()); - Assertions.assertThat(value.getPayment()) + value.setPaymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPaymentRef()) .isEqualTo(new com.commercetools.api.models.payment.PaymentReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadTest.java new file mode 100644 index 00000000000..ed4d383bedb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessagePayloadTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderPaymentRemovedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderPaymentRemovedMessagePayloadBuilder builder) { + OrderPaymentRemovedMessagePayload orderPaymentRemovedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(orderPaymentRemovedMessagePayload).isInstanceOf(OrderPaymentRemovedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "paymentRef", + OrderPaymentRemovedMessagePayload.builder() + .paymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()) }, + new Object[] { "removedPaymentInfo", + OrderPaymentRemovedMessagePayload.builder().removedPaymentInfo(true) } }; + } + + @Test + public void paymentRef() { + OrderPaymentRemovedMessagePayload value = OrderPaymentRemovedMessagePayload.of(); + value.setPaymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPaymentRef()) + .isEqualTo(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + } + + @Test + public void removedPaymentInfo() { + OrderPaymentRemovedMessagePayload value = OrderPaymentRemovedMessagePayload.of(); + value.setRemovedPaymentInfo(true); + Assertions.assertThat(value.getRemovedPaymentInfo()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageTest.java new file mode 100644 index 00000000000..7f3cbfb2e4d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/OrderPaymentRemovedMessageTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.api.models.message; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class OrderPaymentRemovedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, OrderPaymentRemovedMessageBuilder builder) { + OrderPaymentRemovedMessage orderPaymentRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(orderPaymentRemovedMessage).isInstanceOf(OrderPaymentRemovedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "paymentRef", + OrderPaymentRemovedMessage.builder() + .paymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()) }, + new Object[] { "removedPaymentInfo", OrderPaymentRemovedMessage.builder().removedPaymentInfo(true) } }; + } + + @Test + public void paymentRef() { + OrderPaymentRemovedMessage value = OrderPaymentRemovedMessage.of(); + value.setPaymentRef(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + Assertions.assertThat(value.getPaymentRef()) + .isEqualTo(new com.commercetools.api.models.payment.PaymentReferenceImpl()); + } + + @Test + public void removedPaymentInfo() { + OrderPaymentRemovedMessage value = OrderPaymentRemovedMessage.of(); + value.setRemovedPaymentInfo(true); + Assertions.assertThat(value.getRemovedPaymentInfo()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadTest.java new file mode 100644 index 00000000000..fa02383a457 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessagePayloadTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.message; + +import java.time.ZonedDateTime; +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderFailedMessagePayloadTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderFailedMessagePayloadBuilder builder) { + RecurringOrderFailedMessagePayload recurringOrderFailedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderFailedMessagePayload) + .isInstanceOf(RecurringOrderFailedMessagePayload.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "cartId", RecurringOrderFailedMessagePayload.builder().cartId("cartId") }, + new Object[] { "failedAt", + RecurringOrderFailedMessagePayload.builder() + .failedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "failureReason", + RecurringOrderFailedMessagePayload.builder().failureReason("failureReason") }, + new Object[] { "orderScheduledAt", + RecurringOrderFailedMessagePayload.builder() + .orderScheduledAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "errors", + RecurringOrderFailedMessagePayload.builder() + .errors(Collections.singletonList( + new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())) } }; + } + + @Test + public void cartId() { + RecurringOrderFailedMessagePayload value = RecurringOrderFailedMessagePayload.of(); + value.setCartId("cartId"); + Assertions.assertThat(value.getCartId()).isEqualTo("cartId"); + } + + @Test + public void failedAt() { + RecurringOrderFailedMessagePayload value = RecurringOrderFailedMessagePayload.of(); + value.setFailedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getFailedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void failureReason() { + RecurringOrderFailedMessagePayload value = RecurringOrderFailedMessagePayload.of(); + value.setFailureReason("failureReason"); + Assertions.assertThat(value.getFailureReason()).isEqualTo("failureReason"); + } + + @Test + public void orderScheduledAt() { + RecurringOrderFailedMessagePayload value = RecurringOrderFailedMessagePayload.of(); + value.setOrderScheduledAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getOrderScheduledAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void errors() { + RecurringOrderFailedMessagePayload value = RecurringOrderFailedMessagePayload.of(); + value.setErrors( + Collections.singletonList(new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())); + Assertions.assertThat(value.getErrors()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageTest.java new file mode 100644 index 00000000000..522157188d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/RecurringOrderFailedMessageTest.java @@ -0,0 +1,72 @@ + +package com.commercetools.api.models.message; + +import java.time.ZonedDateTime; +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurringOrderFailedMessageTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurringOrderFailedMessageBuilder builder) { + RecurringOrderFailedMessage recurringOrderFailedMessage = builder.buildUnchecked(); + Assertions.assertThat(recurringOrderFailedMessage).isInstanceOf(RecurringOrderFailedMessage.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "cartId", RecurringOrderFailedMessage.builder().cartId("cartId") }, + new Object[] { "failedAt", + RecurringOrderFailedMessage.builder().failedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "failureReason", RecurringOrderFailedMessage.builder().failureReason("failureReason") }, + new Object[] { "orderScheduledAt", + RecurringOrderFailedMessage.builder() + .orderScheduledAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "errors", + RecurringOrderFailedMessage.builder() + .errors(Collections.singletonList( + new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())) } }; + } + + @Test + public void cartId() { + RecurringOrderFailedMessage value = RecurringOrderFailedMessage.of(); + value.setCartId("cartId"); + Assertions.assertThat(value.getCartId()).isEqualTo("cartId"); + } + + @Test + public void failedAt() { + RecurringOrderFailedMessage value = RecurringOrderFailedMessage.of(); + value.setFailedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getFailedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void failureReason() { + RecurringOrderFailedMessage value = RecurringOrderFailedMessage.of(); + value.setFailureReason("failureReason"); + Assertions.assertThat(value.getFailureReason()).isEqualTo("failureReason"); + } + + @Test + public void orderScheduledAt() { + RecurringOrderFailedMessage value = RecurringOrderFailedMessage.of(); + value.setOrderScheduledAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getOrderScheduledAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void errors() { + RecurringOrderFailedMessage value = RecurringOrderFailedMessage.of(); + value.setErrors( + Collections.singletonList(new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())); + Assertions.assertThat(value.getErrors()) + .isEqualTo( + Collections.singletonList(new com.commercetools.api.models.error.RecurringOrderFailureErrorImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionTest.java index ae8768df83d..ac2f9556189 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceRemovePriceTierActionTest.java @@ -17,14 +17,14 @@ public void buildUnchecked(String name, StandalonePriceRemovePriceTierActionBuil } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "tierMinimumQuantity", - StandalonePriceRemovePriceTierAction.builder().tierMinimumQuantity(3L) } }; + return new Object[][] { new Object[] { "minimumQuantity", + StandalonePriceRemovePriceTierAction.builder().minimumQuantity(1L) } }; } @Test - public void tierMinimumQuantity() { + public void minimumQuantity() { StandalonePriceRemovePriceTierAction value = StandalonePriceRemovePriceTierAction.of(); - value.setTierMinimumQuantity(3L); - Assertions.assertThat(value.getTierMinimumQuantity()).isEqualTo(3L); + value.setMinimumQuantity(1L); + Assertions.assertThat(value.getMinimumQuantity()).isEqualTo(1L); } } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdDelete.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdDelete.java new file mode 100644 index 00000000000..77af0be8eb5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdDelete.java @@ -0,0 +1,209 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withId("{id}")
    + *            .delete()
    + *            .withVersion(version)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdDelete extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyApplicationsByIdDelete(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyApplicationsByIdDelete(ByProjectKeyApplicationsByIdDelete t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyApplicationsByIdDelete + */ + public ByProjectKeyApplicationsByIdDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsByIdDelete that = (ByProjectKeyApplicationsByIdDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsByIdDelete copy() { + return new ByProjectKeyApplicationsByIdDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdGet.java new file mode 100644 index 00000000000..138c0c89aec --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdGet.java @@ -0,0 +1,121 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves an Application by a given id.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withId("{id}")
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyApplicationsByIdGet(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyApplicationsByIdGet(ByProjectKeyApplicationsByIdGet t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsByIdGet that = (ByProjectKeyApplicationsByIdGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsByIdGet copy() { + return new ByProjectKeyApplicationsByIdGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdHead.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdHead.java new file mode 100644 index 00000000000..4b7f43006b0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdHead.java @@ -0,0 +1,124 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Checks if an Application with a given id exists. Returns 200 OK if the Application exists, or 404 Not Found if it doesn't. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withId("{id}")
    + *            .head()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdHead + extends TypeApiMethod implements + com.commercetools.checkout.client.Secured_by_view_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyApplicationsByIdHead(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyApplicationsByIdHead(ByProjectKeyApplicationsByIdHead t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsByIdHead that = (ByProjectKeyApplicationsByIdHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsByIdHead copy() { + return new ByProjectKeyApplicationsByIdHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPost.java new file mode 100644 index 00000000000..fd866cc11b2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPost.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withId("{id}")
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + private com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions; + + public ByProjectKeyApplicationsByIdPost(final ApiHttpClient apiHttpClient, String projectKey, String id, + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + this.applicationUpdateActions = applicationUpdateActions; + } + + public ByProjectKeyApplicationsByIdPost(ByProjectKeyApplicationsByIdPost t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + this.applicationUpdateActions = t.applicationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(applicationUpdateActions))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + public com.commercetools.checkout.models.application.ApplicationUpdateActions getBody() { + return applicationUpdateActions; + } + + public ByProjectKeyApplicationsByIdPost withBody( + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + ByProjectKeyApplicationsByIdPost t = copy(); + t.applicationUpdateActions = applicationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsByIdPost that = (ByProjectKeyApplicationsByIdPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(id, that.id) + .append(applicationUpdateActions, that.applicationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).append(applicationUpdateActions).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsByIdPost copy() { + return new ByProjectKeyApplicationsByIdPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPostString.java new file mode 100644 index 00000000000..ddf37f0a627 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdPostString.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withId("{id}")
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + private String applicationUpdateActions; + + public ByProjectKeyApplicationsByIdPostString(final ApiHttpClient apiHttpClient, String projectKey, String id, + String applicationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + this.applicationUpdateActions = applicationUpdateActions; + } + + public ByProjectKeyApplicationsByIdPostString(ByProjectKeyApplicationsByIdPostString t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + this.applicationUpdateActions = t.applicationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/%s", this.projectKey, this.id); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + applicationUpdateActions.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + public String getBody() { + return applicationUpdateActions; + } + + public ByProjectKeyApplicationsByIdPostString withBody(String applicationUpdateActions) { + ByProjectKeyApplicationsByIdPostString t = copy(); + t.applicationUpdateActions = applicationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsByIdPostString that = (ByProjectKeyApplicationsByIdPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(id, that.id) + .append(applicationUpdateActions, that.applicationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).append(applicationUpdateActions).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsByIdPostString copy() { + return new ByProjectKeyApplicationsByIdPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdRequestBuilder.java new file mode 100644 index 00000000000..411210fc1f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsByIdRequestBuilder.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String id; + + public ByProjectKeyApplicationsByIdRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String id) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyApplicationsByIdGet get() { + return new ByProjectKeyApplicationsByIdGet(apiHttpClient, projectKey, id); + } + + public ByProjectKeyApplicationsByIdHead head() { + return new ByProjectKeyApplicationsByIdHead(apiHttpClient, projectKey, id); + } + + public ByProjectKeyApplicationsByIdPost post( + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + return new ByProjectKeyApplicationsByIdPost(apiHttpClient, projectKey, id, applicationUpdateActions); + } + + public ByProjectKeyApplicationsByIdPostString post(final String applicationUpdateActions) { + return new ByProjectKeyApplicationsByIdPostString(apiHttpClient, projectKey, id, applicationUpdateActions); + } + + public ByProjectKeyApplicationsByIdPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.checkout.models.application.ApplicationUpdateActionsBuilder.of()).build()); + } + + public ByProjectKeyApplicationsByIdDelete delete() { + return new ByProjectKeyApplicationsByIdDelete(apiHttpClient, projectKey, id); + } + + public ByProjectKeyApplicationsByIdDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsGet.java new file mode 100644 index 00000000000..a82a514ba69 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsGet.java @@ -0,0 +1,445 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves Applications

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsGet extends + TypeApiMethod + implements com.commercetools.checkout.client.Secured_by_view_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyApplicationsGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyApplicationsGet(ByProjectKeyApplicationsGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.application.PaginatedApplication.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.PaginatedApplication.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withSort(final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addSort(final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withLimit(final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addLimit(final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withOffset(final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addOffset(final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withWithTotal(final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addWithTotal(final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet withWithTotal(final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyApplicationsGet + */ + public ByProjectKeyApplicationsGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsGet that = (ByProjectKeyApplicationsGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsGet copy() { + return new ByProjectKeyApplicationsGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyDelete.java new file mode 100644 index 00000000000..11eabe337de --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyDelete.java @@ -0,0 +1,209 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withKey("{key}")
    + *            .delete()
    + *            .withVersion(version)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyDelete extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyApplicationsKeyByKeyDelete(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyApplicationsKeyByKeyDelete(ByProjectKeyApplicationsKeyByKeyDelete t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyApplicationsKeyByKeyDelete + */ + public ByProjectKeyApplicationsKeyByKeyDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsKeyByKeyDelete that = (ByProjectKeyApplicationsKeyByKeyDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsKeyByKeyDelete copy() { + return new ByProjectKeyApplicationsKeyByKeyDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyGet.java new file mode 100644 index 00000000000..4205ea9d7af --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyGet.java @@ -0,0 +1,125 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves an Application with a given key. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withKey("{key}")
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyApplicationsKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyApplicationsKeyByKeyGet(ByProjectKeyApplicationsKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsKeyByKeyGet that = (ByProjectKeyApplicationsKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsKeyByKeyGet copy() { + return new ByProjectKeyApplicationsKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyHead.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyHead.java new file mode 100644 index 00000000000..de0cad7fceb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyHead.java @@ -0,0 +1,124 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Checks if an Application with a given key exists. Returns 200 OK if the Application exists, or 404 Not Found if it doesn't. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withKey("{key}")
    + *            .head()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyHead + extends TypeApiMethod implements + com.commercetools.checkout.client.Secured_by_view_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyApplicationsKeyByKeyHead(final ApiHttpClient apiHttpClient, String projectKey, String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyApplicationsKeyByKeyHead(ByProjectKeyApplicationsKeyByKeyHead t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsKeyByKeyHead that = (ByProjectKeyApplicationsKeyByKeyHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsKeyByKeyHead copy() { + return new ByProjectKeyApplicationsKeyByKeyHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPost.java new file mode 100644 index 00000000000..f2012673d08 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPost.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withKey("{key}")
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions; + + public ByProjectKeyApplicationsKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.applicationUpdateActions = applicationUpdateActions; + } + + public ByProjectKeyApplicationsKeyByKeyPost(ByProjectKeyApplicationsKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.applicationUpdateActions = t.applicationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(applicationUpdateActions))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + public com.commercetools.checkout.models.application.ApplicationUpdateActions getBody() { + return applicationUpdateActions; + } + + public ByProjectKeyApplicationsKeyByKeyPost withBody( + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + ByProjectKeyApplicationsKeyByKeyPost t = copy(); + t.applicationUpdateActions = applicationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsKeyByKeyPost that = (ByProjectKeyApplicationsKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(applicationUpdateActions, that.applicationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(applicationUpdateActions).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsKeyByKeyPost copy() { + return new ByProjectKeyApplicationsKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPostString.java new file mode 100644 index 00000000000..dfc5ea24534 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyPostString.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .withKey("{key}")
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String applicationUpdateActions; + + public ByProjectKeyApplicationsKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, String key, + String applicationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.applicationUpdateActions = applicationUpdateActions; + } + + public ByProjectKeyApplicationsKeyByKeyPostString(ByProjectKeyApplicationsKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.applicationUpdateActions = t.applicationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + applicationUpdateActions.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + public String getBody() { + return applicationUpdateActions; + } + + public ByProjectKeyApplicationsKeyByKeyPostString withBody(String applicationUpdateActions) { + ByProjectKeyApplicationsKeyByKeyPostString t = copy(); + t.applicationUpdateActions = applicationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsKeyByKeyPostString that = (ByProjectKeyApplicationsKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(applicationUpdateActions, that.applicationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(applicationUpdateActions).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsKeyByKeyPostString copy() { + return new ByProjectKeyApplicationsKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..93ee8c9a63a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsKeyByKeyRequestBuilder.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyApplicationsKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyApplicationsKeyByKeyGet get() { + return new ByProjectKeyApplicationsKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyApplicationsKeyByKeyPost post( + com.commercetools.checkout.models.application.ApplicationUpdateActions applicationUpdateActions) { + return new ByProjectKeyApplicationsKeyByKeyPost(apiHttpClient, projectKey, key, applicationUpdateActions); + } + + public ByProjectKeyApplicationsKeyByKeyPostString post(final String applicationUpdateActions) { + return new ByProjectKeyApplicationsKeyByKeyPostString(apiHttpClient, projectKey, key, applicationUpdateActions); + } + + public ByProjectKeyApplicationsKeyByKeyPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.checkout.models.application.ApplicationUpdateActionsBuilder.of()).build()); + } + + public ByProjectKeyApplicationsKeyByKeyHead head() { + return new ByProjectKeyApplicationsKeyByKeyHead(apiHttpClient, projectKey, key); + } + + public ByProjectKeyApplicationsKeyByKeyDelete delete() { + return new ByProjectKeyApplicationsKeyByKeyDelete(apiHttpClient, projectKey, key); + } + + public ByProjectKeyApplicationsKeyByKeyDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPost.java new file mode 100644 index 00000000000..0540cc0ffe5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPost.java @@ -0,0 +1,128 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Creates a new Application.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsPost extends + TypeBodyApiMethod + implements com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.checkout.models.application.ApplicationDraft applicationDraft; + + public ByProjectKeyApplicationsPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.checkout.models.application.ApplicationDraft applicationDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.applicationDraft = applicationDraft; + } + + public ByProjectKeyApplicationsPost(ByProjectKeyApplicationsPost t) { + super(t); + this.projectKey = t.projectKey; + this.applicationDraft = t.applicationDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(applicationDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public com.commercetools.checkout.models.application.ApplicationDraft getBody() { + return applicationDraft; + } + + public ByProjectKeyApplicationsPost withBody( + com.commercetools.checkout.models.application.ApplicationDraft applicationDraft) { + ByProjectKeyApplicationsPost t = copy(); + t.applicationDraft = applicationDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsPost that = (ByProjectKeyApplicationsPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(applicationDraft, that.applicationDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(applicationDraft).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsPost copy() { + return new ByProjectKeyApplicationsPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPostString.java new file mode 100644 index 00000000000..5812d125d59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsPostString.java @@ -0,0 +1,128 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Creates a new Application.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .applications()
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_applicationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String applicationDraft; + + public ByProjectKeyApplicationsPostString(final ApiHttpClient apiHttpClient, String projectKey, + String applicationDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.applicationDraft = applicationDraft; + } + + public ByProjectKeyApplicationsPostString(ByProjectKeyApplicationsPostString t) { + super(t); + this.projectKey = t.projectKey; + this.applicationDraft = t.applicationDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/applications", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + applicationDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.checkout.models.application.Application.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.application.Application.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public String getBody() { + return applicationDraft; + } + + public ByProjectKeyApplicationsPostString withBody(String applicationDraft) { + ByProjectKeyApplicationsPostString t = copy(); + t.applicationDraft = applicationDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyApplicationsPostString that = (ByProjectKeyApplicationsPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(applicationDraft, that.applicationDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(applicationDraft).toHashCode(); + } + + @Override + protected ByProjectKeyApplicationsPostString copy() { + return new ByProjectKeyApplicationsPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsRequestBuilder.java new file mode 100644 index 00000000000..fa46122ab3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyApplicationsRequestBuilder.java @@ -0,0 +1,46 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyApplicationsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyApplicationsGet get() { + return new ByProjectKeyApplicationsGet(apiHttpClient, projectKey); + } + + public ByProjectKeyApplicationsPost post( + com.commercetools.checkout.models.application.ApplicationDraft applicationDraft) { + return new ByProjectKeyApplicationsPost(apiHttpClient, projectKey, applicationDraft); + } + + public ByProjectKeyApplicationsPostString post(final String applicationDraft) { + return new ByProjectKeyApplicationsPostString(apiHttpClient, projectKey, applicationDraft); + } + + public ByProjectKeyApplicationsPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.checkout.models.application.ApplicationDraftBuilder.of()).build()); + } + + public ByProjectKeyApplicationsByIdRequestBuilder withId(String id) { + return new ByProjectKeyApplicationsByIdRequestBuilder(apiHttpClient, projectKey, id); + } + + public ByProjectKeyApplicationsKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyApplicationsKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdDelete.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdDelete.java new file mode 100644 index 00000000000..a9393cb5615 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdDelete.java @@ -0,0 +1,210 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withId("{id}")
    + *            .delete()
    + *            .withVersion(version)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdDelete extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyPaymentIntegrationsByIdDelete(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyPaymentIntegrationsByIdDelete(ByProjectKeyPaymentIntegrationsByIdDelete t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsByIdDelete + */ + public ByProjectKeyPaymentIntegrationsByIdDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsByIdDelete that = (ByProjectKeyPaymentIntegrationsByIdDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsByIdDelete copy() { + return new ByProjectKeyPaymentIntegrationsByIdDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdGet.java new file mode 100644 index 00000000000..8c4fc4aaeda --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdGet.java @@ -0,0 +1,122 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves Payment Integrations in a Project with a given id.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withId("{id}")
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyPaymentIntegrationsByIdGet(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyPaymentIntegrationsByIdGet(ByProjectKeyPaymentIntegrationsByIdGet t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsByIdGet that = (ByProjectKeyPaymentIntegrationsByIdGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsByIdGet copy() { + return new ByProjectKeyPaymentIntegrationsByIdGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdHead.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdHead.java new file mode 100644 index 00000000000..7659722d724 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdHead.java @@ -0,0 +1,124 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Checks if a PaymentIntegration with a given id exists. Returns 200 OK if the PaymentIntegration exists, or 404 Not Found if it doesn't. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withId("{id}")
    + *            .head()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdHead extends + TypeApiMethod implements + com.commercetools.checkout.client.Secured_by_view_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + public ByProjectKeyPaymentIntegrationsByIdHead(final ApiHttpClient apiHttpClient, String projectKey, String id) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyPaymentIntegrationsByIdHead(ByProjectKeyPaymentIntegrationsByIdHead t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsByIdHead that = (ByProjectKeyPaymentIntegrationsByIdHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(id, that.id).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(id).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsByIdHead copy() { + return new ByProjectKeyPaymentIntegrationsByIdHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPost.java new file mode 100644 index 00000000000..cbb21e723b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPost.java @@ -0,0 +1,147 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withId("{id}")
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions; + + public ByProjectKeyPaymentIntegrationsByIdPost(final ApiHttpClient apiHttpClient, String projectKey, String id, + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + this.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsByIdPost(ByProjectKeyPaymentIntegrationsByIdPost t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + this.paymentIntegrationUpdateActions = t.paymentIntegrationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/%s", encodePathParam(this.projectKey), + encodePathParam(this.id)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils.executing( + () -> apiHttpClient().getSerializerService().toJsonByteArray(paymentIntegrationUpdateActions))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions getBody() { + return paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsByIdPost withBody( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + ByProjectKeyPaymentIntegrationsByIdPost t = copy(); + t.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsByIdPost that = (ByProjectKeyPaymentIntegrationsByIdPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(id, that.id) + .append(paymentIntegrationUpdateActions, that.paymentIntegrationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(id) + .append(paymentIntegrationUpdateActions) + .toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsByIdPost copy() { + return new ByProjectKeyPaymentIntegrationsByIdPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPostString.java new file mode 100644 index 00000000000..d0e65364027 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdPostString.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withId("{id}")
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String id; + + private String paymentIntegrationUpdateActions; + + public ByProjectKeyPaymentIntegrationsByIdPostString(final ApiHttpClient apiHttpClient, String projectKey, + String id, String paymentIntegrationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.id = id; + this.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsByIdPostString(ByProjectKeyPaymentIntegrationsByIdPostString t) { + super(t); + this.projectKey = t.projectKey; + this.id = t.id; + this.paymentIntegrationUpdateActions = t.paymentIntegrationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/%s", this.projectKey, this.id); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + paymentIntegrationUpdateActions.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getId() { + return this.id; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setId(final String id) { + this.id = id; + } + + public String getBody() { + return paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsByIdPostString withBody(String paymentIntegrationUpdateActions) { + ByProjectKeyPaymentIntegrationsByIdPostString t = copy(); + t.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsByIdPostString that = (ByProjectKeyPaymentIntegrationsByIdPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(id, that.id) + .append(paymentIntegrationUpdateActions, that.paymentIntegrationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(id) + .append(paymentIntegrationUpdateActions) + .toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsByIdPostString copy() { + return new ByProjectKeyPaymentIntegrationsByIdPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdRequestBuilder.java new file mode 100644 index 00000000000..4d7c1b1d2d3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsByIdRequestBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String id; + + public ByProjectKeyPaymentIntegrationsByIdRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey, + final String id) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.id = id; + } + + public ByProjectKeyPaymentIntegrationsByIdGet get() { + return new ByProjectKeyPaymentIntegrationsByIdGet(apiHttpClient, projectKey, id); + } + + public ByProjectKeyPaymentIntegrationsByIdHead head() { + return new ByProjectKeyPaymentIntegrationsByIdHead(apiHttpClient, projectKey, id); + } + + public ByProjectKeyPaymentIntegrationsByIdPost post( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + return new ByProjectKeyPaymentIntegrationsByIdPost(apiHttpClient, projectKey, id, + paymentIntegrationUpdateActions); + } + + public ByProjectKeyPaymentIntegrationsByIdPostString post(final String paymentIntegrationUpdateActions) { + return new ByProjectKeyPaymentIntegrationsByIdPostString(apiHttpClient, projectKey, id, + paymentIntegrationUpdateActions); + } + + public ByProjectKeyPaymentIntegrationsByIdPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionsBuilder.of()) + .build()); + } + + public ByProjectKeyPaymentIntegrationsByIdDelete delete() { + return new ByProjectKeyPaymentIntegrationsByIdDelete(apiHttpClient, projectKey, id); + } + + public ByProjectKeyPaymentIntegrationsByIdDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsGet.java new file mode 100644 index 00000000000..717b5b68419 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsGet.java @@ -0,0 +1,447 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves Payment Integrations in a Project.

    + *

    The results are paginated.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyPaymentIntegrationsGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyPaymentIntegrationsGet(ByProjectKeyPaymentIntegrationsGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaginatedPaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaginatedPaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public List getSort() { + return this.getQueryParam("sort"); + } + + public List getLimit() { + return this.getQueryParam("limit"); + } + + public List getOffset() { + return this.getQueryParam("offset"); + } + + public List getWithTotal() { + return this.getQueryParam("withTotal"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + /** + * set sort with the specified value + * @param sort value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withSort(final TValue sort) { + return copy().withQueryParam("sort", sort); + } + + /** + * add additional sort query parameter + * @param sort value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addSort(final TValue sort) { + return copy().addQueryParam("sort", sort); + } + + /** + * set sort with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withSort(final Supplier supplier) { + return copy().withQueryParam("sort", supplier.get()); + } + + /** + * add additional sort query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addSort(final Supplier supplier) { + return copy().addQueryParam("sort", supplier.get()); + } + + /** + * set sort with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withSort(final Function op) { + return copy().withQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * add additional sort query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addSort(final Function op) { + return copy().addQueryParam("sort", op.apply(new StringBuilder())); + } + + /** + * set sort with the specified values + * @param sort values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withSort(final Collection sort) { + return copy().withoutQueryParam("sort") + .addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sort query parameters + * @param sort values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addSort(final Collection sort) { + return copy().addQueryParams( + sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); + } + + /** + * set limit with the specified value + * @param limit value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withLimit(final TValue limit) { + return copy().withQueryParam("limit", limit); + } + + /** + * add additional limit query parameter + * @param limit value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addLimit(final TValue limit) { + return copy().addQueryParam("limit", limit); + } + + /** + * set limit with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withLimit(final Supplier supplier) { + return copy().withQueryParam("limit", supplier.get()); + } + + /** + * add additional limit query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addLimit(final Supplier supplier) { + return copy().addQueryParam("limit", supplier.get()); + } + + /** + * set limit with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withLimit(final Function op) { + return copy().withQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * add additional limit query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addLimit(final Function op) { + return copy().addQueryParam("limit", op.apply(new StringBuilder())); + } + + /** + * set limit with the specified values + * @param limit values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withLimit(final Collection limit) { + return copy().withoutQueryParam("limit") + .addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional limit query parameters + * @param limit values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addLimit(final Collection limit) { + return copy().addQueryParams( + limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); + } + + /** + * set offset with the specified value + * @param offset value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withOffset(final TValue offset) { + return copy().withQueryParam("offset", offset); + } + + /** + * add additional offset query parameter + * @param offset value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addOffset(final TValue offset) { + return copy().addQueryParam("offset", offset); + } + + /** + * set offset with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withOffset(final Supplier supplier) { + return copy().withQueryParam("offset", supplier.get()); + } + + /** + * add additional offset query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addOffset(final Supplier supplier) { + return copy().addQueryParam("offset", supplier.get()); + } + + /** + * set offset with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withOffset(final Function op) { + return copy().withQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * add additional offset query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addOffset(final Function op) { + return copy().addQueryParam("offset", op.apply(new StringBuilder())); + } + + /** + * set offset with the specified values + * @param offset values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withOffset(final Collection offset) { + return copy().withoutQueryParam("offset") + .addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional offset query parameters + * @param offset values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addOffset(final Collection offset) { + return copy().addQueryParams( + offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); + } + + /** + * set withTotal with the specified value + * @param withTotal value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withWithTotal(final TValue withTotal) { + return copy().withQueryParam("withTotal", withTotal); + } + + /** + * add additional withTotal query parameter + * @param withTotal value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addWithTotal(final TValue withTotal) { + return copy().addQueryParam("withTotal", withTotal); + } + + /** + * set withTotal with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withWithTotal(final Supplier supplier) { + return copy().withQueryParam("withTotal", supplier.get()); + } + + /** + * add additional withTotal query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addWithTotal(final Supplier supplier) { + return copy().addQueryParam("withTotal", supplier.get()); + } + + /** + * set withTotal with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withWithTotal(final Function op) { + return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * add additional withTotal query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addWithTotal(final Function op) { + return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); + } + + /** + * set withTotal with the specified values + * @param withTotal values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet withWithTotal(final Collection withTotal) { + return copy().withoutQueryParam("withTotal") + .addQueryParams(withTotal.stream() + .map(s -> new ParamEntry<>("withTotal", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional withTotal query parameters + * @param withTotal values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsGet + */ + public ByProjectKeyPaymentIntegrationsGet addWithTotal(final Collection withTotal) { + return copy().addQueryParams( + withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsGet that = (ByProjectKeyPaymentIntegrationsGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsGet copy() { + return new ByProjectKeyPaymentIntegrationsGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyDelete.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyDelete.java new file mode 100644 index 00000000000..66e773d881d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyDelete.java @@ -0,0 +1,211 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withKey("{key}")
    + *            .delete()
    + *            .withVersion(version)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyDelete extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete(ByProjectKeyPaymentIntegrationsKeyByKeyDelete t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.DELETE, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public List getVersion() { + return this.getQueryParam("version"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + /** + * set version with the specified value + * @param version value to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete withVersion(final TValue version) { + return copy().withQueryParam("version", version); + } + + /** + * add additional version query parameter + * @param version value to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete addVersion(final TValue version) { + return copy().addQueryParam("version", version); + } + + /** + * set version with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete withVersion(final Supplier supplier) { + return copy().withQueryParam("version", supplier.get()); + } + + /** + * add additional version query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete addVersion(final Supplier supplier) { + return copy().addQueryParam("version", supplier.get()); + } + + /** + * set version with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete withVersion(final Function op) { + return copy().withQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * add additional version query parameter + * @param op builder for the value to be added + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete addVersion(final Function op) { + return copy().addQueryParam("version", op.apply(new StringBuilder())); + } + + /** + * set version with the specified values + * @param version values to be set + * @param value type + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete withVersion(final Collection version) { + return copy().withoutQueryParam("version") + .addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional version query parameters + * @param version values to be added + * @param value type + * @return ByProjectKeyPaymentIntegrationsKeyByKeyDelete + */ + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete addVersion(final Collection version) { + return copy().addQueryParams( + version.stream().map(s -> new ParamEntry<>("version", s.toString())).collect(Collectors.toList())); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsKeyByKeyDelete that = (ByProjectKeyPaymentIntegrationsKeyByKeyDelete) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsKeyByKeyDelete copy() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyDelete(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyGet.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyGet.java new file mode 100644 index 00000000000..9017161d734 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyGet.java @@ -0,0 +1,127 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Retrieves Payment Integrations in a Project with a given key. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withKey("{key}")
    + *            .get()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyGet extends + TypeApiMethod + implements + com.commercetools.checkout.client.Secured_by_view_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyPaymentIntegrationsKeyByKeyGet(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyGet(ByProjectKeyPaymentIntegrationsKeyByKeyGet t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsKeyByKeyGet that = (ByProjectKeyPaymentIntegrationsKeyByKeyGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsKeyByKeyGet copy() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyHead.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyHead.java new file mode 100644 index 00000000000..d9f38e965e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyHead.java @@ -0,0 +1,125 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Checks if a PaymentIntegration with a given key exists. Returns 200 OK if the PaymentIntegration exists, or 404 Not Found if it doesn't. Specific Error Codes:

    + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withKey("{key}")
    + *            .head()
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyHead extends + TypeApiMethod implements + com.commercetools.checkout.client.Secured_by_view_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + public ByProjectKeyPaymentIntegrationsKeyByKeyHead(final ApiHttpClient apiHttpClient, String projectKey, + String key) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyHead(ByProjectKeyPaymentIntegrationsKeyByKeyHead t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsKeyByKeyHead that = (ByProjectKeyPaymentIntegrationsKeyByKeyHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).append(key, that.key).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(key).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsKeyByKeyHead copy() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPost.java new file mode 100644 index 00000000000..a4920ec9926 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPost.java @@ -0,0 +1,147 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withKey("{key}")
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions; + + public ByProjectKeyPaymentIntegrationsKeyByKeyPost(final ApiHttpClient apiHttpClient, String projectKey, String key, + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPost(ByProjectKeyPaymentIntegrationsKeyByKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.paymentIntegrationUpdateActions = t.paymentIntegrationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/key=%s", encodePathParam(this.projectKey), + encodePathParam(this.key)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils.executing( + () -> apiHttpClient().getSerializerService().toJsonByteArray(paymentIntegrationUpdateActions))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions getBody() { + return paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPost withBody( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + ByProjectKeyPaymentIntegrationsKeyByKeyPost t = copy(); + t.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsKeyByKeyPost that = (ByProjectKeyPaymentIntegrationsKeyByKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(paymentIntegrationUpdateActions, that.paymentIntegrationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(key) + .append(paymentIntegrationUpdateActions) + .toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsKeyByKeyPost copy() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPostString.java new file mode 100644 index 00000000000..259aa004244 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyPostString.java @@ -0,0 +1,145 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .withKey("{key}")
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String key; + + private String paymentIntegrationUpdateActions; + + public ByProjectKeyPaymentIntegrationsKeyByKeyPostString(final ApiHttpClient apiHttpClient, String projectKey, + String key, String paymentIntegrationUpdateActions) { + super(apiHttpClient); + this.projectKey = projectKey; + this.key = key; + this.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPostString(ByProjectKeyPaymentIntegrationsKeyByKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.key = t.key; + this.paymentIntegrationUpdateActions = t.paymentIntegrationUpdateActions; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations/key=%s", this.projectKey, this.key); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + paymentIntegrationUpdateActions.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getKey() { + return this.key; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setKey(final String key) { + this.key = key; + } + + public String getBody() { + return paymentIntegrationUpdateActions; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPostString withBody(String paymentIntegrationUpdateActions) { + ByProjectKeyPaymentIntegrationsKeyByKeyPostString t = copy(); + t.paymentIntegrationUpdateActions = paymentIntegrationUpdateActions; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsKeyByKeyPostString that = (ByProjectKeyPaymentIntegrationsKeyByKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(key, that.key) + .append(paymentIntegrationUpdateActions, that.paymentIntegrationUpdateActions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(key) + .append(paymentIntegrationUpdateActions) + .toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsKeyByKeyPostString copy() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder.java new file mode 100644 index 00000000000..aa34642deb1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder.java @@ -0,0 +1,57 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String key; + + public ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey, final String key) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.key = key; + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyGet get() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyGet(apiHttpClient, projectKey, key); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPost post( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions paymentIntegrationUpdateActions) { + return new ByProjectKeyPaymentIntegrationsKeyByKeyPost(apiHttpClient, projectKey, key, + paymentIntegrationUpdateActions); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPostString post(final String paymentIntegrationUpdateActions) { + return new ByProjectKeyPaymentIntegrationsKeyByKeyPostString(apiHttpClient, projectKey, key, + paymentIntegrationUpdateActions); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionsBuilder.of()) + .build()); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyHead head() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyHead(apiHttpClient, projectKey, key); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete delete() { + return new ByProjectKeyPaymentIntegrationsKeyByKeyDelete(apiHttpClient, projectKey, key); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyDelete delete(TValue version) { + return delete().withVersion(version); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPost.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPost.java new file mode 100644 index 00000000000..4c55db42f7c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPost.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Creates a new PaymentIntegration.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .post(null)
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsPost extends + TypeBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft paymentIntegrationDraft; + + public ByProjectKeyPaymentIntegrationsPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft paymentIntegrationDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.paymentIntegrationDraft = paymentIntegrationDraft; + } + + public ByProjectKeyPaymentIntegrationsPost(ByProjectKeyPaymentIntegrationsPost t) { + super(t); + this.projectKey = t.projectKey; + this.paymentIntegrationDraft = t.paymentIntegrationDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations", encodePathParam(this.projectKey)); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(paymentIntegrationDraft))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft getBody() { + return paymentIntegrationDraft; + } + + public ByProjectKeyPaymentIntegrationsPost withBody( + com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft paymentIntegrationDraft) { + ByProjectKeyPaymentIntegrationsPost t = copy(); + t.paymentIntegrationDraft = paymentIntegrationDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsPost that = (ByProjectKeyPaymentIntegrationsPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(paymentIntegrationDraft, that.paymentIntegrationDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(paymentIntegrationDraft).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsPost copy() { + return new ByProjectKeyPaymentIntegrationsPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPostString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPostString.java new file mode 100644 index 00000000000..c00e5b6d595 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsPostString.java @@ -0,0 +1,129 @@ + +package com.commercetools.checkout.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

    Creates a new PaymentIntegration.

    + * + *
    + *
    + *
    {@code
    + *   CompletableFuture> result = apiRoot
    + *            .withProjectKey("{projectKey}")
    + *            .paymentIntegrations()
    + *            .post("")
    + *            .execute()
    + * }
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsPostString extends + StringBodyApiMethod + implements + com.commercetools.checkout.client.Secured_by_manage_payment_integrationsTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String paymentIntegrationDraft; + + public ByProjectKeyPaymentIntegrationsPostString(final ApiHttpClient apiHttpClient, String projectKey, + String paymentIntegrationDraft) { + super(apiHttpClient); + this.projectKey = projectKey; + this.paymentIntegrationDraft = paymentIntegrationDraft; + } + + public ByProjectKeyPaymentIntegrationsPostString(ByProjectKeyPaymentIntegrationsPostString t) { + super(t); + this.projectKey = t.projectKey; + this.paymentIntegrationDraft = t.paymentIntegrationDraft; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/payment-integrations", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + paymentIntegrationDraft.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.checkout.models.payment_integration.PaymentIntegration.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public String getBody() { + return paymentIntegrationDraft; + } + + public ByProjectKeyPaymentIntegrationsPostString withBody(String paymentIntegrationDraft) { + ByProjectKeyPaymentIntegrationsPostString t = copy(); + t.paymentIntegrationDraft = paymentIntegrationDraft; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyPaymentIntegrationsPostString that = (ByProjectKeyPaymentIntegrationsPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(paymentIntegrationDraft, that.paymentIntegrationDraft) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(paymentIntegrationDraft).toHashCode(); + } + + @Override + protected ByProjectKeyPaymentIntegrationsPostString copy() { + return new ByProjectKeyPaymentIntegrationsPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsRequestBuilder.java new file mode 100644 index 00000000000..477aaa01e0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyPaymentIntegrationsRequestBuilder.java @@ -0,0 +1,48 @@ + +package com.commercetools.checkout.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyPaymentIntegrationsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyPaymentIntegrationsGet get() { + return new ByProjectKeyPaymentIntegrationsGet(apiHttpClient, projectKey); + } + + public ByProjectKeyPaymentIntegrationsPost post( + com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft paymentIntegrationDraft) { + return new ByProjectKeyPaymentIntegrationsPost(apiHttpClient, projectKey, paymentIntegrationDraft); + } + + public ByProjectKeyPaymentIntegrationsPostString post(final String paymentIntegrationDraft) { + return new ByProjectKeyPaymentIntegrationsPostString(apiHttpClient, projectKey, paymentIntegrationDraft); + } + + public ByProjectKeyPaymentIntegrationsPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraftBuilder.of()) + .build()); + } + + public ByProjectKeyPaymentIntegrationsByIdRequestBuilder withId(String id) { + return new ByProjectKeyPaymentIntegrationsByIdRequestBuilder(apiHttpClient, projectKey, id); + } + + public ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder withKey(String key) { + return new ByProjectKeyPaymentIntegrationsKeyByKeyRequestBuilder(apiHttpClient, projectKey, key); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java index d3859d014f8..a9262290f79 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/ByProjectKeyRequestBuilder.java @@ -23,4 +23,12 @@ public ByProjectKeyTransactionsRequestBuilder transactions() { return new ByProjectKeyTransactionsRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyPaymentIntegrationsRequestBuilder paymentIntegrations() { + return new ByProjectKeyPaymentIntegrationsRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyApplicationsRequestBuilder applications() { + return new ByProjectKeyApplicationsRequestBuilder(apiHttpClient, projectKey); + } + } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_applicationsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_applicationsTrait.java new file mode 100644 index 00000000000..5ba44222bee --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_applicationsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_applicationsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_applicationsTrait> { + + default Secured_by_manage_applicationsTrait asSecured_by_manage_applicationsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_applicationsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_payment_integrationsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_payment_integrationsTrait.java new file mode 100644 index 00000000000..1c7ba2a082b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_manage_payment_integrationsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_payment_integrationsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_payment_integrationsTrait> { + + default Secured_by_manage_payment_integrationsTrait asSecured_by_manage_payment_integrationsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_payment_integrationsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_applicationsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_applicationsTrait.java new file mode 100644 index 00000000000..01e592c1880 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_applicationsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_view_applicationsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_view_applicationsTrait> { + + default Secured_by_view_applicationsTrait asSecured_by_view_applicationsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_view_applicationsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_payment_integrationsTrait.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_payment_integrationsTrait.java new file mode 100644 index 00000000000..21a7ed3d709 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/client/Secured_by_view_payment_integrationsTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.checkout.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_view_payment_integrationsTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_view_payment_integrationsTrait> { + + default Secured_by_view_payment_integrationsTrait asSecured_by_view_payment_integrationsTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_view_payment_integrationsTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateAction.java new file mode 100644 index 00000000000..992f0a7fc1c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * AddAllowedOriginUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddAllowedOriginUpdateAction addAllowedOriginUpdateAction = AddAllowedOriginUpdateAction.builder()
    + *             .origin("{origin}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("addAllowedOrigin") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddAllowedOriginUpdateActionImpl.class) +public interface AddAllowedOriginUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for AddAllowedOriginUpdateAction + */ + String ADD_ALLOWED_ORIGIN = "addAllowedOrigin"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Origin URL to add to the allowed origins list.

    + * @return origin + */ + @NotNull + @JsonProperty("origin") + public String getOrigin(); + + /** + *

    Origin URL to add to the allowed origins list.

    + * @param origin value to be set + */ + + public void setOrigin(final String origin); + + /** + * factory method + * @return instance of AddAllowedOriginUpdateAction + */ + public static AddAllowedOriginUpdateAction of() { + return new AddAllowedOriginUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy AddAllowedOriginUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static AddAllowedOriginUpdateAction of(final AddAllowedOriginUpdateAction template) { + AddAllowedOriginUpdateActionImpl instance = new AddAllowedOriginUpdateActionImpl(); + instance.setOrigin(template.getOrigin()); + return instance; + } + + public AddAllowedOriginUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of AddAllowedOriginUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddAllowedOriginUpdateAction deepCopy(@Nullable final AddAllowedOriginUpdateAction template) { + if (template == null) { + return null; + } + AddAllowedOriginUpdateActionImpl instance = new AddAllowedOriginUpdateActionImpl(); + instance.setOrigin(template.getOrigin()); + return instance; + } + + /** + * builder factory method for AddAllowedOriginUpdateAction + * @return builder + */ + public static AddAllowedOriginUpdateActionBuilder builder() { + return AddAllowedOriginUpdateActionBuilder.of(); + } + + /** + * create builder for AddAllowedOriginUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddAllowedOriginUpdateActionBuilder builder(final AddAllowedOriginUpdateAction template) { + return AddAllowedOriginUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddAllowedOriginUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionBuilder.java new file mode 100644 index 00000000000..bb953ee76e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddAllowedOriginUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddAllowedOriginUpdateAction addAllowedOriginUpdateAction = AddAllowedOriginUpdateAction.builder()
    + *             .origin("{origin}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddAllowedOriginUpdateActionBuilder implements Builder { + + private String origin; + + /** + *

    Origin URL to add to the allowed origins list.

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

    Origin URL to add to the allowed origins list.

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

    Origin URL to add to the allowed origins list.

    + */ + + public String getOrigin() { + return this.origin; + } + + public void setOrigin(final String origin) { + this.origin = origin; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddAllowedOriginUpdateActionImpl that = (AddAllowedOriginUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(origin, that.origin) + .append(action, that.action) + .append(origin, that.origin) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(origin).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("origin", origin) + .build(); + } + + @Override + public AddAllowedOriginUpdateAction copyDeep() { + return AddAllowedOriginUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateAction.java new file mode 100644 index 00000000000..5bf52ee9f2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * AddApplicationAgreementUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddApplicationAgreementUpdateAction addApplicationAgreementUpdateAction = AddApplicationAgreementUpdateAction.builder()
    + *             .agreement(agreementBuilder -> agreementBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("addAgreement") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddApplicationAgreementUpdateActionImpl.class) +public interface AddApplicationAgreementUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for AddApplicationAgreementUpdateAction + */ + String ADD_AGREEMENT = "addAgreement"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Agreement to add to the Application.

    + * @return agreement + */ + @NotNull + @Valid + @JsonProperty("agreement") + public ApplicationAgreementDraft getAgreement(); + + /** + *

    Agreement to add to the Application.

    + * @param agreement value to be set + */ + + public void setAgreement(final ApplicationAgreementDraft agreement); + + /** + * factory method + * @return instance of AddApplicationAgreementUpdateAction + */ + public static AddApplicationAgreementUpdateAction of() { + return new AddApplicationAgreementUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy AddApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static AddApplicationAgreementUpdateAction of(final AddApplicationAgreementUpdateAction template) { + AddApplicationAgreementUpdateActionImpl instance = new AddApplicationAgreementUpdateActionImpl(); + instance.setAgreement(template.getAgreement()); + return instance; + } + + public AddApplicationAgreementUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of AddApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddApplicationAgreementUpdateAction deepCopy( + @Nullable final AddApplicationAgreementUpdateAction template) { + if (template == null) { + return null; + } + AddApplicationAgreementUpdateActionImpl instance = new AddApplicationAgreementUpdateActionImpl(); + instance.setAgreement( + com.commercetools.checkout.models.application.ApplicationAgreementDraft.deepCopy(template.getAgreement())); + return instance; + } + + /** + * builder factory method for AddApplicationAgreementUpdateAction + * @return builder + */ + public static AddApplicationAgreementUpdateActionBuilder builder() { + return AddApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * create builder for AddApplicationAgreementUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddApplicationAgreementUpdateActionBuilder builder( + final AddApplicationAgreementUpdateAction template) { + return AddApplicationAgreementUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddApplicationAgreementUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionBuilder.java new file mode 100644 index 00000000000..1e3152a7146 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddApplicationAgreementUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddApplicationAgreementUpdateAction addApplicationAgreementUpdateAction = AddApplicationAgreementUpdateAction.builder()
    + *             .agreement(agreementBuilder -> agreementBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddApplicationAgreementUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.ApplicationAgreementDraft agreement; + + /** + *

    Agreement to add to the Application.

    + * @param builder function to build the agreement value + * @return Builder + */ + + public AddApplicationAgreementUpdateActionBuilder agreement( + Function builder) { + this.agreement = builder + .apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of()) + .build(); + return this; + } + + /** + *

    Agreement to add to the Application.

    + * @param builder function to build the agreement value + * @return Builder + */ + + public AddApplicationAgreementUpdateActionBuilder withAgreement( + Function builder) { + this.agreement = builder + .apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of()); + return this; + } + + /** + *

    Agreement to add to the Application.

    + * @param agreement value to be set + * @return Builder + */ + + public AddApplicationAgreementUpdateActionBuilder agreement( + final com.commercetools.checkout.models.application.ApplicationAgreementDraft agreement) { + this.agreement = agreement; + return this; + } + + /** + *

    Agreement to add to the Application.

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

    Agreement to add to the Application.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementDraft getAgreement() { + return this.agreement; + } + + public void setAgreement(final com.commercetools.checkout.models.application.ApplicationAgreementDraft agreement) { + this.agreement = agreement; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddApplicationAgreementUpdateActionImpl that = (AddApplicationAgreementUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreement, that.agreement) + .append(action, that.action) + .append(agreement, that.agreement) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreement).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreement", agreement) + .build(); + } + + @Override + public AddApplicationAgreementUpdateAction copyDeep() { + return AddApplicationAgreementUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateAction.java new file mode 100644 index 00000000000..8d963fff02b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * AddCountryUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddCountryUpdateAction addCountryUpdateAction = AddCountryUpdateAction.builder()
    + *             .country("{country}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("addCountry") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddCountryUpdateActionImpl.class) +public interface AddCountryUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for AddCountryUpdateAction + */ + String ADD_COUNTRY = "addCountry"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Country to add. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return country + */ + @NotNull + @JsonProperty("country") + public String getCountry(); + + /** + *

    Country to add. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param country value to be set + */ + + public void setCountry(final String country); + + /** + * factory method + * @return instance of AddCountryUpdateAction + */ + public static AddCountryUpdateAction of() { + return new AddCountryUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy AddCountryUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static AddCountryUpdateAction of(final AddCountryUpdateAction template) { + AddCountryUpdateActionImpl instance = new AddCountryUpdateActionImpl(); + instance.setCountry(template.getCountry()); + return instance; + } + + public AddCountryUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of AddCountryUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddCountryUpdateAction deepCopy(@Nullable final AddCountryUpdateAction template) { + if (template == null) { + return null; + } + AddCountryUpdateActionImpl instance = new AddCountryUpdateActionImpl(); + instance.setCountry(template.getCountry()); + return instance; + } + + /** + * builder factory method for AddCountryUpdateAction + * @return builder + */ + public static AddCountryUpdateActionBuilder builder() { + return AddCountryUpdateActionBuilder.of(); + } + + /** + * create builder for AddCountryUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddCountryUpdateActionBuilder builder(final AddCountryUpdateAction template) { + return AddCountryUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddCountryUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionBuilder.java new file mode 100644 index 00000000000..aaaacc6dc2d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AddCountryUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AddCountryUpdateAction addCountryUpdateAction = AddCountryUpdateAction.builder()
    + *             .country("{country}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddCountryUpdateActionBuilder implements Builder { + + private String country; + + /** + *

    Country to add. Represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Country to add. Represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Country to add. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + */ + + public String getCountry() { + return this.country; + } + + public void setCountry(final String country) { + this.country = country; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddCountryUpdateActionImpl that = (AddCountryUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(country, that.country) + .append(action, that.action) + .append(country, that.country) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(country).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("country", country) + .build(); + } + + @Override + public AddCountryUpdateAction copyDeep() { + return AddCountryUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOrigins.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOrigins.java new file mode 100644 index 00000000000..e634f3bc4b2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOrigins.java @@ -0,0 +1,149 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * AllowedOrigins + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AllowedOrigins allowedOrigins = AllowedOrigins.builder()
    + *             .allowAll(true)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AllowedOriginsImpl.class) +public interface AllowedOrigins { + + /** + *

    Indicates whether all the origin URLs are allowed or not.

    + * @return allowAll + */ + @NotNull + @JsonProperty("allowAll") + public Boolean getAllowAll(); + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

    + * @return origins + */ + + @JsonProperty("origins") + public List getOrigins(); + + /** + *

    Indicates whether all the origin URLs are allowed or not.

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

    Value of the URL to set. If empty, any existing value will be removed.

    + * @param origins values to be set + */ + + @JsonIgnore + public void setOrigins(final String... origins); + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

    + * @param origins values to be set + */ + + public void setOrigins(final List origins); + + /** + * factory method + * @return instance of AllowedOrigins + */ + public static AllowedOrigins of() { + return new AllowedOriginsImpl(); + } + + /** + * factory method to create a shallow copy AllowedOrigins + * @param template instance to be copied + * @return copy instance + */ + public static AllowedOrigins of(final AllowedOrigins template) { + AllowedOriginsImpl instance = new AllowedOriginsImpl(); + instance.setAllowAll(template.getAllowAll()); + instance.setOrigins(template.getOrigins()); + return instance; + } + + public AllowedOrigins copyDeep(); + + /** + * factory method to create a deep copy of AllowedOrigins + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AllowedOrigins deepCopy(@Nullable final AllowedOrigins template) { + if (template == null) { + return null; + } + AllowedOriginsImpl instance = new AllowedOriginsImpl(); + instance.setAllowAll(template.getAllowAll()); + instance.setOrigins(Optional.ofNullable(template.getOrigins()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for AllowedOrigins + * @return builder + */ + public static AllowedOriginsBuilder builder() { + return AllowedOriginsBuilder.of(); + } + + /** + * create builder for AllowedOrigins instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AllowedOriginsBuilder builder(final AllowedOrigins template) { + return AllowedOriginsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAllowedOrigins(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOriginsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOriginsBuilder.java new file mode 100644 index 00000000000..c7610f419c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/AllowedOriginsBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AllowedOriginsBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AllowedOrigins allowedOrigins = AllowedOrigins.builder()
    + *             .allowAll(true)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AllowedOriginsBuilder implements Builder { + + private Boolean allowAll; + + @Nullable + private java.util.List origins; + + /** + *

    Indicates whether all the origin URLs are allowed or not.

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

    Value of the URL to set. If empty, any existing value will be removed.

    + * @param origins value to be set + * @return Builder + */ + + public AllowedOriginsBuilder origins(@Nullable final String... origins) { + this.origins = new ArrayList<>(Arrays.asList(origins)); + return this; + } + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

    + * @param origins value to be set + * @return Builder + */ + + public AllowedOriginsBuilder origins(@Nullable final java.util.List origins) { + this.origins = origins; + return this; + } + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

    + * @param origins value to be set + * @return Builder + */ + + public AllowedOriginsBuilder plusOrigins(@Nullable final String... origins) { + if (this.origins == null) { + this.origins = new ArrayList<>(); + } + this.origins.addAll(Arrays.asList(origins)); + return this; + } + + /** + *

    Indicates whether all the origin URLs are allowed or not.

    + * @return allowAll + */ + + public Boolean getAllowAll() { + return this.allowAll; + } + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

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

    Indicates whether all the origin URLs are allowed or not.

    + */ + + public Boolean getAllowAll() { + return this.allowAll; + } + + /** + *

    Value of the URL to set. If empty, any existing value will be removed.

    + */ + + public java.util.List getOrigins() { + return this.origins; + } + + public void setAllowAll(final Boolean allowAll) { + this.allowAll = allowAll; + } + + public void setOrigins(final String... origins) { + this.origins = new ArrayList<>(Arrays.asList(origins)); + } + + public void setOrigins(final java.util.List origins) { + this.origins = origins; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AllowedOriginsImpl that = (AllowedOriginsImpl) o; + + return new EqualsBuilder().append(allowAll, that.allowAll) + .append(origins, that.origins) + .append(allowAll, that.allowAll) + .append(origins, that.origins) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(allowAll).append(origins).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("allowAll", allowAll) + .append("origins", origins) + .build(); + } + + @Override + public AllowedOrigins copyDeep() { + return AllowedOrigins.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/Application.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/Application.java new file mode 100644 index 00000000000..c719ffb313c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/Application.java @@ -0,0 +1,437 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment_integration.CreatedBy; +import com.commercetools.checkout.models.payment_integration.LastModifiedBy; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * Application + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     Application application = Application.builder()
    + *             .id("{id}")
    + *             .version(1)
    + *             .key("{key}")
    + *             .name("{name}")
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .mode(ApplicationMode.COMPLETE_FLOW)
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationImpl.class) +public interface Application { + + /** + *

    Unique identifier of the Application.

    + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

    Current version of the Application.

    + * @return version + */ + @NotNull + @JsonProperty("version") + public Integer getVersion(); + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @return status + */ + + @JsonProperty("status") + public ApplicationStatus getStatus(); + + /** + *

    Name of the Application.

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

    Description of the Application.

    + * @return description + */ + + @JsonProperty("description") + public String getDescription(); + + /** + *

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @return logo + */ + @Valid + @JsonProperty("logo") + public ApplicationLogo getLogo(); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return countries + */ + @NotNull + @JsonProperty("countries") + public List getCountries(); + + /** + *

    Allowed origin URLs for the Application.

    + * @return allowedOrigins + */ + @NotNull + @Valid + @JsonProperty("allowedOrigins") + public AllowedOrigins getAllowedOrigins(); + + /** + *

    Checkout mode to use for the Application.

    + * @return mode + */ + @NotNull + @JsonProperty("mode") + public ApplicationMode getMode(); + + /** + *

    Sets the payment configuration options of the Application.

    + * @return paymentsConfiguration + */ + @NotNull + @Valid + @JsonProperty("paymentsConfiguration") + public PaymentsConfiguration getPaymentsConfiguration(); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @return agreements + */ + @Valid + @JsonProperty("agreements") + public List getAgreements(); + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @return discountsConfiguration + */ + @Valid + @JsonProperty("discountsConfiguration") + public DiscountsConfiguration getDiscountsConfiguration(); + + /** + *

    Date and time (UTC) the Application was initially created.

    + * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

    IDs and references that created the Application.

    + * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

    Date and time (UTC) the Application was last updated.

    + * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

    IDs and references that last modified the Application.

    + * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

    Unique identifier of the Application.

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

    Current version of the Application.

    + * @param version value to be set + */ + + public void setVersion(final Integer version); + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationStatus status); + + /** + *

    Name of the Application.

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

    Description of the Application.

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

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @param logo value to be set + */ + + public void setLogo(final ApplicationLogo logo); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + @JsonIgnore + public void setCountries(final String... countries); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + public void setCountries(final List countries); + + /** + *

    Allowed origin URLs for the Application.

    + * @param allowedOrigins value to be set + */ + + public void setAllowedOrigins(final AllowedOrigins allowedOrigins); + + /** + *

    Checkout mode to use for the Application.

    + * @param mode value to be set + */ + + public void setMode(final ApplicationMode mode); + + /** + *

    Sets the payment configuration options of the Application.

    + * @param paymentsConfiguration value to be set + */ + + public void setPaymentsConfiguration(final PaymentsConfiguration paymentsConfiguration); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements values to be set + */ + + @JsonIgnore + public void setAgreements(final ApplicationAgreement... agreements); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements values to be set + */ + + public void setAgreements(final List agreements); + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param discountsConfiguration value to be set + */ + + public void setDiscountsConfiguration(final DiscountsConfiguration discountsConfiguration); + + /** + *

    Date and time (UTC) the Application was initially created.

    + * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

    IDs and references that created the Application.

    + * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + *

    Date and time (UTC) the Application was last updated.

    + * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *

    IDs and references that last modified the Application.

    + * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + * factory method + * @return instance of Application + */ + public static Application of() { + return new ApplicationImpl(); + } + + /** + * factory method to create a shallow copy Application + * @param template instance to be copied + * @return copy instance + */ + public static Application of(final Application template) { + ApplicationImpl instance = new ApplicationImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setKey(template.getKey()); + instance.setStatus(template.getStatus()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setLogo(template.getLogo()); + instance.setCountries(template.getCountries()); + instance.setAllowedOrigins(template.getAllowedOrigins()); + instance.setMode(template.getMode()); + instance.setPaymentsConfiguration(template.getPaymentsConfiguration()); + instance.setAgreements(template.getAgreements()); + instance.setDiscountsConfiguration(template.getDiscountsConfiguration()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + return instance; + } + + public Application copyDeep(); + + /** + * factory method to create a deep copy of Application + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Application deepCopy(@Nullable final Application template) { + if (template == null) { + return null; + } + ApplicationImpl instance = new ApplicationImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setKey(template.getKey()); + instance.setStatus(template.getStatus()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setLogo(com.commercetools.checkout.models.application.ApplicationLogo.deepCopy(template.getLogo())); + instance.setCountries(Optional.ofNullable(template.getCountries()).map(ArrayList::new).orElse(null)); + instance.setAllowedOrigins( + com.commercetools.checkout.models.application.AllowedOrigins.deepCopy(template.getAllowedOrigins())); + instance.setMode(template.getMode()); + instance.setPaymentsConfiguration(com.commercetools.checkout.models.application.PaymentsConfiguration + .deepCopy(template.getPaymentsConfiguration())); + instance.setAgreements(Optional.ofNullable(template.getAgreements()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.application.ApplicationAgreement::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setDiscountsConfiguration(com.commercetools.checkout.models.application.DiscountsConfiguration + .deepCopy(template.getDiscountsConfiguration())); + instance.setCreatedAt(template.getCreatedAt()); + instance.setCreatedBy( + com.commercetools.checkout.models.payment_integration.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(com.commercetools.checkout.models.payment_integration.LastModifiedBy + .deepCopy(template.getLastModifiedBy())); + return instance; + } + + /** + * builder factory method for Application + * @return builder + */ + public static ApplicationBuilder builder() { + return ApplicationBuilder.of(); + } + + /** + * create builder for Application instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationBuilder builder(final Application template) { + return ApplicationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplication(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreement.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreement.java new file mode 100644 index 00000000000..bbfe1244733 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreement.java @@ -0,0 +1,199 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ApplicationAgreement + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationAgreement applicationAgreement = ApplicationAgreement.builder()
    + *             .id("{id}")
    + *             .name("{name}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationAgreementImpl.class) +public interface ApplicationAgreement { + + /** + *

    Unique identifier of the ApplicationAgreement.

    + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

    Unique name identifier for the ApplicationAgreement.

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

    Type of agreement.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public ApplicationAgreementType getType(); + + /** + *

    Indicates whether the agreement is active or not.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public ApplicationAgreementStatus getStatus(); + + /** + *

    Text to display in checkout in Markdown format.

    + * @return text + */ + @NotNull + @Valid + @JsonProperty("text") + public LocalizedString getText(); + + /** + *

    Unique identifier of the ApplicationAgreement.

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

    Unique name identifier for the ApplicationAgreement.

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

    Type of agreement.

    + * @param type value to be set + */ + + public void setType(final ApplicationAgreementType type); + + /** + *

    Indicates whether the agreement is active or not.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationAgreementStatus status); + + /** + *

    Text to display in checkout in Markdown format.

    + * @param text value to be set + */ + + public void setText(final LocalizedString text); + + /** + * factory method + * @return instance of ApplicationAgreement + */ + public static ApplicationAgreement of() { + return new ApplicationAgreementImpl(); + } + + /** + * factory method to create a shallow copy ApplicationAgreement + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationAgreement of(final ApplicationAgreement template) { + ApplicationAgreementImpl instance = new ApplicationAgreementImpl(); + instance.setId(template.getId()); + instance.setName(template.getName()); + instance.setType(template.getType()); + instance.setStatus(template.getStatus()); + instance.setText(template.getText()); + return instance; + } + + public ApplicationAgreement copyDeep(); + + /** + * factory method to create a deep copy of ApplicationAgreement + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationAgreement deepCopy(@Nullable final ApplicationAgreement template) { + if (template == null) { + return null; + } + ApplicationAgreementImpl instance = new ApplicationAgreementImpl(); + instance.setId(template.getId()); + instance.setName(template.getName()); + instance.setType(template.getType()); + instance.setStatus(template.getStatus()); + instance.setText(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getText())); + return instance; + } + + /** + * builder factory method for ApplicationAgreement + * @return builder + */ + public static ApplicationAgreementBuilder builder() { + return ApplicationAgreementBuilder.of(); + } + + /** + * create builder for ApplicationAgreement instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationAgreementBuilder builder(final ApplicationAgreement template) { + return ApplicationAgreementBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationAgreement(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementBuilder.java new file mode 100644 index 00000000000..181f2b24a8a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementBuilder.java @@ -0,0 +1,209 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationAgreementBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationAgreement applicationAgreement = ApplicationAgreement.builder()
    + *             .id("{id}")
    + *             .name("{name}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationAgreementBuilder implements Builder { + + private String id; + + private String name; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + *

    Unique identifier of the ApplicationAgreement.

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

    Unique name identifier for the ApplicationAgreement.

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

    Type of agreement.

    + * @param type value to be set + * @return Builder + */ + + public ApplicationAgreementBuilder type( + final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + return this; + } + + /** + *

    Indicates whether the agreement is active or not.

    + * @param status value to be set + * @return Builder + */ + + public ApplicationAgreementBuilder status( + final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param builder function to build the text value + * @return Builder + */ + + public ApplicationAgreementBuilder text( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param builder function to build the text value + * @return Builder + */ + + public ApplicationAgreementBuilder withText( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param text value to be set + * @return Builder + */ + + public ApplicationAgreementBuilder text(final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + return this; + } + + /** + *

    Unique identifier of the ApplicationAgreement.

    + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

    Unique name identifier for the ApplicationAgreement.

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

    Type of agreement.

    + * @return type + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + /** + *

    Indicates whether the agreement is active or not.

    + * @return status + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @return text + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + /** + * builds ApplicationAgreement with checking for non-null required values + * @return ApplicationAgreement + */ + public ApplicationAgreement build() { + Objects.requireNonNull(id, ApplicationAgreement.class + ": id is missing"); + Objects.requireNonNull(name, ApplicationAgreement.class + ": name is missing"); + Objects.requireNonNull(type, ApplicationAgreement.class + ": type is missing"); + Objects.requireNonNull(status, ApplicationAgreement.class + ": status is missing"); + Objects.requireNonNull(text, ApplicationAgreement.class + ": text is missing"); + return new ApplicationAgreementImpl(id, name, type, status, text); + } + + /** + * builds ApplicationAgreement without checking for non-null required values + * @return ApplicationAgreement + */ + public ApplicationAgreement buildUnchecked() { + return new ApplicationAgreementImpl(id, name, type, status, text); + } + + /** + * factory method for an instance of ApplicationAgreementBuilder + * @return builder + */ + public static ApplicationAgreementBuilder of() { + return new ApplicationAgreementBuilder(); + } + + /** + * create builder for ApplicationAgreement instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationAgreementBuilder of(final ApplicationAgreement template) { + ApplicationAgreementBuilder builder = new ApplicationAgreementBuilder(); + builder.id = template.getId(); + builder.name = template.getName(); + builder.type = template.getType(); + builder.status = template.getStatus(); + builder.text = template.getText(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraft.java new file mode 100644 index 00000000000..cadb078e6f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraft.java @@ -0,0 +1,181 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ApplicationAgreementDraft + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationAgreementDraft applicationAgreementDraft = ApplicationAgreementDraft.builder()
    + *             .name("{name}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationAgreementDraftImpl.class) +public interface ApplicationAgreementDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

    Unique name for identifying the agreement.

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

    Type of agreement.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public ApplicationAgreementType getType(); + + /** + *

    Indicates whether the agreement is active or not.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public ApplicationAgreementStatus getStatus(); + + /** + *

    Text to display in checkout in Markdown format.

    + * @return text + */ + @NotNull + @Valid + @JsonProperty("text") + public LocalizedString getText(); + + /** + *

    Unique name for identifying the agreement.

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

    Type of agreement.

    + * @param type value to be set + */ + + public void setType(final ApplicationAgreementType type); + + /** + *

    Indicates whether the agreement is active or not.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationAgreementStatus status); + + /** + *

    Text to display in checkout in Markdown format.

    + * @param text value to be set + */ + + public void setText(final LocalizedString text); + + /** + * factory method + * @return instance of ApplicationAgreementDraft + */ + public static ApplicationAgreementDraft of() { + return new ApplicationAgreementDraftImpl(); + } + + /** + * factory method to create a shallow copy ApplicationAgreementDraft + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationAgreementDraft of(final ApplicationAgreementDraft template) { + ApplicationAgreementDraftImpl instance = new ApplicationAgreementDraftImpl(); + instance.setName(template.getName()); + instance.setType(template.getType()); + instance.setStatus(template.getStatus()); + instance.setText(template.getText()); + return instance; + } + + public ApplicationAgreementDraft copyDeep(); + + /** + * factory method to create a deep copy of ApplicationAgreementDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationAgreementDraft deepCopy(@Nullable final ApplicationAgreementDraft template) { + if (template == null) { + return null; + } + ApplicationAgreementDraftImpl instance = new ApplicationAgreementDraftImpl(); + instance.setName(template.getName()); + instance.setType(template.getType()); + instance.setStatus(template.getStatus()); + instance.setText(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getText())); + return instance; + } + + /** + * builder factory method for ApplicationAgreementDraft + * @return builder + */ + public static ApplicationAgreementDraftBuilder builder() { + return ApplicationAgreementDraftBuilder.of(); + } + + /** + * create builder for ApplicationAgreementDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationAgreementDraftBuilder builder(final ApplicationAgreementDraft template) { + return ApplicationAgreementDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationAgreementDraft(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftBuilder.java new file mode 100644 index 00000000000..c83695f3ee8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationAgreementDraftBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationAgreementDraft applicationAgreementDraft = ApplicationAgreementDraft.builder()
    + *             .name("{name}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationAgreementDraftBuilder implements Builder { + + private String name; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + *

    Unique name for identifying the agreement.

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

    Type of agreement.

    + * @param type value to be set + * @return Builder + */ + + public ApplicationAgreementDraftBuilder type( + final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + return this; + } + + /** + *

    Indicates whether the agreement is active or not.

    + * @param status value to be set + * @return Builder + */ + + public ApplicationAgreementDraftBuilder status( + final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param builder function to build the text value + * @return Builder + */ + + public ApplicationAgreementDraftBuilder text( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param builder function to build the text value + * @return Builder + */ + + public ApplicationAgreementDraftBuilder withText( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @param text value to be set + * @return Builder + */ + + public ApplicationAgreementDraftBuilder text(final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + return this; + } + + /** + *

    Unique name for identifying the agreement.

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

    Type of agreement.

    + * @return type + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + /** + *

    Indicates whether the agreement is active or not.

    + * @return status + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + /** + *

    Text to display in checkout in Markdown format.

    + * @return text + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + /** + * builds ApplicationAgreementDraft with checking for non-null required values + * @return ApplicationAgreementDraft + */ + public ApplicationAgreementDraft build() { + Objects.requireNonNull(name, ApplicationAgreementDraft.class + ": name is missing"); + Objects.requireNonNull(type, ApplicationAgreementDraft.class + ": type is missing"); + Objects.requireNonNull(status, ApplicationAgreementDraft.class + ": status is missing"); + Objects.requireNonNull(text, ApplicationAgreementDraft.class + ": text is missing"); + return new ApplicationAgreementDraftImpl(name, type, status, text); + } + + /** + * builds ApplicationAgreementDraft without checking for non-null required values + * @return ApplicationAgreementDraft + */ + public ApplicationAgreementDraft buildUnchecked() { + return new ApplicationAgreementDraftImpl(name, type, status, text); + } + + /** + * factory method for an instance of ApplicationAgreementDraftBuilder + * @return builder + */ + public static ApplicationAgreementDraftBuilder of() { + return new ApplicationAgreementDraftBuilder(); + } + + /** + * create builder for ApplicationAgreementDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationAgreementDraftBuilder of(final ApplicationAgreementDraft template) { + ApplicationAgreementDraftBuilder builder = new ApplicationAgreementDraftBuilder(); + builder.name = template.getName(); + builder.type = template.getType(); + builder.status = template.getStatus(); + builder.text = template.getText(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftImpl.java new file mode 100644 index 00000000000..880125a31ef --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftImpl.java @@ -0,0 +1,140 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ApplicationAgreementDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationAgreementDraftImpl implements ApplicationAgreementDraft, ModelBase { + + private String name; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationAgreementDraftImpl(@JsonProperty("name") final String name, + @JsonProperty("type") final com.commercetools.checkout.models.application.ApplicationAgreementType type, + @JsonProperty("status") final com.commercetools.checkout.models.application.ApplicationAgreementStatus status, + @JsonProperty("text") final com.commercetools.checkout.models.common.LocalizedString text) { + this.name = name; + this.type = type; + this.status = status; + this.text = text; + } + + /** + * create empty instance + */ + public ApplicationAgreementDraftImpl() { + } + + /** + *

    Unique name for identifying the agreement.

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

    Type of agreement.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + /** + *

    Indicates whether the agreement is active or not.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + /** + *

    Text to display in checkout in Markdown format.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + public void setName(final String name) { + this.name = name; + } + + public void setType(final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + } + + public void setText(final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationAgreementDraftImpl that = (ApplicationAgreementDraftImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(type, that.type) + .append(status, that.status) + .append(text, that.text) + .append(name, that.name) + .append(type, that.type) + .append(status, that.status) + .append(text, that.text) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name).append(type).append(status).append(text).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("type", type) + .append("status", status) + .append("text", text) + .build(); + } + + @Override + public ApplicationAgreementDraft copyDeep() { + return ApplicationAgreementDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementImpl.java new file mode 100644 index 00000000000..b74a862007f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementImpl.java @@ -0,0 +1,163 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ApplicationAgreement + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationAgreementImpl implements ApplicationAgreement, ModelBase { + + private String id; + + private String name; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationAgreementImpl(@JsonProperty("id") final String id, @JsonProperty("name") final String name, + @JsonProperty("type") final com.commercetools.checkout.models.application.ApplicationAgreementType type, + @JsonProperty("status") final com.commercetools.checkout.models.application.ApplicationAgreementStatus status, + @JsonProperty("text") final com.commercetools.checkout.models.common.LocalizedString text) { + this.id = id; + this.name = name; + this.type = type; + this.status = status; + this.text = text; + } + + /** + * create empty instance + */ + public ApplicationAgreementImpl() { + } + + /** + *

    Unique identifier of the ApplicationAgreement.

    + */ + + public String getId() { + return this.id; + } + + /** + *

    Unique name identifier for the ApplicationAgreement.

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

    Type of agreement.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + /** + *

    Indicates whether the agreement is active or not.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + /** + *

    Text to display in checkout in Markdown format.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + public void setId(final String id) { + this.id = id; + } + + public void setName(final String name) { + this.name = name; + } + + public void setType(final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + } + + public void setText(final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationAgreementImpl that = (ApplicationAgreementImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(name, that.name) + .append(type, that.type) + .append(status, that.status) + .append(text, that.text) + .append(id, that.id) + .append(name, that.name) + .append(type, that.type) + .append(status, that.status) + .append(text, that.text) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(name) + .append(type) + .append(status) + .append(text) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("name", name) + .append("type", type) + .append("status", status) + .append("text", text) + .build(); + } + + @Override + public ApplicationAgreement copyDeep() { + return ApplicationAgreement.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementStatus.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementStatus.java new file mode 100644 index 00000000000..18ef3e43612 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementStatus.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.application; + +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; + +/** + * ApplicationAgreementStatus + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ApplicationAgreementStatus extends JsonEnum { + + /** +

    The application agreement is active and can be used for processing payments.

    */ + ApplicationAgreementStatus ACTIVE = ApplicationAgreementStatusEnum.ACTIVE; + /** +

    The application agreement is inactive and cannot be used for processing payments.

    */ + ApplicationAgreementStatus INACTIVE = ApplicationAgreementStatusEnum.INACTIVE; + + /** + * possible values of ApplicationAgreementStatus + */ + enum ApplicationAgreementStatusEnum implements ApplicationAgreementStatus { + /** + * Active + */ + ACTIVE("Active"), + + /** + * Inactive + */ + INACTIVE("Inactive"); + private final String jsonName; + + private ApplicationAgreementStatusEnum(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 ApplicationAgreementStatus + * 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 ApplicationAgreementStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ApplicationAgreementStatus() { + @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 ApplicationAgreementStatus[] values() { + return ApplicationAgreementStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementType.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementType.java new file mode 100644 index 00000000000..ff00b045491 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementType.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.application; + +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; + +/** + * ApplicationAgreementType + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ApplicationAgreementType extends JsonEnum { + + /** +

    Display a 'text only' agreement without a checkbox.

    */ + ApplicationAgreementType TEXT = ApplicationAgreementTypeEnum.TEXT; + /** +

    Display an agreement text with a mandatory checkbox.

    */ + ApplicationAgreementType MANDATORY_CHECKBOX = ApplicationAgreementTypeEnum.MANDATORY_CHECKBOX; + + /** + * possible values of ApplicationAgreementType + */ + enum ApplicationAgreementTypeEnum implements ApplicationAgreementType { + /** + * Text + */ + TEXT("Text"), + + /** + * MandatoryCheckbox + */ + MANDATORY_CHECKBOX("MandatoryCheckbox"); + private final String jsonName; + + private ApplicationAgreementTypeEnum(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 ApplicationAgreementType + * 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 ApplicationAgreementType findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ApplicationAgreementType() { + @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 ApplicationAgreementType[] values() { + return ApplicationAgreementTypeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationBuilder.java new file mode 100644 index 00000000000..460c6384e43 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationBuilder.java @@ -0,0 +1,757 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     Application application = Application.builder()
    + *             .id("{id}")
    + *             .version(1)
    + *             .key("{key}")
    + *             .name("{name}")
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .mode(ApplicationMode.COMPLETE_FLOW)
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationBuilder implements Builder { + + private String id; + + private Integer version; + + private String key; + + @Nullable + private com.commercetools.checkout.models.application.ApplicationStatus status; + + private String name; + + @Nullable + private String description; + + @Nullable + private com.commercetools.checkout.models.application.ApplicationLogo logo; + + private java.util.List countries; + + private com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins; + + private com.commercetools.checkout.models.application.ApplicationMode mode; + + private com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration; + + @Nullable + private java.util.List agreements; + + @Nullable + private com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration; + + private java.time.ZonedDateTime createdAt; + + @Nullable + private com.commercetools.checkout.models.payment_integration.CreatedBy createdBy; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy; + + /** + *

    Unique identifier of the Application.

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

    Current version of the Application.

    + * @param version value to be set + * @return Builder + */ + + public ApplicationBuilder version(final Integer version) { + this.version = version; + return this; + } + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @param status value to be set + * @return Builder + */ + + public ApplicationBuilder status( + @Nullable final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + return this; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

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

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @param builder function to build the logo value + * @return Builder + */ + + public ApplicationBuilder logo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()).build(); + return this; + } + + /** + *

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @param builder function to build the logo value + * @return Builder + */ + + public ApplicationBuilder withLogo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()); + return this; + } + + /** + *

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @param logo value to be set + * @return Builder + */ + + public ApplicationBuilder logo(@Nullable final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + return this; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public ApplicationBuilder countries(final java.util.List countries) { + this.countries = countries; + return this; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public ApplicationBuilder plusCountries(final String... countries) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.addAll(Arrays.asList(countries)); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public ApplicationBuilder allowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()) + .build(); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public ApplicationBuilder withAllowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param allowedOrigins value to be set + * @return Builder + */ + + public ApplicationBuilder allowedOrigins( + final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + *

    Checkout mode to use for the Application.

    + * @param mode value to be set + * @return Builder + */ + + public ApplicationBuilder mode(final com.commercetools.checkout.models.application.ApplicationMode mode) { + this.mode = mode; + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public ApplicationBuilder paymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public ApplicationBuilder withPaymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()); + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param paymentsConfiguration value to be set + * @return Builder + */ + + public ApplicationBuilder paymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationBuilder agreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationBuilder agreements( + @Nullable final java.util.List agreements) { + this.agreements = agreements; + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationBuilder plusAgreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.addAll(Arrays.asList(agreements)); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationBuilder plusAgreements( + Function builder) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of()).build()); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationBuilder withAgreements( + Function builder) { + this.agreements = new ArrayList<>(); + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of()).build()); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationBuilder addAgreements( + Function builder) { + return plusAgreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of())); + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationBuilder setAgreements( + Function builder) { + return agreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of())); + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public ApplicationBuilder discountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public ApplicationBuilder withDiscountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()); + return this; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param discountsConfiguration value to be set + * @return Builder + */ + + public ApplicationBuilder discountsConfiguration( + @Nullable final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + return this; + } + + /** + *

    Date and time (UTC) the Application was initially created.

    + * @param createdAt value to be set + * @return Builder + */ + + public ApplicationBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

    IDs and references that created the Application.

    + * @param builder function to build the createdBy value + * @return Builder + */ + + public ApplicationBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.checkout.models.payment_integration.CreatedByBuilder.of()) + .build(); + return this; + } + + /** + *

    IDs and references that created the Application.

    + * @param builder function to build the createdBy value + * @return Builder + */ + + public ApplicationBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.checkout.models.payment_integration.CreatedByBuilder.of()); + return this; + } + + /** + *

    IDs and references that created the Application.

    + * @param createdBy value to be set + * @return Builder + */ + + public ApplicationBuilder createdBy( + @Nullable final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

    Date and time (UTC) the Application was last updated.

    + * @param lastModifiedAt value to be set + * @return Builder + */ + + public ApplicationBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

    IDs and references that last modified the Application.

    + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ApplicationBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder + .apply(com.commercetools.checkout.models.payment_integration.LastModifiedByBuilder.of()) + .build(); + return this; + } + + /** + *

    IDs and references that last modified the Application.

    + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public ApplicationBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder + .apply(com.commercetools.checkout.models.payment_integration.LastModifiedByBuilder.of()); + return this; + } + + /** + *

    IDs and references that last modified the Application.

    + * @param lastModifiedBy value to be set + * @return Builder + */ + + public ApplicationBuilder lastModifiedBy( + @Nullable final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

    Unique identifier of the Application.

    + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

    Current version of the Application.

    + * @return version + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @return status + */ + + @Nullable + public com.commercetools.checkout.models.application.ApplicationStatus getStatus() { + return this.status; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

    + * @return description + */ + + @Nullable + public String getDescription() { + return this.description; + } + + /** + *

    Details of the application logo. It is required if the mode = CompleteFlow.

    + * @return logo + */ + + @Nullable + public com.commercetools.checkout.models.application.ApplicationLogo getLogo() { + return this.logo; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return countries + */ + + public java.util.List getCountries() { + return this.countries; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @return allowedOrigins + */ + + public com.commercetools.checkout.models.application.AllowedOrigins getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + *

    Checkout mode to use for the Application.

    + * @return mode + */ + + public com.commercetools.checkout.models.application.ApplicationMode getMode() { + return this.mode; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @return paymentsConfiguration + */ + + public com.commercetools.checkout.models.application.PaymentsConfiguration getPaymentsConfiguration() { + return this.paymentsConfiguration; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @return agreements + */ + + @Nullable + public java.util.List getAgreements() { + return this.agreements; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @return discountsConfiguration + */ + + @Nullable + public com.commercetools.checkout.models.application.DiscountsConfiguration getDiscountsConfiguration() { + return this.discountsConfiguration; + } + + /** + *

    Date and time (UTC) the Application was initially created.

    + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

    IDs and references that created the Application.

    + * @return createdBy + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

    Date and time (UTC) the Application was last updated.

    + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

    IDs and references that last modified the Application.

    + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * builds Application with checking for non-null required values + * @return Application + */ + public Application build() { + Objects.requireNonNull(id, Application.class + ": id is missing"); + Objects.requireNonNull(version, Application.class + ": version is missing"); + Objects.requireNonNull(key, Application.class + ": key is missing"); + Objects.requireNonNull(name, Application.class + ": name is missing"); + Objects.requireNonNull(countries, Application.class + ": countries is missing"); + Objects.requireNonNull(allowedOrigins, Application.class + ": allowedOrigins is missing"); + Objects.requireNonNull(mode, Application.class + ": mode is missing"); + Objects.requireNonNull(paymentsConfiguration, Application.class + ": paymentsConfiguration is missing"); + Objects.requireNonNull(createdAt, Application.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, Application.class + ": lastModifiedAt is missing"); + return new ApplicationImpl(id, version, key, status, name, description, logo, countries, allowedOrigins, mode, + paymentsConfiguration, agreements, discountsConfiguration, createdAt, createdBy, lastModifiedAt, + lastModifiedBy); + } + + /** + * builds Application without checking for non-null required values + * @return Application + */ + public Application buildUnchecked() { + return new ApplicationImpl(id, version, key, status, name, description, logo, countries, allowedOrigins, mode, + paymentsConfiguration, agreements, discountsConfiguration, createdAt, createdBy, lastModifiedAt, + lastModifiedBy); + } + + /** + * factory method for an instance of ApplicationBuilder + * @return builder + */ + public static ApplicationBuilder of() { + return new ApplicationBuilder(); + } + + /** + * create builder for Application instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationBuilder of(final Application template) { + ApplicationBuilder builder = new ApplicationBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.key = template.getKey(); + builder.status = template.getStatus(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.logo = template.getLogo(); + builder.countries = template.getCountries(); + builder.allowedOrigins = template.getAllowedOrigins(); + builder.mode = template.getMode(); + builder.paymentsConfiguration = template.getPaymentsConfiguration(); + builder.agreements = template.getAgreements(); + builder.discountsConfiguration = template.getDiscountsConfiguration(); + builder.createdAt = template.getCreatedAt(); + builder.createdBy = template.getCreatedBy(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraft.java new file mode 100644 index 00000000000..401361e1353 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraft.java @@ -0,0 +1,326 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ApplicationDraft + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationDraft applicationDraft = ApplicationDraft.builder()
    + *             .key("{key}")
    + *             .name("{name}")
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .mode(ApplicationMode.COMPLETE_FLOW)
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationDraftImpl.class) +public interface ApplicationDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @return status + */ + + @JsonProperty("status") + public ApplicationStatus getStatus(); + + /** + *

    Name of the Application.

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

    Description of the Application.

    + * @return description + */ + + @JsonProperty("description") + public String getDescription(); + + /** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @return logo + */ + @Valid + @JsonProperty("logo") + public ApplicationLogo getLogo(); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return countries + */ + @NotNull + @JsonProperty("countries") + public List getCountries(); + + /** + *

    Allowed origin URLs for the Application.

    + * @return allowedOrigins + */ + @NotNull + @Valid + @JsonProperty("allowedOrigins") + public AllowedOrigins getAllowedOrigins(); + + /** + *

    Checkout mode to use for the Application.

    + * @return mode + */ + @NotNull + @JsonProperty("mode") + public ApplicationMode getMode(); + + /** + *

    Sets the payment configuration options of the Application.

    + * @return paymentsConfiguration + */ + @NotNull + @Valid + @JsonProperty("paymentsConfiguration") + public PaymentsConfiguration getPaymentsConfiguration(); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @return agreements + */ + @Valid + @JsonProperty("agreements") + public List getAgreements(); + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @return discountsConfiguration + */ + @Valid + @JsonProperty("discountsConfiguration") + public DiscountsConfiguration getDiscountsConfiguration(); + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationStatus status); + + /** + *

    Name of the Application.

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

    Description of the Application.

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

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @param logo value to be set + */ + + public void setLogo(final ApplicationLogo logo); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + @JsonIgnore + public void setCountries(final String... countries); + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + public void setCountries(final List countries); + + /** + *

    Allowed origin URLs for the Application.

    + * @param allowedOrigins value to be set + */ + + public void setAllowedOrigins(final AllowedOrigins allowedOrigins); + + /** + *

    Checkout mode to use for the Application.

    + * @param mode value to be set + */ + + public void setMode(final ApplicationMode mode); + + /** + *

    Sets the payment configuration options of the Application.

    + * @param paymentsConfiguration value to be set + */ + + public void setPaymentsConfiguration(final PaymentsConfiguration paymentsConfiguration); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements values to be set + */ + + @JsonIgnore + public void setAgreements(final ApplicationAgreement... agreements); + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements values to be set + */ + + public void setAgreements(final List agreements); + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param discountsConfiguration value to be set + */ + + public void setDiscountsConfiguration(final DiscountsConfiguration discountsConfiguration); + + /** + * factory method + * @return instance of ApplicationDraft + */ + public static ApplicationDraft of() { + return new ApplicationDraftImpl(); + } + + /** + * factory method to create a shallow copy ApplicationDraft + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationDraft of(final ApplicationDraft template) { + ApplicationDraftImpl instance = new ApplicationDraftImpl(); + instance.setKey(template.getKey()); + instance.setStatus(template.getStatus()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setLogo(template.getLogo()); + instance.setCountries(template.getCountries()); + instance.setAllowedOrigins(template.getAllowedOrigins()); + instance.setMode(template.getMode()); + instance.setPaymentsConfiguration(template.getPaymentsConfiguration()); + instance.setAgreements(template.getAgreements()); + instance.setDiscountsConfiguration(template.getDiscountsConfiguration()); + return instance; + } + + public ApplicationDraft copyDeep(); + + /** + * factory method to create a deep copy of ApplicationDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationDraft deepCopy(@Nullable final ApplicationDraft template) { + if (template == null) { + return null; + } + ApplicationDraftImpl instance = new ApplicationDraftImpl(); + instance.setKey(template.getKey()); + instance.setStatus(template.getStatus()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setLogo(com.commercetools.checkout.models.application.ApplicationLogo.deepCopy(template.getLogo())); + instance.setCountries(Optional.ofNullable(template.getCountries()).map(ArrayList::new).orElse(null)); + instance.setAllowedOrigins( + com.commercetools.checkout.models.application.AllowedOrigins.deepCopy(template.getAllowedOrigins())); + instance.setMode(template.getMode()); + instance.setPaymentsConfiguration(com.commercetools.checkout.models.application.PaymentsConfiguration + .deepCopy(template.getPaymentsConfiguration())); + instance.setAgreements(Optional.ofNullable(template.getAgreements()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.application.ApplicationAgreement::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setDiscountsConfiguration(com.commercetools.checkout.models.application.DiscountsConfiguration + .deepCopy(template.getDiscountsConfiguration())); + return instance; + } + + /** + * builder factory method for ApplicationDraft + * @return builder + */ + public static ApplicationDraftBuilder builder() { + return ApplicationDraftBuilder.of(); + } + + /** + * create builder for ApplicationDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationDraftBuilder builder(final ApplicationDraft template) { + return ApplicationDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationDraft(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftBuilder.java new file mode 100644 index 00000000000..92c84cfe029 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftBuilder.java @@ -0,0 +1,552 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationDraftBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationDraft applicationDraft = ApplicationDraft.builder()
    + *             .key("{key}")
    + *             .name("{name}")
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .mode(ApplicationMode.COMPLETE_FLOW)
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationDraftBuilder implements Builder { + + private String key; + + @Nullable + private com.commercetools.checkout.models.application.ApplicationStatus status; + + private String name; + + @Nullable + private String description; + + @Nullable + private com.commercetools.checkout.models.application.ApplicationLogo logo; + + private java.util.List countries; + + private com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins; + + private com.commercetools.checkout.models.application.ApplicationMode mode; + + private com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration; + + @Nullable + private java.util.List agreements; + + @Nullable + private com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration; + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @param status value to be set + * @return Builder + */ + + public ApplicationDraftBuilder status( + @Nullable final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + return this; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

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

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @param builder function to build the logo value + * @return Builder + */ + + public ApplicationDraftBuilder logo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()).build(); + return this; + } + + /** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @param builder function to build the logo value + * @return Builder + */ + + public ApplicationDraftBuilder withLogo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()); + return this; + } + + /** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @param logo value to be set + * @return Builder + */ + + public ApplicationDraftBuilder logo( + @Nullable final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + return this; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public ApplicationDraftBuilder countries(final java.util.List countries) { + this.countries = countries; + return this; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public ApplicationDraftBuilder plusCountries(final String... countries) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.addAll(Arrays.asList(countries)); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public ApplicationDraftBuilder allowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()) + .build(); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public ApplicationDraftBuilder withAllowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()); + return this; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @param allowedOrigins value to be set + * @return Builder + */ + + public ApplicationDraftBuilder allowedOrigins( + final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + *

    Checkout mode to use for the Application.

    + * @param mode value to be set + * @return Builder + */ + + public ApplicationDraftBuilder mode(final com.commercetools.checkout.models.application.ApplicationMode mode) { + this.mode = mode; + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public ApplicationDraftBuilder paymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public ApplicationDraftBuilder withPaymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()); + return this; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @param paymentsConfiguration value to be set + * @return Builder + */ + + public ApplicationDraftBuilder paymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationDraftBuilder agreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationDraftBuilder agreements( + @Nullable final java.util.List agreements) { + this.agreements = agreements; + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param agreements value to be set + * @return Builder + */ + + public ApplicationDraftBuilder plusAgreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.addAll(Arrays.asList(agreements)); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationDraftBuilder plusAgreements( + Function builder) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of()).build()); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationDraftBuilder withAgreements( + Function builder) { + this.agreements = new ArrayList<>(); + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of()).build()); + return this; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationDraftBuilder addAgreements( + Function builder) { + return plusAgreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of())); + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public ApplicationDraftBuilder setAgreements( + Function builder) { + return agreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementBuilder.of())); + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public ApplicationDraftBuilder discountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public ApplicationDraftBuilder withDiscountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()); + return this; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @param discountsConfiguration value to be set + * @return Builder + */ + + public ApplicationDraftBuilder discountsConfiguration( + @Nullable final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + return this; + } + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + * @return status + */ + + @Nullable + public com.commercetools.checkout.models.application.ApplicationStatus getStatus() { + return this.status; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

    + * @return description + */ + + @Nullable + public String getDescription() { + return this.description; + } + + /** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * @return logo + */ + + @Nullable + public com.commercetools.checkout.models.application.ApplicationLogo getLogo() { + return this.logo; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return countries + */ + + public java.util.List getCountries() { + return this.countries; + } + + /** + *

    Allowed origin URLs for the Application.

    + * @return allowedOrigins + */ + + public com.commercetools.checkout.models.application.AllowedOrigins getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + *

    Checkout mode to use for the Application.

    + * @return mode + */ + + public com.commercetools.checkout.models.application.ApplicationMode getMode() { + return this.mode; + } + + /** + *

    Sets the payment configuration options of the Application.

    + * @return paymentsConfiguration + */ + + public com.commercetools.checkout.models.application.PaymentsConfiguration getPaymentsConfiguration() { + return this.paymentsConfiguration; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + * @return agreements + */ + + @Nullable + public java.util.List getAgreements() { + return this.agreements; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + * @return discountsConfiguration + */ + + @Nullable + public com.commercetools.checkout.models.application.DiscountsConfiguration getDiscountsConfiguration() { + return this.discountsConfiguration; + } + + /** + * builds ApplicationDraft with checking for non-null required values + * @return ApplicationDraft + */ + public ApplicationDraft build() { + Objects.requireNonNull(key, ApplicationDraft.class + ": key is missing"); + Objects.requireNonNull(name, ApplicationDraft.class + ": name is missing"); + Objects.requireNonNull(countries, ApplicationDraft.class + ": countries is missing"); + Objects.requireNonNull(allowedOrigins, ApplicationDraft.class + ": allowedOrigins is missing"); + Objects.requireNonNull(mode, ApplicationDraft.class + ": mode is missing"); + Objects.requireNonNull(paymentsConfiguration, ApplicationDraft.class + ": paymentsConfiguration is missing"); + return new ApplicationDraftImpl(key, status, name, description, logo, countries, allowedOrigins, mode, + paymentsConfiguration, agreements, discountsConfiguration); + } + + /** + * builds ApplicationDraft without checking for non-null required values + * @return ApplicationDraft + */ + public ApplicationDraft buildUnchecked() { + return new ApplicationDraftImpl(key, status, name, description, logo, countries, allowedOrigins, mode, + paymentsConfiguration, agreements, discountsConfiguration); + } + + /** + * factory method for an instance of ApplicationDraftBuilder + * @return builder + */ + public static ApplicationDraftBuilder of() { + return new ApplicationDraftBuilder(); + } + + /** + * create builder for ApplicationDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationDraftBuilder of(final ApplicationDraft template) { + ApplicationDraftBuilder builder = new ApplicationDraftBuilder(); + builder.key = template.getKey(); + builder.status = template.getStatus(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.logo = template.getLogo(); + builder.countries = template.getCountries(); + builder.allowedOrigins = template.getAllowedOrigins(); + builder.mode = template.getMode(); + builder.paymentsConfiguration = template.getPaymentsConfiguration(); + builder.agreements = template.getAgreements(); + builder.discountsConfiguration = template.getDiscountsConfiguration(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftImpl.java new file mode 100644 index 00000000000..1f3dd90f798 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationDraftImpl.java @@ -0,0 +1,294 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ApplicationDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationDraftImpl implements ApplicationDraft, ModelBase { + + private String key; + + private com.commercetools.checkout.models.application.ApplicationStatus status; + + private String name; + + private String description; + + private com.commercetools.checkout.models.application.ApplicationLogo logo; + + private java.util.List countries; + + private com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins; + + private com.commercetools.checkout.models.application.ApplicationMode mode; + + private com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration; + + private java.util.List agreements; + + private com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("status") final com.commercetools.checkout.models.application.ApplicationStatus status, + @JsonProperty("name") final String name, @JsonProperty("description") final String description, + @JsonProperty("logo") final com.commercetools.checkout.models.application.ApplicationLogo logo, + @JsonProperty("countries") final java.util.List countries, + @JsonProperty("allowedOrigins") final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins, + @JsonProperty("mode") final com.commercetools.checkout.models.application.ApplicationMode mode, + @JsonProperty("paymentsConfiguration") final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration, + @JsonProperty("agreements") final java.util.List agreements, + @JsonProperty("discountsConfiguration") final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.key = key; + this.status = status; + this.name = name; + this.description = description; + this.logo = logo; + this.countries = countries; + this.allowedOrigins = allowedOrigins; + this.mode = mode; + this.paymentsConfiguration = paymentsConfiguration; + this.agreements = agreements; + this.discountsConfiguration = discountsConfiguration; + } + + /** + * create empty instance + */ + public ApplicationDraftImpl() { + } + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + */ + + public com.commercetools.checkout.models.application.ApplicationStatus getStatus() { + return this.status; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

    + */ + + public String getDescription() { + return this.description; + } + + /** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + */ + + public com.commercetools.checkout.models.application.ApplicationLogo getLogo() { + return this.logo; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + */ + + public java.util.List getCountries() { + return this.countries; + } + + /** + *

    Allowed origin URLs for the Application.

    + */ + + public com.commercetools.checkout.models.application.AllowedOrigins getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + *

    Checkout mode to use for the Application.

    + */ + + public com.commercetools.checkout.models.application.ApplicationMode getMode() { + return this.mode; + } + + /** + *

    Sets the payment configuration options of the Application.

    + */ + + public com.commercetools.checkout.models.application.PaymentsConfiguration getPaymentsConfiguration() { + return this.paymentsConfiguration; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + */ + + public java.util.List getAgreements() { + return this.agreements; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + */ + + public com.commercetools.checkout.models.application.DiscountsConfiguration getDiscountsConfiguration() { + return this.discountsConfiguration; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + } + + public void setName(final String name) { + this.name = name; + } + + public void setDescription(final String description) { + this.description = description; + } + + public void setLogo(final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + } + + public void setCountries(final String... countries) { + this.countries = new ArrayList<>(Arrays.asList(countries)); + } + + public void setCountries(final java.util.List countries) { + this.countries = countries; + } + + public void setAllowedOrigins(final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + } + + public void setMode(final com.commercetools.checkout.models.application.ApplicationMode mode) { + this.mode = mode; + } + + public void setPaymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + } + + public void setAgreements(final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + } + + public void setAgreements( + final java.util.List agreements) { + this.agreements = agreements; + } + + public void setDiscountsConfiguration( + final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationDraftImpl that = (ApplicationDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(status, that.status) + .append(name, that.name) + .append(description, that.description) + .append(logo, that.logo) + .append(countries, that.countries) + .append(allowedOrigins, that.allowedOrigins) + .append(mode, that.mode) + .append(paymentsConfiguration, that.paymentsConfiguration) + .append(agreements, that.agreements) + .append(discountsConfiguration, that.discountsConfiguration) + .append(key, that.key) + .append(status, that.status) + .append(name, that.name) + .append(description, that.description) + .append(logo, that.logo) + .append(countries, that.countries) + .append(allowedOrigins, that.allowedOrigins) + .append(mode, that.mode) + .append(paymentsConfiguration, that.paymentsConfiguration) + .append(agreements, that.agreements) + .append(discountsConfiguration, that.discountsConfiguration) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(status) + .append(name) + .append(description) + .append(logo) + .append(countries) + .append(allowedOrigins) + .append(mode) + .append(paymentsConfiguration) + .append(agreements) + .append(discountsConfiguration) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("status", status) + .append("name", name) + .append("description", description) + .append("logo", logo) + .append("countries", countries) + .append("allowedOrigins", allowedOrigins) + .append("mode", mode) + .append("paymentsConfiguration", paymentsConfiguration) + .append("agreements", agreements) + .append("discountsConfiguration", discountsConfiguration) + .build(); + } + + @Override + public ApplicationDraft copyDeep() { + return ApplicationDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationImpl.java new file mode 100644 index 00000000000..04fb48d889b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationImpl.java @@ -0,0 +1,414 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * Application + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationImpl implements Application, ModelBase { + + private String id; + + private Integer version; + + private String key; + + private com.commercetools.checkout.models.application.ApplicationStatus status; + + private String name; + + private String description; + + private com.commercetools.checkout.models.application.ApplicationLogo logo; + + private java.util.List countries; + + private com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins; + + private com.commercetools.checkout.models.application.ApplicationMode mode; + + private com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration; + + private java.util.List agreements; + + private com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration; + + private java.time.ZonedDateTime createdAt; + + private com.commercetools.checkout.models.payment_integration.CreatedBy createdBy; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Integer version, + @JsonProperty("key") final String key, + @JsonProperty("status") final com.commercetools.checkout.models.application.ApplicationStatus status, + @JsonProperty("name") final String name, @JsonProperty("description") final String description, + @JsonProperty("logo") final com.commercetools.checkout.models.application.ApplicationLogo logo, + @JsonProperty("countries") final java.util.List countries, + @JsonProperty("allowedOrigins") final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins, + @JsonProperty("mode") final com.commercetools.checkout.models.application.ApplicationMode mode, + @JsonProperty("paymentsConfiguration") final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration, + @JsonProperty("agreements") final java.util.List agreements, + @JsonProperty("discountsConfiguration") final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("createdBy") final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.id = id; + this.version = version; + this.key = key; + this.status = status; + this.name = name; + this.description = description; + this.logo = logo; + this.countries = countries; + this.allowedOrigins = allowedOrigins; + this.mode = mode; + this.paymentsConfiguration = paymentsConfiguration; + this.agreements = agreements; + this.discountsConfiguration = discountsConfiguration; + this.createdAt = createdAt; + this.createdBy = createdBy; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + } + + /** + * create empty instance + */ + public ApplicationImpl() { + } + + /** + *

    Unique identifier of the Application.

    + */ + + public String getId() { + return this.id; + } + + /** + *

    Current version of the Application.

    + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    User-defined unique identifier of the Application. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Indicates whether the Application is active or not.

    + */ + + public com.commercetools.checkout.models.application.ApplicationStatus getStatus() { + return this.status; + } + + /** + *

    Name of the Application.

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

    Description of the Application.

    + */ + + public String getDescription() { + return this.description; + } + + /** + *

    Details of the application logo. It is required if the mode = CompleteFlow.

    + */ + + public com.commercetools.checkout.models.application.ApplicationLogo getLogo() { + return this.logo; + } + + /** + *

    List of countries that the Application supports. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + */ + + public java.util.List getCountries() { + return this.countries; + } + + /** + *

    Allowed origin URLs for the Application.

    + */ + + public com.commercetools.checkout.models.application.AllowedOrigins getAllowedOrigins() { + return this.allowedOrigins; + } + + /** + *

    Checkout mode to use for the Application.

    + */ + + public com.commercetools.checkout.models.application.ApplicationMode getMode() { + return this.mode; + } + + /** + *

    Sets the payment configuration options of the Application.

    + */ + + public com.commercetools.checkout.models.application.PaymentsConfiguration getPaymentsConfiguration() { + return this.paymentsConfiguration; + } + + /** + *

    User agreements to display. It is only applicable if the mode is CompleteFlow.

    + */ + + public java.util.List getAgreements() { + return this.agreements; + } + + /** + *

    Sets the discounts configuration options of the Application. It is only applicable if the mode is CompleteFlow.

    + */ + + public com.commercetools.checkout.models.application.DiscountsConfiguration getDiscountsConfiguration() { + return this.discountsConfiguration; + } + + /** + *

    Date and time (UTC) the Application was initially created.

    + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

    IDs and references that created the Application.

    + */ + + public com.commercetools.checkout.models.payment_integration.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

    Date and time (UTC) the Application was last updated.

    + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

    IDs and references that last modified the Application.

    + */ + + public com.commercetools.checkout.models.payment_integration.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Integer version) { + this.version = version; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + } + + public void setName(final String name) { + this.name = name; + } + + public void setDescription(final String description) { + this.description = description; + } + + public void setLogo(final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + } + + public void setCountries(final String... countries) { + this.countries = new ArrayList<>(Arrays.asList(countries)); + } + + public void setCountries(final java.util.List countries) { + this.countries = countries; + } + + public void setAllowedOrigins(final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + } + + public void setMode(final com.commercetools.checkout.models.application.ApplicationMode mode) { + this.mode = mode; + } + + public void setPaymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + } + + public void setAgreements(final com.commercetools.checkout.models.application.ApplicationAgreement... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + } + + public void setAgreements( + final java.util.List agreements) { + this.agreements = agreements; + } + + public void setDiscountsConfiguration( + final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setCreatedBy(final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy( + final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationImpl that = (ApplicationImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(key, that.key) + .append(status, that.status) + .append(name, that.name) + .append(description, that.description) + .append(logo, that.logo) + .append(countries, that.countries) + .append(allowedOrigins, that.allowedOrigins) + .append(mode, that.mode) + .append(paymentsConfiguration, that.paymentsConfiguration) + .append(agreements, that.agreements) + .append(discountsConfiguration, that.discountsConfiguration) + .append(createdAt, that.createdAt) + .append(createdBy, that.createdBy) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(id, that.id) + .append(version, that.version) + .append(key, that.key) + .append(status, that.status) + .append(name, that.name) + .append(description, that.description) + .append(logo, that.logo) + .append(countries, that.countries) + .append(allowedOrigins, that.allowedOrigins) + .append(mode, that.mode) + .append(paymentsConfiguration, that.paymentsConfiguration) + .append(agreements, that.agreements) + .append(discountsConfiguration, that.discountsConfiguration) + .append(createdAt, that.createdAt) + .append(createdBy, that.createdBy) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(key) + .append(status) + .append(name) + .append(description) + .append(logo) + .append(countries) + .append(allowedOrigins) + .append(mode) + .append(paymentsConfiguration) + .append(agreements) + .append(discountsConfiguration) + .append(createdAt) + .append(createdBy) + .append(lastModifiedAt) + .append(lastModifiedBy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("key", key) + .append("status", status) + .append("name", name) + .append("description", description) + .append("logo", logo) + .append("countries", countries) + .append("allowedOrigins", allowedOrigins) + .append("mode", mode) + .append("paymentsConfiguration", paymentsConfiguration) + .append("agreements", agreements) + .append("discountsConfiguration", discountsConfiguration) + .append("createdAt", createdAt) + .append("createdBy", createdBy) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .build(); + } + + @Override + public Application copyDeep() { + return Application.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogo.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogo.java new file mode 100644 index 00000000000..8435b96dc4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogo.java @@ -0,0 +1,121 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationLogo applicationLogo = ApplicationLogo.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationLogoImpl.class) +public interface ApplicationLogo { + + /** + *

    URL of the logo.

    + * @return url + */ + + @JsonProperty("url") + public String getUrl(); + + /** + *

    URL of the logo.

    + * @param url value to be set + */ + + public void setUrl(final String url); + + /** + * factory method + * @return instance of ApplicationLogo + */ + public static ApplicationLogo of() { + return new ApplicationLogoImpl(); + } + + /** + * factory method to create a shallow copy ApplicationLogo + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationLogo of(final ApplicationLogo template) { + ApplicationLogoImpl instance = new ApplicationLogoImpl(); + instance.setUrl(template.getUrl()); + return instance; + } + + public ApplicationLogo copyDeep(); + + /** + * factory method to create a deep copy of ApplicationLogo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationLogo deepCopy(@Nullable final ApplicationLogo template) { + if (template == null) { + return null; + } + ApplicationLogoImpl instance = new ApplicationLogoImpl(); + instance.setUrl(template.getUrl()); + return instance; + } + + /** + * builder factory method for ApplicationLogo + * @return builder + */ + public static ApplicationLogoBuilder builder() { + return ApplicationLogoBuilder.of(); + } + + /** + * create builder for ApplicationLogo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationLogoBuilder builder(final ApplicationLogo template) { + return ApplicationLogoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationLogo(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoBuilder.java new file mode 100644 index 00000000000..eb329d731cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationLogoBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationLogo applicationLogo = ApplicationLogo.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationLogoBuilder implements Builder { + + @Nullable + private String url; + + /** + *

    URL of the logo.

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

    URL of the logo.

    + * @return url + */ + + @Nullable + public String getUrl() { + return this.url; + } + + /** + * builds ApplicationLogo with checking for non-null required values + * @return ApplicationLogo + */ + public ApplicationLogo build() { + return new ApplicationLogoImpl(url); + } + + /** + * builds ApplicationLogo without checking for non-null required values + * @return ApplicationLogo + */ + public ApplicationLogo buildUnchecked() { + return new ApplicationLogoImpl(url); + } + + /** + * factory method for an instance of ApplicationLogoBuilder + * @return builder + */ + public static ApplicationLogoBuilder of() { + return new ApplicationLogoBuilder(); + } + + /** + * create builder for ApplicationLogo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationLogoBuilder of(final ApplicationLogo template) { + ApplicationLogoBuilder builder = new ApplicationLogoBuilder(); + builder.url = template.getUrl(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoImpl.java new file mode 100644 index 00000000000..53250385ab6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationLogoImpl.java @@ -0,0 +1,80 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Details of the Application logo. It is required if the mode is CompleteFlow.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationLogoImpl implements ApplicationLogo, ModelBase { + + private String url; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationLogoImpl(@JsonProperty("url") final String url) { + this.url = url; + } + + /** + * create empty instance + */ + public ApplicationLogoImpl() { + } + + /** + *

    URL of the logo.

    + */ + + public String getUrl() { + return this.url; + } + + public void setUrl(final String url) { + this.url = url; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationLogoImpl that = (ApplicationLogoImpl) o; + + return new EqualsBuilder().append(url, that.url).append(url, that.url).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(url).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("url", url).build(); + } + + @Override + public ApplicationLogo copyDeep() { + return ApplicationLogo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationMode.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationMode.java new file mode 100644 index 00000000000..b579677b703 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationMode.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.application; + +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; + +/** + * ApplicationMode + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ApplicationMode extends JsonEnum { + + /** +

    Checkout will manage all the steps of a checkout process including shipping and billing address, shipping method, and payment.

    */ + ApplicationMode COMPLETE_FLOW = ApplicationModeEnum.COMPLETE_FLOW; + /** +

    Checkout will display only the payment step.

    */ + ApplicationMode PAYMENT_ONLY = ApplicationModeEnum.PAYMENT_ONLY; + + /** + * possible values of ApplicationMode + */ + enum ApplicationModeEnum implements ApplicationMode { + /** + * CompleteFlow + */ + COMPLETE_FLOW("CompleteFlow"), + + /** + * PaymentOnly + */ + PAYMENT_ONLY("PaymentOnly"); + private final String jsonName; + + private ApplicationModeEnum(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 ApplicationMode + * 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 ApplicationMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ApplicationMode() { + @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 ApplicationMode[] values() { + return ApplicationModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java index 504c83d88b5..144d0c7fd77 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReference.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - *

    Reference to an Application.

    + *

    Reference to an Application.

    * *
    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java index 52c58ec920c..288e449ba63 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationReferenceImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Reference to an Application.

    + *

    Reference to an Application.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ApplicationReferenceImpl implements ApplicationReference, ModelBase { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java index 81509d85373..5248e867b97 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifier.java @@ -14,7 +14,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

    Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    + *

    Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    * *
    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java index 68d840ee4c4..cecec848be2 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationResourceIdentifierImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    + *

    Resource identifier to an Application. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ApplicationResourceIdentifierImpl implements ApplicationResourceIdentifier, ModelBase { @@ -47,7 +47,7 @@ public ApplicationResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationStatus.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationStatus.java new file mode 100644 index 00000000000..e2c7b0096e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationStatus.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.application; + +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; + +/** + * ApplicationStatus + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ApplicationStatus extends JsonEnum { + + /** +

    The application status is active and can be used for processing payments.

    */ + ApplicationStatus ACTIVE = ApplicationStatusEnum.ACTIVE; + /** +

    The application status is inactive and cannot be used for processing payments.

    */ + ApplicationStatus INACTIVE = ApplicationStatusEnum.INACTIVE; + + /** + * possible values of ApplicationStatus + */ + enum ApplicationStatusEnum implements ApplicationStatus { + /** + * Active + */ + ACTIVE("Active"), + + /** + * Inactive + */ + INACTIVE("Inactive"); + private final String jsonName; + + private ApplicationStatusEnum(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 ApplicationStatus + * 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 ApplicationStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ApplicationStatus() { + @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 ApplicationStatus[] values() { + return ApplicationStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateAction.java new file mode 100644 index 00000000000..0a98e04b863 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateAction.java @@ -0,0 +1,269 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Base type for all Application update actions.

    + * + *
    + * Example to create a subtype instance using the builder pattern + *
    + *
    
    + *     ApplicationUpdateAction applicationUpdateAction = ApplicationUpdateAction.addAllowedOriginBuilder()
    + *             origin("{origin}")
    + *             .build()
    + * 
    + *
    + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = ApplicationUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = ApplicationUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ApplicationUpdateAction { + + /** + *

    Type of update action to be performed on the Application.

    + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + public ApplicationUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of ApplicationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationUpdateAction deepCopy(@Nullable final ApplicationUpdateAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof ApplicationUpdateActionImpl)) { + return template.copyDeep(); + } + ApplicationUpdateActionImpl instance = new ApplicationUpdateActionImpl(); + return instance; + } + + /** + * builder for addAllowedOrigin subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.AddAllowedOriginUpdateActionBuilder addAllowedOriginBuilder() { + return com.commercetools.checkout.models.application.AddAllowedOriginUpdateActionBuilder.of(); + } + + /** + * builder for addAgreement subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.AddApplicationAgreementUpdateActionBuilder addAgreementBuilder() { + return com.commercetools.checkout.models.application.AddApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * builder for addCountry subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.AddCountryUpdateActionBuilder addCountryBuilder() { + return com.commercetools.checkout.models.application.AddCountryUpdateActionBuilder.of(); + } + + /** + * builder for removeAllowedOrigin subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.RemoveAllowedOriginUpdateActionBuilder removeAllowedOriginBuilder() { + return com.commercetools.checkout.models.application.RemoveAllowedOriginUpdateActionBuilder.of(); + } + + /** + * builder for removeAgreement subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.RemoveApplicationAgreementUpdateActionBuilder removeAgreementBuilder() { + return com.commercetools.checkout.models.application.RemoveApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * builder for removeCountry subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.RemoveCountryUpdateActionBuilder removeCountryBuilder() { + return com.commercetools.checkout.models.application.RemoveCountryUpdateActionBuilder.of(); + } + + /** + * builder for reorderAgreement subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.ReorderApplicationAgreementUpdateActionBuilder reorderAgreementBuilder() { + return com.commercetools.checkout.models.application.ReorderApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * builder for setActivePaymentComponentType subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetActivePaymentComponentTypeUpdateActionBuilder setActivePaymentComponentTypeBuilder() { + return com.commercetools.checkout.models.application.SetActivePaymentComponentTypeUpdateActionBuilder.of(); + } + + /** + * builder for setAllowAllOrigins subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetAllowAllOriginsUpdateActionBuilder setAllowAllOriginsBuilder() { + return com.commercetools.checkout.models.application.SetAllowAllOriginsUpdateActionBuilder.of(); + } + + /** + * builder for setAllowedOrigins subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetAllowedOriginsUpdateActionBuilder setAllowedOriginsBuilder() { + return com.commercetools.checkout.models.application.SetAllowedOriginsUpdateActionBuilder.of(); + } + + /** + * builder for setAgreementName subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationAgreementNameUpdateActionBuilder setAgreementNameBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementNameUpdateActionBuilder.of(); + } + + /** + * builder for setAgreementStatus subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationAgreementStatusUpdateActionBuilder setAgreementStatusBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementStatusUpdateActionBuilder.of(); + } + + /** + * builder for setAgreementText subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationAgreementTextUpdateActionBuilder setAgreementTextBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementTextUpdateActionBuilder.of(); + } + + /** + * builder for setAgreementType subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationAgreementTypeUpdateActionBuilder setAgreementTypeBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementTypeUpdateActionBuilder.of(); + } + + /** + * builder for setAgreements subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationAgreementsUpdateActionBuilder setAgreementsBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementsUpdateActionBuilder.of(); + } + + /** + * builder for setApplicationLogo subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationLogoUpdateActionBuilder setApplicationLogoBuilder() { + return com.commercetools.checkout.models.application.SetApplicationLogoUpdateActionBuilder.of(); + } + + /** + * builder for setName subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationNameUpdateActionBuilder setNameBuilder() { + return com.commercetools.checkout.models.application.SetApplicationNameUpdateActionBuilder.of(); + } + + /** + * builder for setStatus subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetApplicationStatusUpdateActionBuilder setStatusBuilder() { + return com.commercetools.checkout.models.application.SetApplicationStatusUpdateActionBuilder.of(); + } + + /** + * builder for setCountries subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetCountriesUpdateActionBuilder setCountriesBuilder() { + return com.commercetools.checkout.models.application.SetCountriesUpdateActionBuilder.of(); + } + + /** + * builder for setDescription subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetDescriptionUpdateActionBuilder setDescriptionBuilder() { + return com.commercetools.checkout.models.application.SetDescriptionUpdateActionBuilder.of(); + } + + /** + * builder for setDiscountsConfiguration subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetDiscountsConfigurationUpdateActionBuilder setDiscountsConfigurationBuilder() { + return com.commercetools.checkout.models.application.SetDiscountsConfigurationUpdateActionBuilder.of(); + } + + /** + * builder for setPaymentReturnUrl subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetPaymentReturnUrlUpdateActionBuilder setPaymentReturnUrlBuilder() { + return com.commercetools.checkout.models.application.SetPaymentReturnUrlUpdateActionBuilder.of(); + } + + /** + * builder for setPaymentsConfiguration subtype + * @return builder + */ + public static com.commercetools.checkout.models.application.SetPaymentsConfigurationUpdateActionBuilder setPaymentsConfigurationBuilder() { + return com.commercetools.checkout.models.application.SetPaymentsConfigurationUpdateActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionBuilder.java new file mode 100644 index 00000000000..c2f6f9e9375 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionBuilder.java @@ -0,0 +1,114 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationUpdateActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationUpdateActionBuilder { + + public com.commercetools.checkout.models.application.AddAllowedOriginUpdateActionBuilder addAllowedOriginBuilder() { + return com.commercetools.checkout.models.application.AddAllowedOriginUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.AddApplicationAgreementUpdateActionBuilder addAgreementBuilder() { + return com.commercetools.checkout.models.application.AddApplicationAgreementUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.AddCountryUpdateActionBuilder addCountryBuilder() { + return com.commercetools.checkout.models.application.AddCountryUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.RemoveAllowedOriginUpdateActionBuilder removeAllowedOriginBuilder() { + return com.commercetools.checkout.models.application.RemoveAllowedOriginUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.RemoveApplicationAgreementUpdateActionBuilder removeAgreementBuilder() { + return com.commercetools.checkout.models.application.RemoveApplicationAgreementUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.RemoveCountryUpdateActionBuilder removeCountryBuilder() { + return com.commercetools.checkout.models.application.RemoveCountryUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.ReorderApplicationAgreementUpdateActionBuilder reorderAgreementBuilder() { + return com.commercetools.checkout.models.application.ReorderApplicationAgreementUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetActivePaymentComponentTypeUpdateActionBuilder setActivePaymentComponentTypeBuilder() { + return com.commercetools.checkout.models.application.SetActivePaymentComponentTypeUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetAllowAllOriginsUpdateActionBuilder setAllowAllOriginsBuilder() { + return com.commercetools.checkout.models.application.SetAllowAllOriginsUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetAllowedOriginsUpdateActionBuilder setAllowedOriginsBuilder() { + return com.commercetools.checkout.models.application.SetAllowedOriginsUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationAgreementNameUpdateActionBuilder setAgreementNameBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementNameUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationAgreementStatusUpdateActionBuilder setAgreementStatusBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementStatusUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationAgreementTextUpdateActionBuilder setAgreementTextBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementTextUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationAgreementTypeUpdateActionBuilder setAgreementTypeBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementTypeUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationAgreementsUpdateActionBuilder setAgreementsBuilder() { + return com.commercetools.checkout.models.application.SetApplicationAgreementsUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationLogoUpdateActionBuilder setApplicationLogoBuilder() { + return com.commercetools.checkout.models.application.SetApplicationLogoUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationNameUpdateActionBuilder setNameBuilder() { + return com.commercetools.checkout.models.application.SetApplicationNameUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetApplicationStatusUpdateActionBuilder setStatusBuilder() { + return com.commercetools.checkout.models.application.SetApplicationStatusUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetCountriesUpdateActionBuilder setCountriesBuilder() { + return com.commercetools.checkout.models.application.SetCountriesUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetDescriptionUpdateActionBuilder setDescriptionBuilder() { + return com.commercetools.checkout.models.application.SetDescriptionUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetDiscountsConfigurationUpdateActionBuilder setDiscountsConfigurationBuilder() { + return com.commercetools.checkout.models.application.SetDiscountsConfigurationUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetPaymentReturnUrlUpdateActionBuilder setPaymentReturnUrlBuilder() { + return com.commercetools.checkout.models.application.SetPaymentReturnUrlUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.application.SetPaymentsConfigurationUpdateActionBuilder setPaymentsConfigurationBuilder() { + return com.commercetools.checkout.models.application.SetPaymentsConfigurationUpdateActionBuilder.of(); + } + + /** + * factory method for an instance of ApplicationUpdateActionBuilder + * @return builder + */ + public static ApplicationUpdateActionBuilder of() { + return new ApplicationUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionImpl.java new file mode 100644 index 00000000000..1311f2478d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Base type for all Application update actions.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationUpdateActionImpl implements ApplicationUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public ApplicationUpdateActionImpl() { + } + + /** + *

    Type of update action to be performed on the Application.

    + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationUpdateActionImpl that = (ApplicationUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + + @Override + public ApplicationUpdateAction copyDeep() { + return ApplicationUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActions.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActions.java new file mode 100644 index 00000000000..ce1689330a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActions.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    Update actions for Applications.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationUpdateActions applicationUpdateActions = ApplicationUpdateActions.builder()
    + *             .version(1)
    + *             .plusActions(actionsBuilder -> actionsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ApplicationUpdateActionsImpl.class) +public interface ApplicationUpdateActions { + + /** + *

    Expected version of the Application on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @return version + */ + @NotNull + @JsonProperty("version") + public Integer getVersion(); + + /** + *

    Update actions to be performed on the Application.

    + * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

    Expected version of the Application on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @param version value to be set + */ + + public void setVersion(final Integer version); + + /** + *

    Update actions to be performed on the Application.

    + * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final ApplicationUpdateAction... actions); + + /** + *

    Update actions to be performed on the Application.

    + * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of ApplicationUpdateActions + */ + public static ApplicationUpdateActions of() { + return new ApplicationUpdateActionsImpl(); + } + + /** + * factory method to create a shallow copy ApplicationUpdateActions + * @param template instance to be copied + * @return copy instance + */ + public static ApplicationUpdateActions of(final ApplicationUpdateActions template) { + ApplicationUpdateActionsImpl instance = new ApplicationUpdateActionsImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + public ApplicationUpdateActions copyDeep(); + + /** + * factory method to create a deep copy of ApplicationUpdateActions + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ApplicationUpdateActions deepCopy(@Nullable final ApplicationUpdateActions template) { + if (template == null) { + return null; + } + ApplicationUpdateActionsImpl instance = new ApplicationUpdateActionsImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.application.ApplicationUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ApplicationUpdateActions + * @return builder + */ + public static ApplicationUpdateActionsBuilder builder() { + return ApplicationUpdateActionsBuilder.of(); + } + + /** + * create builder for ApplicationUpdateActions instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationUpdateActionsBuilder builder(final ApplicationUpdateActions template) { + return ApplicationUpdateActionsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withApplicationUpdateActions(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsBuilder.java new file mode 100644 index 00000000000..412faf6a9e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsBuilder.java @@ -0,0 +1,166 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ApplicationUpdateActionsBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ApplicationUpdateActions applicationUpdateActions = ApplicationUpdateActions.builder()
    + *             .version(1)
    + *             .plusActions(actionsBuilder -> actionsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationUpdateActionsBuilder implements Builder { + + private Integer version; + + private java.util.List actions; + + /** + *

    Expected version of the Application on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @param version value to be set + * @return Builder + */ + + public ApplicationUpdateActionsBuilder version(final Integer version) { + this.version = version; + return this; + } + + /** + *

    Update actions to be performed on the Application.

    + * @param actions value to be set + * @return Builder + */ + + public ApplicationUpdateActionsBuilder actions( + final com.commercetools.checkout.models.application.ApplicationUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

    Update actions to be performed on the Application.

    + * @param actions value to be set + * @return Builder + */ + + public ApplicationUpdateActionsBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

    Update actions to be performed on the Application.

    + * @param actions value to be set + * @return Builder + */ + + public ApplicationUpdateActionsBuilder plusActions( + final com.commercetools.checkout.models.application.ApplicationUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

    Update actions to be performed on the Application.

    + * @param builder function to build the actions value + * @return Builder + */ + + public ApplicationUpdateActionsBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

    Update actions to be performed on the Application.

    + * @param builder function to build the actions value + * @return Builder + */ + + public ApplicationUpdateActionsBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationUpdateActionBuilder.of()).build()); + return this; + } + + /** + *

    Expected version of the Application on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @return version + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    Update actions to be performed on the Application.

    + * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds ApplicationUpdateActions with checking for non-null required values + * @return ApplicationUpdateActions + */ + public ApplicationUpdateActions build() { + Objects.requireNonNull(version, ApplicationUpdateActions.class + ": version is missing"); + Objects.requireNonNull(actions, ApplicationUpdateActions.class + ": actions is missing"); + return new ApplicationUpdateActionsImpl(version, actions); + } + + /** + * builds ApplicationUpdateActions without checking for non-null required values + * @return ApplicationUpdateActions + */ + public ApplicationUpdateActions buildUnchecked() { + return new ApplicationUpdateActionsImpl(version, actions); + } + + /** + * factory method for an instance of ApplicationUpdateActionsBuilder + * @return builder + */ + public static ApplicationUpdateActionsBuilder of() { + return new ApplicationUpdateActionsBuilder(); + } + + /** + * create builder for ApplicationUpdateActions instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ApplicationUpdateActionsBuilder of(final ApplicationUpdateActions template) { + ApplicationUpdateActionsBuilder builder = new ApplicationUpdateActionsBuilder(); + builder.version = template.getVersion(); + builder.actions = template.getActions(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsImpl.java new file mode 100644 index 00000000000..b72634a8e9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsImpl.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Update actions for Applications.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ApplicationUpdateActionsImpl implements ApplicationUpdateActions, ModelBase { + + private Integer version; + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + ApplicationUpdateActionsImpl(@JsonProperty("version") final Integer version, + @JsonProperty("actions") final java.util.List actions) { + this.version = version; + this.actions = actions; + } + + /** + * create empty instance + */ + public ApplicationUpdateActionsImpl() { + } + + /** + *

    Expected version of the Application on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    Update actions to be performed on the Application.

    + */ + + public java.util.List getActions() { + return this.actions; + } + + public void setVersion(final Integer version) { + this.version = version; + } + + public void setActions(final com.commercetools.checkout.models.application.ApplicationUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ApplicationUpdateActionsImpl that = (ApplicationUpdateActionsImpl) o; + + return new EqualsBuilder().append(version, that.version) + .append(actions, that.actions) + .append(version, that.version) + .append(actions, that.actions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(version).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("version", version) + .append("actions", actions) + .build(); + } + + @Override + public ApplicationUpdateActions copyDeep() { + return ApplicationUpdateActions.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfiguration.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfiguration.java new file mode 100644 index 00000000000..04e0aa386d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfiguration.java @@ -0,0 +1,124 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * DiscountsConfiguration + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DiscountsConfiguration discountsConfiguration = DiscountsConfiguration.builder()
    + *             .allowDiscounts(true)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountsConfigurationImpl.class) +public interface DiscountsConfiguration { + + /** + *

    Indicates if the buyer is able to apply discounts to the cart. It is only applicable if the mode = CompleteFlow.

    + * @return allowDiscounts + */ + @NotNull + @JsonProperty("allowDiscounts") + public Boolean getAllowDiscounts(); + + /** + *

    Indicates if the buyer is able to apply discounts to the cart. It is only applicable if the mode = CompleteFlow.

    + * @param allowDiscounts value to be set + */ + + public void setAllowDiscounts(final Boolean allowDiscounts); + + /** + * factory method + * @return instance of DiscountsConfiguration + */ + public static DiscountsConfiguration of() { + return new DiscountsConfigurationImpl(); + } + + /** + * factory method to create a shallow copy DiscountsConfiguration + * @param template instance to be copied + * @return copy instance + */ + public static DiscountsConfiguration of(final DiscountsConfiguration template) { + DiscountsConfigurationImpl instance = new DiscountsConfigurationImpl(); + instance.setAllowDiscounts(template.getAllowDiscounts()); + return instance; + } + + public DiscountsConfiguration copyDeep(); + + /** + * factory method to create a deep copy of DiscountsConfiguration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountsConfiguration deepCopy(@Nullable final DiscountsConfiguration template) { + if (template == null) { + return null; + } + DiscountsConfigurationImpl instance = new DiscountsConfigurationImpl(); + instance.setAllowDiscounts(template.getAllowDiscounts()); + return instance; + } + + /** + * builder factory method for DiscountsConfiguration + * @return builder + */ + public static DiscountsConfigurationBuilder builder() { + return DiscountsConfigurationBuilder.of(); + } + + /** + * create builder for DiscountsConfiguration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountsConfigurationBuilder builder(final DiscountsConfiguration template) { + return DiscountsConfigurationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountsConfiguration(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationBuilder.java new file mode 100644 index 00000000000..4fa8486c922 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountsConfigurationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DiscountsConfiguration discountsConfiguration = DiscountsConfiguration.builder()
    + *             .allowDiscounts(true)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountsConfigurationBuilder implements Builder { + + private Boolean allowDiscounts; + + /** + *

    Indicates if the buyer is able to apply discounts to the cart. It is only applicable if the mode = CompleteFlow.

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

    Indicates if the buyer is able to apply discounts to the cart. It is only applicable if the mode = CompleteFlow.

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

    Indicates if the buyer is able to apply discounts to the cart. It is only applicable if the mode = CompleteFlow.

    + */ + + public Boolean getAllowDiscounts() { + return this.allowDiscounts; + } + + public void setAllowDiscounts(final Boolean allowDiscounts) { + this.allowDiscounts = allowDiscounts; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountsConfigurationImpl that = (DiscountsConfigurationImpl) o; + + return new EqualsBuilder().append(allowDiscounts, that.allowDiscounts) + .append(allowDiscounts, that.allowDiscounts) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(allowDiscounts).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("allowDiscounts", allowDiscounts) + .build(); + } + + @Override + public DiscountsConfiguration copyDeep() { + return DiscountsConfiguration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplication.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplication.java new file mode 100644 index 00000000000..cc7bcf84e65 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplication.java @@ -0,0 +1,211 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    Paginated result containing Application.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaginatedApplication paginatedApplication = PaginatedApplication.builder()
    + *             .limit(1)
    + *             .offset(1)
    + *             .count(1)
    + *             .total(1)
    + *             .plusResults(resultsBuilder -> resultsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaginatedApplicationImpl.class) +public interface PaginatedApplication { + + /** + *

    Number of results requested.

    + * @return limit + */ + @NotNull + @JsonProperty("limit") + public Integer getLimit(); + + /** + *

    Number of elements skipped.

    + * @return offset + */ + @NotNull + @JsonProperty("offset") + public Integer getOffset(); + + /** + *

    Actual number of results returned.

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

    Total number of results matching the query.

    + * @return total + */ + @NotNull + @JsonProperty("total") + public Integer getTotal(); + + /** + *

    Applications matching the query.

    + * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

    Number of results requested.

    + * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *

    Number of elements skipped.

    + * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + *

    Actual number of results returned.

    + * @param count value to be set + */ + + public void setCount(final Integer count); + + /** + *

    Total number of results matching the query.

    + * @param total value to be set + */ + + public void setTotal(final Integer total); + + /** + *

    Applications matching the query.

    + * @param results values to be set + */ + + @JsonIgnore + public void setResults(final Application... results); + + /** + *

    Applications matching the query.

    + * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of PaginatedApplication + */ + public static PaginatedApplication of() { + return new PaginatedApplicationImpl(); + } + + /** + * factory method to create a shallow copy PaginatedApplication + * @param template instance to be copied + * @return copy instance + */ + public static PaginatedApplication of(final PaginatedApplication template) { + PaginatedApplicationImpl instance = new PaginatedApplicationImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + public PaginatedApplication copyDeep(); + + /** + * factory method to create a deep copy of PaginatedApplication + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaginatedApplication deepCopy(@Nullable final PaginatedApplication template) { + if (template == null) { + return null; + } + PaginatedApplicationImpl instance = new PaginatedApplicationImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.application.Application::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for PaginatedApplication + * @return builder + */ + public static PaginatedApplicationBuilder builder() { + return PaginatedApplicationBuilder.of(); + } + + /** + * create builder for PaginatedApplication instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaginatedApplicationBuilder builder(final PaginatedApplication template) { + return PaginatedApplicationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaginatedApplication(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationBuilder.java new file mode 100644 index 00000000000..2ab23bedac3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationBuilder.java @@ -0,0 +1,261 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaginatedApplicationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaginatedApplication paginatedApplication = PaginatedApplication.builder()
    + *             .limit(1)
    + *             .offset(1)
    + *             .count(1)
    + *             .total(1)
    + *             .plusResults(resultsBuilder -> resultsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaginatedApplicationBuilder implements Builder { + + private Integer limit; + + private Integer offset; + + private Integer count; + + private Integer total; + + private java.util.List results; + + /** + *

    Number of results requested.

    + * @param limit value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder limit(final Integer limit) { + this.limit = limit; + return this; + } + + /** + *

    Number of elements skipped.

    + * @param offset value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder offset(final Integer offset) { + this.offset = offset; + return this; + } + + /** + *

    Actual number of results returned.

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

    Total number of results matching the query.

    + * @param total value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder total(final Integer total) { + this.total = total; + return this; + } + + /** + *

    Applications matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder results( + final com.commercetools.checkout.models.application.Application... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

    Applications matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder results( + final java.util.List results) { + this.results = results; + return this; + } + + /** + *

    Applications matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedApplicationBuilder plusResults( + final com.commercetools.checkout.models.application.Application... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

    Applications matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedApplicationBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(builder.apply(com.commercetools.checkout.models.application.ApplicationBuilder.of()).build()); + return this; + } + + /** + *

    Applications matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedApplicationBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results.add(builder.apply(com.commercetools.checkout.models.application.ApplicationBuilder.of()).build()); + return this; + } + + /** + *

    Applications matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedApplicationBuilder addResults( + Function builder) { + return plusResults(builder.apply(com.commercetools.checkout.models.application.ApplicationBuilder.of())); + } + + /** + *

    Applications matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedApplicationBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.checkout.models.application.ApplicationBuilder.of())); + } + + /** + *

    Number of results requested.

    + * @return limit + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

    Number of elements skipped.

    + * @return offset + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

    Actual number of results returned.

    + * @return count + */ + + public Integer getCount() { + return this.count; + } + + /** + *

    Total number of results matching the query.

    + * @return total + */ + + public Integer getTotal() { + return this.total; + } + + /** + *

    Applications matching the query.

    + * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds PaginatedApplication with checking for non-null required values + * @return PaginatedApplication + */ + public PaginatedApplication build() { + Objects.requireNonNull(limit, PaginatedApplication.class + ": limit is missing"); + Objects.requireNonNull(offset, PaginatedApplication.class + ": offset is missing"); + Objects.requireNonNull(count, PaginatedApplication.class + ": count is missing"); + Objects.requireNonNull(total, PaginatedApplication.class + ": total is missing"); + Objects.requireNonNull(results, PaginatedApplication.class + ": results is missing"); + return new PaginatedApplicationImpl(limit, offset, count, total, results); + } + + /** + * builds PaginatedApplication without checking for non-null required values + * @return PaginatedApplication + */ + public PaginatedApplication buildUnchecked() { + return new PaginatedApplicationImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of PaginatedApplicationBuilder + * @return builder + */ + public static PaginatedApplicationBuilder of() { + return new PaginatedApplicationBuilder(); + } + + /** + * create builder for PaginatedApplication instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaginatedApplicationBuilder of(final PaginatedApplication template) { + PaginatedApplicationBuilder builder = new PaginatedApplicationBuilder(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.count = template.getCount(); + builder.total = template.getTotal(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationImpl.java new file mode 100644 index 00000000000..8d76e26270a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationImpl.java @@ -0,0 +1,166 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Paginated result containing Application.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaginatedApplicationImpl implements PaginatedApplication, ModelBase { + + private Integer limit; + + private Integer offset; + + private Integer count; + + private Integer total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + PaginatedApplicationImpl(@JsonProperty("limit") final Integer limit, @JsonProperty("offset") final Integer offset, + @JsonProperty("count") final Integer count, @JsonProperty("total") final Integer total, + @JsonProperty("results") final java.util.List results) { + this.limit = limit; + this.offset = offset; + this.count = count; + this.total = total; + this.results = results; + } + + /** + * create empty instance + */ + public PaginatedApplicationImpl() { + } + + /** + *

    Number of results requested.

    + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

    Number of elements skipped.

    + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

    Actual number of results returned.

    + */ + + public Integer getCount() { + return this.count; + } + + /** + *

    Total number of results matching the query.

    + */ + + public Integer getTotal() { + return this.total; + } + + /** + *

    Applications matching the query.

    + */ + + public java.util.List getResults() { + return this.results; + } + + public void setLimit(final Integer limit) { + this.limit = limit; + } + + public void setOffset(final Integer offset) { + this.offset = offset; + } + + public void setCount(final Integer count) { + this.count = count; + } + + public void setTotal(final Integer total) { + this.total = total; + } + + public void setResults(final com.commercetools.checkout.models.application.Application... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + } + + public void setResults(final java.util.List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaginatedApplicationImpl that = (PaginatedApplicationImpl) o; + + return new EqualsBuilder().append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(limit) + .append(offset) + .append(count) + .append(total) + .append(results) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) + .append("offset", offset) + .append("count", count) + .append("total", total) + .append("results", results) + .build(); + } + + @Override + public PaginatedApplication copyDeep() { + return PaginatedApplication.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfiguration.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfiguration.java new file mode 100644 index 00000000000..43a4a85773b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfiguration.java @@ -0,0 +1,142 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment_integration.PaymentComponentType; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * PaymentsConfiguration + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentsConfiguration paymentsConfiguration = PaymentsConfiguration.builder()
    + *             .activePaymentComponentType(PaymentComponentType.COMPONENT)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentsConfigurationImpl.class) +public interface PaymentsConfiguration { + + /** + *

    URL where the buyer will be redirected back to after an offsite payment.

    + * @return paymentReturnUrl + */ + + @JsonProperty("paymentReturnUrl") + public String getPaymentReturnUrl(); + + /** + *

    Indicates the type of payment components that the Application will use.

    + * @return activePaymentComponentType + */ + @NotNull + @JsonProperty("activePaymentComponentType") + public PaymentComponentType getActivePaymentComponentType(); + + /** + *

    URL where the buyer will be redirected back to after an offsite payment.

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

    Indicates the type of payment components that the Application will use.

    + * @param activePaymentComponentType value to be set + */ + + public void setActivePaymentComponentType(final PaymentComponentType activePaymentComponentType); + + /** + * factory method + * @return instance of PaymentsConfiguration + */ + public static PaymentsConfiguration of() { + return new PaymentsConfigurationImpl(); + } + + /** + * factory method to create a shallow copy PaymentsConfiguration + * @param template instance to be copied + * @return copy instance + */ + public static PaymentsConfiguration of(final PaymentsConfiguration template) { + PaymentsConfigurationImpl instance = new PaymentsConfigurationImpl(); + instance.setPaymentReturnUrl(template.getPaymentReturnUrl()); + instance.setActivePaymentComponentType(template.getActivePaymentComponentType()); + return instance; + } + + public PaymentsConfiguration copyDeep(); + + /** + * factory method to create a deep copy of PaymentsConfiguration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentsConfiguration deepCopy(@Nullable final PaymentsConfiguration template) { + if (template == null) { + return null; + } + PaymentsConfigurationImpl instance = new PaymentsConfigurationImpl(); + instance.setPaymentReturnUrl(template.getPaymentReturnUrl()); + instance.setActivePaymentComponentType(template.getActivePaymentComponentType()); + return instance; + } + + /** + * builder factory method for PaymentsConfiguration + * @return builder + */ + public static PaymentsConfigurationBuilder builder() { + return PaymentsConfigurationBuilder.of(); + } + + /** + * create builder for PaymentsConfiguration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentsConfigurationBuilder builder(final PaymentsConfiguration template) { + return PaymentsConfigurationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentsConfiguration(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationBuilder.java new file mode 100644 index 00000000000..3a35d408702 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentsConfigurationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentsConfiguration paymentsConfiguration = PaymentsConfiguration.builder()
    + *             .activePaymentComponentType(PaymentComponentType.COMPONENT)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentsConfigurationBuilder implements Builder { + + @Nullable + private String paymentReturnUrl; + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType; + + /** + *

    URL where the buyer will be redirected back to after an offsite payment.

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

    Indicates the type of payment components that the Application will use.

    + * @param activePaymentComponentType value to be set + * @return Builder + */ + + public PaymentsConfigurationBuilder activePaymentComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType) { + this.activePaymentComponentType = activePaymentComponentType; + return this; + } + + /** + *

    URL where the buyer will be redirected back to after an offsite payment.

    + * @return paymentReturnUrl + */ + + @Nullable + public String getPaymentReturnUrl() { + return this.paymentReturnUrl; + } + + /** + *

    Indicates the type of payment components that the Application will use.

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

    URL where the buyer will be redirected back to after an offsite payment.

    + */ + + public String getPaymentReturnUrl() { + return this.paymentReturnUrl; + } + + /** + *

    Indicates the type of payment components that the Application will use.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getActivePaymentComponentType() { + return this.activePaymentComponentType; + } + + public void setPaymentReturnUrl(final String paymentReturnUrl) { + this.paymentReturnUrl = paymentReturnUrl; + } + + public void setActivePaymentComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType) { + this.activePaymentComponentType = activePaymentComponentType; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentsConfigurationImpl that = (PaymentsConfigurationImpl) o; + + return new EqualsBuilder().append(paymentReturnUrl, that.paymentReturnUrl) + .append(activePaymentComponentType, that.activePaymentComponentType) + .append(paymentReturnUrl, that.paymentReturnUrl) + .append(activePaymentComponentType, that.activePaymentComponentType) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(paymentReturnUrl).append(activePaymentComponentType).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("paymentReturnUrl", paymentReturnUrl) + .append("activePaymentComponentType", activePaymentComponentType) + .build(); + } + + @Override + public PaymentsConfiguration copyDeep() { + return PaymentsConfiguration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateAction.java new file mode 100644 index 00000000000..d7c76ded80a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * RemoveAllowedOriginUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveAllowedOriginUpdateAction removeAllowedOriginUpdateAction = RemoveAllowedOriginUpdateAction.builder()
    + *             .origin("{origin}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("removeAllowedOrigin") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveAllowedOriginUpdateActionImpl.class) +public interface RemoveAllowedOriginUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for RemoveAllowedOriginUpdateAction + */ + String REMOVE_ALLOWED_ORIGIN = "removeAllowedOrigin"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Origin URL to remove from the allowed origins list.

    + * @return origin + */ + @NotNull + @JsonProperty("origin") + public String getOrigin(); + + /** + *

    Origin URL to remove from the allowed origins list.

    + * @param origin value to be set + */ + + public void setOrigin(final String origin); + + /** + * factory method + * @return instance of RemoveAllowedOriginUpdateAction + */ + public static RemoveAllowedOriginUpdateAction of() { + return new RemoveAllowedOriginUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy RemoveAllowedOriginUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static RemoveAllowedOriginUpdateAction of(final RemoveAllowedOriginUpdateAction template) { + RemoveAllowedOriginUpdateActionImpl instance = new RemoveAllowedOriginUpdateActionImpl(); + instance.setOrigin(template.getOrigin()); + return instance; + } + + public RemoveAllowedOriginUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of RemoveAllowedOriginUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveAllowedOriginUpdateAction deepCopy(@Nullable final RemoveAllowedOriginUpdateAction template) { + if (template == null) { + return null; + } + RemoveAllowedOriginUpdateActionImpl instance = new RemoveAllowedOriginUpdateActionImpl(); + instance.setOrigin(template.getOrigin()); + return instance; + } + + /** + * builder factory method for RemoveAllowedOriginUpdateAction + * @return builder + */ + public static RemoveAllowedOriginUpdateActionBuilder builder() { + return RemoveAllowedOriginUpdateActionBuilder.of(); + } + + /** + * create builder for RemoveAllowedOriginUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveAllowedOriginUpdateActionBuilder builder(final RemoveAllowedOriginUpdateAction template) { + return RemoveAllowedOriginUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveAllowedOriginUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionBuilder.java new file mode 100644 index 00000000000..828a608e6c4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveAllowedOriginUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveAllowedOriginUpdateAction removeAllowedOriginUpdateAction = RemoveAllowedOriginUpdateAction.builder()
    + *             .origin("{origin}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveAllowedOriginUpdateActionBuilder implements Builder { + + private String origin; + + /** + *

    Origin URL to remove from the allowed origins list.

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

    Origin URL to remove from the allowed origins list.

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

    Origin URL to remove from the allowed origins list.

    + */ + + public String getOrigin() { + return this.origin; + } + + public void setOrigin(final String origin) { + this.origin = origin; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveAllowedOriginUpdateActionImpl that = (RemoveAllowedOriginUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(origin, that.origin) + .append(action, that.action) + .append(origin, that.origin) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(origin).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("origin", origin) + .build(); + } + + @Override + public RemoveAllowedOriginUpdateAction copyDeep() { + return RemoveAllowedOriginUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateAction.java new file mode 100644 index 00000000000..b59524fd0eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateAction.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * RemoveApplicationAgreementUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveApplicationAgreementUpdateAction removeApplicationAgreementUpdateAction = RemoveApplicationAgreementUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("removeAgreement") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveApplicationAgreementUpdateActionImpl.class) +public interface RemoveApplicationAgreementUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for RemoveApplicationAgreementUpdateAction + */ + String REMOVE_AGREEMENT = "removeAgreement"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    ID of the agreement to remove from the Application.

    + * @return agreementId + */ + @NotNull + @JsonProperty("agreementId") + public String getAgreementId(); + + /** + *

    ID of the agreement to remove from the Application.

    + * @param agreementId value to be set + */ + + public void setAgreementId(final String agreementId); + + /** + * factory method + * @return instance of RemoveApplicationAgreementUpdateAction + */ + public static RemoveApplicationAgreementUpdateAction of() { + return new RemoveApplicationAgreementUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy RemoveApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static RemoveApplicationAgreementUpdateAction of(final RemoveApplicationAgreementUpdateAction template) { + RemoveApplicationAgreementUpdateActionImpl instance = new RemoveApplicationAgreementUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + return instance; + } + + public RemoveApplicationAgreementUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of RemoveApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveApplicationAgreementUpdateAction deepCopy( + @Nullable final RemoveApplicationAgreementUpdateAction template) { + if (template == null) { + return null; + } + RemoveApplicationAgreementUpdateActionImpl instance = new RemoveApplicationAgreementUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + return instance; + } + + /** + * builder factory method for RemoveApplicationAgreementUpdateAction + * @return builder + */ + public static RemoveApplicationAgreementUpdateActionBuilder builder() { + return RemoveApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * create builder for RemoveApplicationAgreementUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveApplicationAgreementUpdateActionBuilder builder( + final RemoveApplicationAgreementUpdateAction template) { + return RemoveApplicationAgreementUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveApplicationAgreementUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionBuilder.java new file mode 100644 index 00000000000..01a8c73fe27 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionBuilder.java @@ -0,0 +1,83 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveApplicationAgreementUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveApplicationAgreementUpdateAction removeApplicationAgreementUpdateAction = RemoveApplicationAgreementUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveApplicationAgreementUpdateActionBuilder implements Builder { + + private String agreementId; + + /** + *

    ID of the agreement to remove from the Application.

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

    ID of the agreement to remove from the Application.

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

    ID of the agreement to remove from the Application.

    + */ + + public String getAgreementId() { + return this.agreementId; + } + + public void setAgreementId(final String agreementId) { + this.agreementId = agreementId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveApplicationAgreementUpdateActionImpl that = (RemoveApplicationAgreementUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementId, that.agreementId) + .append(action, that.action) + .append(agreementId, that.agreementId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementId", agreementId) + .build(); + } + + @Override + public RemoveApplicationAgreementUpdateAction copyDeep() { + return RemoveApplicationAgreementUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateAction.java new file mode 100644 index 00000000000..09934348ab6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * RemoveCountryUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveCountryUpdateAction removeCountryUpdateAction = RemoveCountryUpdateAction.builder()
    + *             .country("{country}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("removeCountry") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveCountryUpdateActionImpl.class) +public interface RemoveCountryUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for RemoveCountryUpdateAction + */ + String REMOVE_COUNTRY = "removeCountry"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Country to remove. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return country + */ + @NotNull + @JsonProperty("country") + public String getCountry(); + + /** + *

    Country to remove. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param country value to be set + */ + + public void setCountry(final String country); + + /** + * factory method + * @return instance of RemoveCountryUpdateAction + */ + public static RemoveCountryUpdateAction of() { + return new RemoveCountryUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy RemoveCountryUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static RemoveCountryUpdateAction of(final RemoveCountryUpdateAction template) { + RemoveCountryUpdateActionImpl instance = new RemoveCountryUpdateActionImpl(); + instance.setCountry(template.getCountry()); + return instance; + } + + public RemoveCountryUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of RemoveCountryUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveCountryUpdateAction deepCopy(@Nullable final RemoveCountryUpdateAction template) { + if (template == null) { + return null; + } + RemoveCountryUpdateActionImpl instance = new RemoveCountryUpdateActionImpl(); + instance.setCountry(template.getCountry()); + return instance; + } + + /** + * builder factory method for RemoveCountryUpdateAction + * @return builder + */ + public static RemoveCountryUpdateActionBuilder builder() { + return RemoveCountryUpdateActionBuilder.of(); + } + + /** + * create builder for RemoveCountryUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveCountryUpdateActionBuilder builder(final RemoveCountryUpdateAction template) { + return RemoveCountryUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveCountryUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionBuilder.java new file mode 100644 index 00000000000..133492af42d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RemoveCountryUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     RemoveCountryUpdateAction removeCountryUpdateAction = RemoveCountryUpdateAction.builder()
    + *             .country("{country}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveCountryUpdateActionBuilder implements Builder { + + private String country; + + /** + *

    Country to remove. Represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Country to remove. Represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Country to remove. Represented by two-digit country code as per ISO 3166-1 alpha-2.

    + */ + + public String getCountry() { + return this.country; + } + + public void setCountry(final String country) { + this.country = country; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveCountryUpdateActionImpl that = (RemoveCountryUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(country, that.country) + .append(action, that.action) + .append(country, that.country) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(country).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("country", country) + .build(); + } + + @Override + public RemoveCountryUpdateAction copyDeep() { + return RemoveCountryUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateAction.java new file mode 100644 index 00000000000..93a9bf34711 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateAction.java @@ -0,0 +1,149 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * ReorderApplicationAgreementUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ReorderApplicationAgreementUpdateAction reorderApplicationAgreementUpdateAction = ReorderApplicationAgreementUpdateAction.builder()
    + *             .plusAgreementIds(agreementIdsBuilder -> agreementIdsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("reorderAgreement") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ReorderApplicationAgreementUpdateActionImpl.class) +public interface ReorderApplicationAgreementUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for ReorderApplicationAgreementUpdateAction + */ + String REORDER_AGREEMENT = "reorderAgreement"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Array of agreement IDs.

    + * @return agreementIds + */ + @NotNull + @JsonProperty("agreementIds") + public List getAgreementIds(); + + /** + *

    Array of agreement IDs.

    + * @param agreementIds values to be set + */ + + @JsonIgnore + public void setAgreementIds(final String... agreementIds); + + /** + *

    Array of agreement IDs.

    + * @param agreementIds values to be set + */ + + public void setAgreementIds(final List agreementIds); + + /** + * factory method + * @return instance of ReorderApplicationAgreementUpdateAction + */ + public static ReorderApplicationAgreementUpdateAction of() { + return new ReorderApplicationAgreementUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy ReorderApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static ReorderApplicationAgreementUpdateAction of(final ReorderApplicationAgreementUpdateAction template) { + ReorderApplicationAgreementUpdateActionImpl instance = new ReorderApplicationAgreementUpdateActionImpl(); + instance.setAgreementIds(template.getAgreementIds()); + return instance; + } + + public ReorderApplicationAgreementUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of ReorderApplicationAgreementUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ReorderApplicationAgreementUpdateAction deepCopy( + @Nullable final ReorderApplicationAgreementUpdateAction template) { + if (template == null) { + return null; + } + ReorderApplicationAgreementUpdateActionImpl instance = new ReorderApplicationAgreementUpdateActionImpl(); + instance.setAgreementIds(Optional.ofNullable(template.getAgreementIds()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for ReorderApplicationAgreementUpdateAction + * @return builder + */ + public static ReorderApplicationAgreementUpdateActionBuilder builder() { + return ReorderApplicationAgreementUpdateActionBuilder.of(); + } + + /** + * create builder for ReorderApplicationAgreementUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ReorderApplicationAgreementUpdateActionBuilder builder( + final ReorderApplicationAgreementUpdateAction template) { + return ReorderApplicationAgreementUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withReorderApplicationAgreementUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionBuilder.java new file mode 100644 index 00000000000..17086758df6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ReorderApplicationAgreementUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ReorderApplicationAgreementUpdateAction reorderApplicationAgreementUpdateAction = ReorderApplicationAgreementUpdateAction.builder()
    + *             .plusAgreementIds(agreementIdsBuilder -> agreementIdsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ReorderApplicationAgreementUpdateActionBuilder + implements Builder { + + private java.util.List agreementIds; + + /** + *

    Array of agreement IDs.

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

    Array of agreement IDs.

    + * @param agreementIds value to be set + * @return Builder + */ + + public ReorderApplicationAgreementUpdateActionBuilder agreementIds(final java.util.List agreementIds) { + this.agreementIds = agreementIds; + return this; + } + + /** + *

    Array of agreement IDs.

    + * @param agreementIds value to be set + * @return Builder + */ + + public ReorderApplicationAgreementUpdateActionBuilder plusAgreementIds(final String... agreementIds) { + if (this.agreementIds == null) { + this.agreementIds = new ArrayList<>(); + } + this.agreementIds.addAll(Arrays.asList(agreementIds)); + return this; + } + + /** + *

    Array of agreement IDs.

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

    Array of agreement IDs.

    + */ + + public java.util.List getAgreementIds() { + return this.agreementIds; + } + + public void setAgreementIds(final String... agreementIds) { + this.agreementIds = new ArrayList<>(Arrays.asList(agreementIds)); + } + + public void setAgreementIds(final java.util.List agreementIds) { + this.agreementIds = agreementIds; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ReorderApplicationAgreementUpdateActionImpl that = (ReorderApplicationAgreementUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementIds, that.agreementIds) + .append(action, that.action) + .append(agreementIds, that.agreementIds) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementIds).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementIds", agreementIds) + .build(); + } + + @Override + public ReorderApplicationAgreementUpdateAction copyDeep() { + return ReorderApplicationAgreementUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateAction.java new file mode 100644 index 00000000000..3620bbd18fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.payment_integration.PaymentComponentType; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetActivePaymentComponentTypeUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetActivePaymentComponentTypeUpdateAction setActivePaymentComponentTypeUpdateAction = SetActivePaymentComponentTypeUpdateAction.builder()
    + *             .activePaymentComponentType(PaymentComponentType.COMPONENT)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setActivePaymentComponentType") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetActivePaymentComponentTypeUpdateActionImpl.class) +public interface SetActivePaymentComponentTypeUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetActivePaymentComponentTypeUpdateAction + */ + String SET_ACTIVE_PAYMENT_COMPONENT_TYPE = "setActivePaymentComponentType"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Type of payment components that the Application will use.

    + * @return activePaymentComponentType + */ + @NotNull + @JsonProperty("activePaymentComponentType") + public PaymentComponentType getActivePaymentComponentType(); + + /** + *

    Type of payment components that the Application will use.

    + * @param activePaymentComponentType value to be set + */ + + public void setActivePaymentComponentType(final PaymentComponentType activePaymentComponentType); + + /** + * factory method + * @return instance of SetActivePaymentComponentTypeUpdateAction + */ + public static SetActivePaymentComponentTypeUpdateAction of() { + return new SetActivePaymentComponentTypeUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetActivePaymentComponentTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetActivePaymentComponentTypeUpdateAction of( + final SetActivePaymentComponentTypeUpdateAction template) { + SetActivePaymentComponentTypeUpdateActionImpl instance = new SetActivePaymentComponentTypeUpdateActionImpl(); + instance.setActivePaymentComponentType(template.getActivePaymentComponentType()); + return instance; + } + + public SetActivePaymentComponentTypeUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetActivePaymentComponentTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetActivePaymentComponentTypeUpdateAction deepCopy( + @Nullable final SetActivePaymentComponentTypeUpdateAction template) { + if (template == null) { + return null; + } + SetActivePaymentComponentTypeUpdateActionImpl instance = new SetActivePaymentComponentTypeUpdateActionImpl(); + instance.setActivePaymentComponentType(template.getActivePaymentComponentType()); + return instance; + } + + /** + * builder factory method for SetActivePaymentComponentTypeUpdateAction + * @return builder + */ + public static SetActivePaymentComponentTypeUpdateActionBuilder builder() { + return SetActivePaymentComponentTypeUpdateActionBuilder.of(); + } + + /** + * create builder for SetActivePaymentComponentTypeUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetActivePaymentComponentTypeUpdateActionBuilder builder( + final SetActivePaymentComponentTypeUpdateAction template) { + return SetActivePaymentComponentTypeUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetActivePaymentComponentTypeUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionBuilder.java new file mode 100644 index 00000000000..c1158291c66 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionBuilder.java @@ -0,0 +1,86 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetActivePaymentComponentTypeUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetActivePaymentComponentTypeUpdateAction setActivePaymentComponentTypeUpdateAction = SetActivePaymentComponentTypeUpdateAction.builder()
    + *             .activePaymentComponentType(PaymentComponentType.COMPONENT)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetActivePaymentComponentTypeUpdateActionBuilder + implements Builder { + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType; + + /** + *

    Type of payment components that the Application will use.

    + * @param activePaymentComponentType value to be set + * @return Builder + */ + + public SetActivePaymentComponentTypeUpdateActionBuilder activePaymentComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType) { + this.activePaymentComponentType = activePaymentComponentType; + return this; + } + + /** + *

    Type of payment components that the Application will use.

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

    Type of payment components that the Application will use.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getActivePaymentComponentType() { + return this.activePaymentComponentType; + } + + public void setActivePaymentComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType activePaymentComponentType) { + this.activePaymentComponentType = activePaymentComponentType; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetActivePaymentComponentTypeUpdateActionImpl that = (SetActivePaymentComponentTypeUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(activePaymentComponentType, that.activePaymentComponentType) + .append(action, that.action) + .append(activePaymentComponentType, that.activePaymentComponentType) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(activePaymentComponentType).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("activePaymentComponentType", activePaymentComponentType) + .build(); + } + + @Override + public SetActivePaymentComponentTypeUpdateAction copyDeep() { + return SetActivePaymentComponentTypeUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateAction.java new file mode 100644 index 00000000000..1ceb10d3c20 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetAllowAllOriginsUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAllowAllOriginsUpdateAction setAllowAllOriginsUpdateAction = SetAllowAllOriginsUpdateAction.builder()
    + *             .allowAll(true)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAllowAllOrigins") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAllowAllOriginsUpdateActionImpl.class) +public interface SetAllowAllOriginsUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetAllowAllOriginsUpdateAction + */ + String SET_ALLOW_ALL_ORIGINS = "setAllowAllOrigins"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Whether to allow all origins or not.

    + * @return allowAll + */ + @NotNull + @JsonProperty("allowAll") + public Boolean getAllowAll(); + + /** + *

    Whether to allow all origins or not.

    + * @param allowAll value to be set + */ + + public void setAllowAll(final Boolean allowAll); + + /** + * factory method + * @return instance of SetAllowAllOriginsUpdateAction + */ + public static SetAllowAllOriginsUpdateAction of() { + return new SetAllowAllOriginsUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetAllowAllOriginsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetAllowAllOriginsUpdateAction of(final SetAllowAllOriginsUpdateAction template) { + SetAllowAllOriginsUpdateActionImpl instance = new SetAllowAllOriginsUpdateActionImpl(); + instance.setAllowAll(template.getAllowAll()); + return instance; + } + + public SetAllowAllOriginsUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetAllowAllOriginsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAllowAllOriginsUpdateAction deepCopy(@Nullable final SetAllowAllOriginsUpdateAction template) { + if (template == null) { + return null; + } + SetAllowAllOriginsUpdateActionImpl instance = new SetAllowAllOriginsUpdateActionImpl(); + instance.setAllowAll(template.getAllowAll()); + return instance; + } + + /** + * builder factory method for SetAllowAllOriginsUpdateAction + * @return builder + */ + public static SetAllowAllOriginsUpdateActionBuilder builder() { + return SetAllowAllOriginsUpdateActionBuilder.of(); + } + + /** + * create builder for SetAllowAllOriginsUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAllowAllOriginsUpdateActionBuilder builder(final SetAllowAllOriginsUpdateAction template) { + return SetAllowAllOriginsUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAllowAllOriginsUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionBuilder.java new file mode 100644 index 00000000000..d4850903066 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAllowAllOriginsUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAllowAllOriginsUpdateAction setAllowAllOriginsUpdateAction = SetAllowAllOriginsUpdateAction.builder()
    + *             .allowAll(true)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAllowAllOriginsUpdateActionBuilder implements Builder { + + private Boolean allowAll; + + /** + *

    Whether to allow all origins or not.

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

    Whether to allow all origins or not.

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

    Whether to allow all origins or not.

    + */ + + public Boolean getAllowAll() { + return this.allowAll; + } + + public void setAllowAll(final Boolean allowAll) { + this.allowAll = allowAll; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAllowAllOriginsUpdateActionImpl that = (SetAllowAllOriginsUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(allowAll, that.allowAll) + .append(action, that.action) + .append(allowAll, that.allowAll) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(allowAll).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("allowAll", allowAll) + .build(); + } + + @Override + public SetAllowAllOriginsUpdateAction copyDeep() { + return SetAllowAllOriginsUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateAction.java new file mode 100644 index 00000000000..5db6cfe6738 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateAction.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetAllowedOriginsUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAllowedOriginsUpdateAction setAllowedOriginsUpdateAction = SetAllowedOriginsUpdateAction.builder()
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAllowedOrigins") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAllowedOriginsUpdateActionImpl.class) +public interface SetAllowedOriginsUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetAllowedOriginsUpdateAction + */ + String SET_ALLOWED_ORIGINS = "setAllowedOrigins"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New allowed origins configuration.

    + * @return allowedOrigins + */ + @NotNull + @Valid + @JsonProperty("allowedOrigins") + public AllowedOrigins getAllowedOrigins(); + + /** + *

    New allowed origins configuration.

    + * @param allowedOrigins value to be set + */ + + public void setAllowedOrigins(final AllowedOrigins allowedOrigins); + + /** + * factory method + * @return instance of SetAllowedOriginsUpdateAction + */ + public static SetAllowedOriginsUpdateAction of() { + return new SetAllowedOriginsUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetAllowedOriginsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetAllowedOriginsUpdateAction of(final SetAllowedOriginsUpdateAction template) { + SetAllowedOriginsUpdateActionImpl instance = new SetAllowedOriginsUpdateActionImpl(); + instance.setAllowedOrigins(template.getAllowedOrigins()); + return instance; + } + + public SetAllowedOriginsUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetAllowedOriginsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAllowedOriginsUpdateAction deepCopy(@Nullable final SetAllowedOriginsUpdateAction template) { + if (template == null) { + return null; + } + SetAllowedOriginsUpdateActionImpl instance = new SetAllowedOriginsUpdateActionImpl(); + instance.setAllowedOrigins( + com.commercetools.checkout.models.application.AllowedOrigins.deepCopy(template.getAllowedOrigins())); + return instance; + } + + /** + * builder factory method for SetAllowedOriginsUpdateAction + * @return builder + */ + public static SetAllowedOriginsUpdateActionBuilder builder() { + return SetAllowedOriginsUpdateActionBuilder.of(); + } + + /** + * create builder for SetAllowedOriginsUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAllowedOriginsUpdateActionBuilder builder(final SetAllowedOriginsUpdateAction template) { + return SetAllowedOriginsUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAllowedOriginsUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionBuilder.java new file mode 100644 index 00000000000..22e76ecb9bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAllowedOriginsUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAllowedOriginsUpdateAction setAllowedOriginsUpdateAction = SetAllowedOriginsUpdateAction.builder()
    + *             .allowedOrigins(allowedOriginsBuilder -> allowedOriginsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAllowedOriginsUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins; + + /** + *

    New allowed origins configuration.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public SetAllowedOriginsUpdateActionBuilder allowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()) + .build(); + return this; + } + + /** + *

    New allowed origins configuration.

    + * @param builder function to build the allowedOrigins value + * @return Builder + */ + + public SetAllowedOriginsUpdateActionBuilder withAllowedOrigins( + Function builder) { + this.allowedOrigins = builder.apply(com.commercetools.checkout.models.application.AllowedOriginsBuilder.of()); + return this; + } + + /** + *

    New allowed origins configuration.

    + * @param allowedOrigins value to be set + * @return Builder + */ + + public SetAllowedOriginsUpdateActionBuilder allowedOrigins( + final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + *

    New allowed origins configuration.

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

    New allowed origins configuration.

    + */ + + public com.commercetools.checkout.models.application.AllowedOrigins getAllowedOrigins() { + return this.allowedOrigins; + } + + public void setAllowedOrigins(final com.commercetools.checkout.models.application.AllowedOrigins allowedOrigins) { + this.allowedOrigins = allowedOrigins; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAllowedOriginsUpdateActionImpl that = (SetAllowedOriginsUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(allowedOrigins, that.allowedOrigins) + .append(action, that.action) + .append(allowedOrigins, that.allowedOrigins) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(allowedOrigins).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("allowedOrigins", allowedOrigins) + .build(); + } + + @Override + public SetAllowedOriginsUpdateAction copyDeep() { + return SetAllowedOriginsUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateAction.java new file mode 100644 index 00000000000..46eb0b3d60e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateAction.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationAgreementNameUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementNameUpdateAction setApplicationAgreementNameUpdateAction = SetApplicationAgreementNameUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAgreementName") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationAgreementNameUpdateActionImpl.class) +public interface SetApplicationAgreementNameUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationAgreementNameUpdateAction + */ + String SET_AGREEMENT_NAME = "setAgreementName"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + @NotNull + @JsonProperty("agreementId") + public String getAgreementId(); + + /** + *

    New name for the agreement.

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

    ID of the agreement to update.

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

    New name for the agreement.

    + * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of SetApplicationAgreementNameUpdateAction + */ + public static SetApplicationAgreementNameUpdateAction of() { + return new SetApplicationAgreementNameUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationAgreementNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationAgreementNameUpdateAction of(final SetApplicationAgreementNameUpdateAction template) { + SetApplicationAgreementNameUpdateActionImpl instance = new SetApplicationAgreementNameUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setName(template.getName()); + return instance; + } + + public SetApplicationAgreementNameUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationAgreementNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationAgreementNameUpdateAction deepCopy( + @Nullable final SetApplicationAgreementNameUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationAgreementNameUpdateActionImpl instance = new SetApplicationAgreementNameUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for SetApplicationAgreementNameUpdateAction + * @return builder + */ + public static SetApplicationAgreementNameUpdateActionBuilder builder() { + return SetApplicationAgreementNameUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationAgreementNameUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementNameUpdateActionBuilder builder( + final SetApplicationAgreementNameUpdateAction template) { + return SetApplicationAgreementNameUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationAgreementNameUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionBuilder.java new file mode 100644 index 00000000000..5e4ecae6403 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationAgreementNameUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementNameUpdateAction setApplicationAgreementNameUpdateAction = SetApplicationAgreementNameUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementNameUpdateActionBuilder + implements Builder { + + private String agreementId; + + private String name; + + /** + *

    ID of the agreement to update.

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

    New name for the agreement.

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

    ID of the agreement to update.

    + * @return agreementId + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New name for the agreement.

    + * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds SetApplicationAgreementNameUpdateAction with checking for non-null required values + * @return SetApplicationAgreementNameUpdateAction + */ + public SetApplicationAgreementNameUpdateAction build() { + Objects.requireNonNull(agreementId, SetApplicationAgreementNameUpdateAction.class + ": agreementId is missing"); + Objects.requireNonNull(name, SetApplicationAgreementNameUpdateAction.class + ": name is missing"); + return new SetApplicationAgreementNameUpdateActionImpl(agreementId, name); + } + + /** + * builds SetApplicationAgreementNameUpdateAction without checking for non-null required values + * @return SetApplicationAgreementNameUpdateAction + */ + public SetApplicationAgreementNameUpdateAction buildUnchecked() { + return new SetApplicationAgreementNameUpdateActionImpl(agreementId, name); + } + + /** + * factory method for an instance of SetApplicationAgreementNameUpdateActionBuilder + * @return builder + */ + public static SetApplicationAgreementNameUpdateActionBuilder of() { + return new SetApplicationAgreementNameUpdateActionBuilder(); + } + + /** + * create builder for SetApplicationAgreementNameUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementNameUpdateActionBuilder of( + final SetApplicationAgreementNameUpdateAction template) { + SetApplicationAgreementNameUpdateActionBuilder builder = new SetApplicationAgreementNameUpdateActionBuilder(); + builder.agreementId = template.getAgreementId(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionImpl.java new file mode 100644 index 00000000000..19e3f3556a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetApplicationAgreementNameUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementNameUpdateActionImpl implements SetApplicationAgreementNameUpdateAction, ModelBase { + + private String action; + + private String agreementId; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + SetApplicationAgreementNameUpdateActionImpl(@JsonProperty("agreementId") final String agreementId, + @JsonProperty("name") final String name) { + this.agreementId = agreementId; + this.name = name; + this.action = SET_AGREEMENT_NAME; + } + + /** + * create empty instance + */ + public SetApplicationAgreementNameUpdateActionImpl() { + this.action = SET_AGREEMENT_NAME; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    ID of the agreement to update.

    + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New name for the agreement.

    + */ + + public String getName() { + return this.name; + } + + public void setAgreementId(final String agreementId) { + this.agreementId = agreementId; + } + + 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; + + SetApplicationAgreementNameUpdateActionImpl that = (SetApplicationAgreementNameUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementId, that.agreementId) + .append(name, that.name) + .append(action, that.action) + .append(agreementId, that.agreementId) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementId).append(name).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementId", agreementId) + .append("name", name) + .build(); + } + + @Override + public SetApplicationAgreementNameUpdateAction copyDeep() { + return SetApplicationAgreementNameUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateAction.java new file mode 100644 index 00000000000..d568f568b33 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateAction.java @@ -0,0 +1,160 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationAgreementStatusUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementStatusUpdateAction setApplicationAgreementStatusUpdateAction = SetApplicationAgreementStatusUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAgreementStatus") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationAgreementStatusUpdateActionImpl.class) +public interface SetApplicationAgreementStatusUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationAgreementStatusUpdateAction + */ + String SET_AGREEMENT_STATUS = "setAgreementStatus"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + @NotNull + @JsonProperty("agreementId") + public String getAgreementId(); + + /** + *

    New status for the agreement.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public ApplicationAgreementStatus getStatus(); + + /** + *

    ID of the agreement to update.

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

    New status for the agreement.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationAgreementStatus status); + + /** + * factory method + * @return instance of SetApplicationAgreementStatusUpdateAction + */ + public static SetApplicationAgreementStatusUpdateAction of() { + return new SetApplicationAgreementStatusUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationAgreementStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationAgreementStatusUpdateAction of( + final SetApplicationAgreementStatusUpdateAction template) { + SetApplicationAgreementStatusUpdateActionImpl instance = new SetApplicationAgreementStatusUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setStatus(template.getStatus()); + return instance; + } + + public SetApplicationAgreementStatusUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationAgreementStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationAgreementStatusUpdateAction deepCopy( + @Nullable final SetApplicationAgreementStatusUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationAgreementStatusUpdateActionImpl instance = new SetApplicationAgreementStatusUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * builder factory method for SetApplicationAgreementStatusUpdateAction + * @return builder + */ + public static SetApplicationAgreementStatusUpdateActionBuilder builder() { + return SetApplicationAgreementStatusUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationAgreementStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementStatusUpdateActionBuilder builder( + final SetApplicationAgreementStatusUpdateAction template) { + return SetApplicationAgreementStatusUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationAgreementStatusUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionBuilder.java new file mode 100644 index 00000000000..d0b33f7b3b4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationAgreementStatusUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementStatusUpdateAction setApplicationAgreementStatusUpdateAction = SetApplicationAgreementStatusUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .status(ApplicationAgreementStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementStatusUpdateActionBuilder + implements Builder { + + private String agreementId; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + /** + *

    ID of the agreement to update.

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

    New status for the agreement.

    + * @param status value to be set + * @return Builder + */ + + public SetApplicationAgreementStatusUpdateActionBuilder status( + final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + return this; + } + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New status for the agreement.

    + * @return status + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + /** + * builds SetApplicationAgreementStatusUpdateAction with checking for non-null required values + * @return SetApplicationAgreementStatusUpdateAction + */ + public SetApplicationAgreementStatusUpdateAction build() { + Objects.requireNonNull(agreementId, + SetApplicationAgreementStatusUpdateAction.class + ": agreementId is missing"); + Objects.requireNonNull(status, SetApplicationAgreementStatusUpdateAction.class + ": status is missing"); + return new SetApplicationAgreementStatusUpdateActionImpl(agreementId, status); + } + + /** + * builds SetApplicationAgreementStatusUpdateAction without checking for non-null required values + * @return SetApplicationAgreementStatusUpdateAction + */ + public SetApplicationAgreementStatusUpdateAction buildUnchecked() { + return new SetApplicationAgreementStatusUpdateActionImpl(agreementId, status); + } + + /** + * factory method for an instance of SetApplicationAgreementStatusUpdateActionBuilder + * @return builder + */ + public static SetApplicationAgreementStatusUpdateActionBuilder of() { + return new SetApplicationAgreementStatusUpdateActionBuilder(); + } + + /** + * create builder for SetApplicationAgreementStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementStatusUpdateActionBuilder of( + final SetApplicationAgreementStatusUpdateAction template) { + SetApplicationAgreementStatusUpdateActionBuilder builder = new SetApplicationAgreementStatusUpdateActionBuilder(); + builder.agreementId = template.getAgreementId(); + builder.status = template.getStatus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionImpl.java new file mode 100644 index 00000000000..2614258691a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionImpl.java @@ -0,0 +1,118 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetApplicationAgreementStatusUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementStatusUpdateActionImpl + implements SetApplicationAgreementStatusUpdateAction, ModelBase { + + private String action; + + private String agreementId; + + private com.commercetools.checkout.models.application.ApplicationAgreementStatus status; + + /** + * create instance with all properties + */ + @JsonCreator + SetApplicationAgreementStatusUpdateActionImpl(@JsonProperty("agreementId") final String agreementId, + @JsonProperty("status") final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.agreementId = agreementId; + this.status = status; + this.action = SET_AGREEMENT_STATUS; + } + + /** + * create empty instance + */ + public SetApplicationAgreementStatusUpdateActionImpl() { + this.action = SET_AGREEMENT_STATUS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    ID of the agreement to update.

    + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New status for the agreement.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementStatus getStatus() { + return this.status; + } + + public void setAgreementId(final String agreementId) { + this.agreementId = agreementId; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationAgreementStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationAgreementStatusUpdateActionImpl that = (SetApplicationAgreementStatusUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementId, that.agreementId) + .append(status, that.status) + .append(action, that.action) + .append(agreementId, that.agreementId) + .append(status, that.status) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementId).append(status).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementId", agreementId) + .append("status", status) + .build(); + } + + @Override + public SetApplicationAgreementStatusUpdateAction copyDeep() { + return SetApplicationAgreementStatusUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateAction.java new file mode 100644 index 00000000000..b8237dcabf6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateAction.java @@ -0,0 +1,162 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationAgreementTextUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementTextUpdateAction setApplicationAgreementTextUpdateAction = SetApplicationAgreementTextUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAgreementText") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationAgreementTextUpdateActionImpl.class) +public interface SetApplicationAgreementTextUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationAgreementTextUpdateAction + */ + String SET_AGREEMENT_TEXT = "setAgreementText"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + @NotNull + @JsonProperty("agreementId") + public String getAgreementId(); + + /** + *

    New text for the agreement.

    + * @return text + */ + @NotNull + @Valid + @JsonProperty("text") + public LocalizedString getText(); + + /** + *

    ID of the agreement to update.

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

    New text for the agreement.

    + * @param text value to be set + */ + + public void setText(final LocalizedString text); + + /** + * factory method + * @return instance of SetApplicationAgreementTextUpdateAction + */ + public static SetApplicationAgreementTextUpdateAction of() { + return new SetApplicationAgreementTextUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationAgreementTextUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationAgreementTextUpdateAction of(final SetApplicationAgreementTextUpdateAction template) { + SetApplicationAgreementTextUpdateActionImpl instance = new SetApplicationAgreementTextUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setText(template.getText()); + return instance; + } + + public SetApplicationAgreementTextUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationAgreementTextUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationAgreementTextUpdateAction deepCopy( + @Nullable final SetApplicationAgreementTextUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationAgreementTextUpdateActionImpl instance = new SetApplicationAgreementTextUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setText(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getText())); + return instance; + } + + /** + * builder factory method for SetApplicationAgreementTextUpdateAction + * @return builder + */ + public static SetApplicationAgreementTextUpdateActionBuilder builder() { + return SetApplicationAgreementTextUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationAgreementTextUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementTextUpdateActionBuilder builder( + final SetApplicationAgreementTextUpdateAction template) { + return SetApplicationAgreementTextUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationAgreementTextUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionBuilder.java new file mode 100644 index 00000000000..afed90b1b82 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationAgreementTextUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementTextUpdateAction setApplicationAgreementTextUpdateAction = SetApplicationAgreementTextUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .text(textBuilder -> textBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementTextUpdateActionBuilder + implements Builder { + + private String agreementId; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + *

    ID of the agreement to update.

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

    New text for the agreement.

    + * @param builder function to build the text value + * @return Builder + */ + + public SetApplicationAgreementTextUpdateActionBuilder text( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    New text for the agreement.

    + * @param builder function to build the text value + * @return Builder + */ + + public SetApplicationAgreementTextUpdateActionBuilder withText( + Function builder) { + this.text = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    New text for the agreement.

    + * @param text value to be set + * @return Builder + */ + + public SetApplicationAgreementTextUpdateActionBuilder text( + final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + return this; + } + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New text for the agreement.

    + * @return text + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + /** + * builds SetApplicationAgreementTextUpdateAction with checking for non-null required values + * @return SetApplicationAgreementTextUpdateAction + */ + public SetApplicationAgreementTextUpdateAction build() { + Objects.requireNonNull(agreementId, SetApplicationAgreementTextUpdateAction.class + ": agreementId is missing"); + Objects.requireNonNull(text, SetApplicationAgreementTextUpdateAction.class + ": text is missing"); + return new SetApplicationAgreementTextUpdateActionImpl(agreementId, text); + } + + /** + * builds SetApplicationAgreementTextUpdateAction without checking for non-null required values + * @return SetApplicationAgreementTextUpdateAction + */ + public SetApplicationAgreementTextUpdateAction buildUnchecked() { + return new SetApplicationAgreementTextUpdateActionImpl(agreementId, text); + } + + /** + * factory method for an instance of SetApplicationAgreementTextUpdateActionBuilder + * @return builder + */ + public static SetApplicationAgreementTextUpdateActionBuilder of() { + return new SetApplicationAgreementTextUpdateActionBuilder(); + } + + /** + * create builder for SetApplicationAgreementTextUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementTextUpdateActionBuilder of( + final SetApplicationAgreementTextUpdateAction template) { + SetApplicationAgreementTextUpdateActionBuilder builder = new SetApplicationAgreementTextUpdateActionBuilder(); + builder.agreementId = template.getAgreementId(); + builder.text = template.getText(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionImpl.java new file mode 100644 index 00000000000..8bdf03b9312 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetApplicationAgreementTextUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementTextUpdateActionImpl implements SetApplicationAgreementTextUpdateAction, ModelBase { + + private String action; + + private String agreementId; + + private com.commercetools.checkout.models.common.LocalizedString text; + + /** + * create instance with all properties + */ + @JsonCreator + SetApplicationAgreementTextUpdateActionImpl(@JsonProperty("agreementId") final String agreementId, + @JsonProperty("text") final com.commercetools.checkout.models.common.LocalizedString text) { + this.agreementId = agreementId; + this.text = text; + this.action = SET_AGREEMENT_TEXT; + } + + /** + * create empty instance + */ + public SetApplicationAgreementTextUpdateActionImpl() { + this.action = SET_AGREEMENT_TEXT; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    ID of the agreement to update.

    + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New text for the agreement.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getText() { + return this.text; + } + + public void setAgreementId(final String agreementId) { + this.agreementId = agreementId; + } + + public void setText(final com.commercetools.checkout.models.common.LocalizedString text) { + this.text = text; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationAgreementTextUpdateActionImpl that = (SetApplicationAgreementTextUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementId, that.agreementId) + .append(text, that.text) + .append(action, that.action) + .append(agreementId, that.agreementId) + .append(text, that.text) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementId).append(text).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementId", agreementId) + .append("text", text) + .build(); + } + + @Override + public SetApplicationAgreementTextUpdateAction copyDeep() { + return SetApplicationAgreementTextUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateAction.java new file mode 100644 index 00000000000..ea6ac8b1093 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateAction.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationAgreementTypeUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementTypeUpdateAction setApplicationAgreementTypeUpdateAction = SetApplicationAgreementTypeUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAgreementType") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationAgreementTypeUpdateActionImpl.class) +public interface SetApplicationAgreementTypeUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationAgreementTypeUpdateAction + */ + String SET_AGREEMENT_TYPE = "setAgreementType"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + @NotNull + @JsonProperty("agreementId") + public String getAgreementId(); + + /** + *

    New type for the agreement.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public ApplicationAgreementType getType(); + + /** + *

    ID of the agreement to update.

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

    New type for the agreement.

    + * @param type value to be set + */ + + public void setType(final ApplicationAgreementType type); + + /** + * factory method + * @return instance of SetApplicationAgreementTypeUpdateAction + */ + public static SetApplicationAgreementTypeUpdateAction of() { + return new SetApplicationAgreementTypeUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationAgreementTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationAgreementTypeUpdateAction of(final SetApplicationAgreementTypeUpdateAction template) { + SetApplicationAgreementTypeUpdateActionImpl instance = new SetApplicationAgreementTypeUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setType(template.getType()); + return instance; + } + + public SetApplicationAgreementTypeUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationAgreementTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationAgreementTypeUpdateAction deepCopy( + @Nullable final SetApplicationAgreementTypeUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationAgreementTypeUpdateActionImpl instance = new SetApplicationAgreementTypeUpdateActionImpl(); + instance.setAgreementId(template.getAgreementId()); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for SetApplicationAgreementTypeUpdateAction + * @return builder + */ + public static SetApplicationAgreementTypeUpdateActionBuilder builder() { + return SetApplicationAgreementTypeUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationAgreementTypeUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementTypeUpdateActionBuilder builder( + final SetApplicationAgreementTypeUpdateAction template) { + return SetApplicationAgreementTypeUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationAgreementTypeUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionBuilder.java new file mode 100644 index 00000000000..df5541c2ada --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationAgreementTypeUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementTypeUpdateAction setApplicationAgreementTypeUpdateAction = SetApplicationAgreementTypeUpdateAction.builder()
    + *             .agreementId("{agreementId}")
    + *             .type(ApplicationAgreementType.TEXT)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementTypeUpdateActionBuilder + implements Builder { + + private String agreementId; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + /** + *

    ID of the agreement to update.

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

    New type for the agreement.

    + * @param type value to be set + * @return Builder + */ + + public SetApplicationAgreementTypeUpdateActionBuilder type( + final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + return this; + } + + /** + *

    ID of the agreement to update.

    + * @return agreementId + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New type for the agreement.

    + * @return type + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + /** + * builds SetApplicationAgreementTypeUpdateAction with checking for non-null required values + * @return SetApplicationAgreementTypeUpdateAction + */ + public SetApplicationAgreementTypeUpdateAction build() { + Objects.requireNonNull(agreementId, SetApplicationAgreementTypeUpdateAction.class + ": agreementId is missing"); + Objects.requireNonNull(type, SetApplicationAgreementTypeUpdateAction.class + ": type is missing"); + return new SetApplicationAgreementTypeUpdateActionImpl(agreementId, type); + } + + /** + * builds SetApplicationAgreementTypeUpdateAction without checking for non-null required values + * @return SetApplicationAgreementTypeUpdateAction + */ + public SetApplicationAgreementTypeUpdateAction buildUnchecked() { + return new SetApplicationAgreementTypeUpdateActionImpl(agreementId, type); + } + + /** + * factory method for an instance of SetApplicationAgreementTypeUpdateActionBuilder + * @return builder + */ + public static SetApplicationAgreementTypeUpdateActionBuilder of() { + return new SetApplicationAgreementTypeUpdateActionBuilder(); + } + + /** + * create builder for SetApplicationAgreementTypeUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementTypeUpdateActionBuilder of( + final SetApplicationAgreementTypeUpdateAction template) { + SetApplicationAgreementTypeUpdateActionBuilder builder = new SetApplicationAgreementTypeUpdateActionBuilder(); + builder.agreementId = template.getAgreementId(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionImpl.java new file mode 100644 index 00000000000..75e143adb9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetApplicationAgreementTypeUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementTypeUpdateActionImpl implements SetApplicationAgreementTypeUpdateAction, ModelBase { + + private String action; + + private String agreementId; + + private com.commercetools.checkout.models.application.ApplicationAgreementType type; + + /** + * create instance with all properties + */ + @JsonCreator + SetApplicationAgreementTypeUpdateActionImpl(@JsonProperty("agreementId") final String agreementId, + @JsonProperty("type") final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.agreementId = agreementId; + this.type = type; + this.action = SET_AGREEMENT_TYPE; + } + + /** + * create empty instance + */ + public SetApplicationAgreementTypeUpdateActionImpl() { + this.action = SET_AGREEMENT_TYPE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    ID of the agreement to update.

    + */ + + public String getAgreementId() { + return this.agreementId; + } + + /** + *

    New type for the agreement.

    + */ + + public com.commercetools.checkout.models.application.ApplicationAgreementType getType() { + return this.type; + } + + public void setAgreementId(final String agreementId) { + this.agreementId = agreementId; + } + + public void setType(final com.commercetools.checkout.models.application.ApplicationAgreementType type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationAgreementTypeUpdateActionImpl that = (SetApplicationAgreementTypeUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreementId, that.agreementId) + .append(type, that.type) + .append(action, that.action) + .append(agreementId, that.agreementId) + .append(type, that.type) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreementId).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreementId", agreementId) + .append("type", type) + .build(); + } + + @Override + public SetApplicationAgreementTypeUpdateAction copyDeep() { + return SetApplicationAgreementTypeUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateAction.java new file mode 100644 index 00000000000..8a3a06a2eac --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateAction.java @@ -0,0 +1,153 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationAgreementsUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementsUpdateAction setApplicationAgreementsUpdateAction = SetApplicationAgreementsUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAgreements") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationAgreementsUpdateActionImpl.class) +public interface SetApplicationAgreementsUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationAgreementsUpdateAction + */ + String SET_AGREEMENTS = "setAgreements"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return agreements + */ + @Valid + @JsonProperty("agreements") + public List getAgreements(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param agreements values to be set + */ + + @JsonIgnore + public void setAgreements(final ApplicationAgreementDraft... agreements); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param agreements values to be set + */ + + public void setAgreements(final List agreements); + + /** + * factory method + * @return instance of SetApplicationAgreementsUpdateAction + */ + public static SetApplicationAgreementsUpdateAction of() { + return new SetApplicationAgreementsUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationAgreementsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationAgreementsUpdateAction of(final SetApplicationAgreementsUpdateAction template) { + SetApplicationAgreementsUpdateActionImpl instance = new SetApplicationAgreementsUpdateActionImpl(); + instance.setAgreements(template.getAgreements()); + return instance; + } + + public SetApplicationAgreementsUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationAgreementsUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationAgreementsUpdateAction deepCopy( + @Nullable final SetApplicationAgreementsUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationAgreementsUpdateActionImpl instance = new SetApplicationAgreementsUpdateActionImpl(); + instance.setAgreements(Optional.ofNullable(template.getAgreements()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.application.ApplicationAgreementDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetApplicationAgreementsUpdateAction + * @return builder + */ + public static SetApplicationAgreementsUpdateActionBuilder builder() { + return SetApplicationAgreementsUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationAgreementsUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementsUpdateActionBuilder builder( + final SetApplicationAgreementsUpdateAction template) { + return SetApplicationAgreementsUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationAgreementsUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionBuilder.java new file mode 100644 index 00000000000..4e6520821e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionBuilder.java @@ -0,0 +1,167 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationAgreementsUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationAgreementsUpdateAction setApplicationAgreementsUpdateAction = SetApplicationAgreementsUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementsUpdateActionBuilder implements Builder { + + @Nullable + private java.util.List agreements; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param agreements value to be set + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder agreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreementDraft... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param agreements value to be set + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder agreements( + @Nullable final java.util.List agreements) { + this.agreements = agreements; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param agreements value to be set + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder plusAgreements( + @Nullable final com.commercetools.checkout.models.application.ApplicationAgreementDraft... agreements) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.addAll(Arrays.asList(agreements)); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder plusAgreements( + Function builder) { + if (this.agreements == null) { + this.agreements = new ArrayList<>(); + } + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of()).build()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder withAgreements( + Function builder) { + this.agreements = new ArrayList<>(); + this.agreements.add( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of()).build()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder addAgreements( + Function builder) { + return plusAgreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of())); + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the agreements value + * @return Builder + */ + + public SetApplicationAgreementsUpdateActionBuilder setAgreements( + Function builder) { + return agreements( + builder.apply(com.commercetools.checkout.models.application.ApplicationAgreementDraftBuilder.of())); + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return agreements + */ + + @Nullable + public java.util.List getAgreements() { + return this.agreements; + } + + /** + * builds SetApplicationAgreementsUpdateAction with checking for non-null required values + * @return SetApplicationAgreementsUpdateAction + */ + public SetApplicationAgreementsUpdateAction build() { + return new SetApplicationAgreementsUpdateActionImpl(agreements); + } + + /** + * builds SetApplicationAgreementsUpdateAction without checking for non-null required values + * @return SetApplicationAgreementsUpdateAction + */ + public SetApplicationAgreementsUpdateAction buildUnchecked() { + return new SetApplicationAgreementsUpdateActionImpl(agreements); + } + + /** + * factory method for an instance of SetApplicationAgreementsUpdateActionBuilder + * @return builder + */ + public static SetApplicationAgreementsUpdateActionBuilder of() { + return new SetApplicationAgreementsUpdateActionBuilder(); + } + + /** + * create builder for SetApplicationAgreementsUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationAgreementsUpdateActionBuilder of(final SetApplicationAgreementsUpdateAction template) { + SetApplicationAgreementsUpdateActionBuilder builder = new SetApplicationAgreementsUpdateActionBuilder(); + builder.agreements = template.getAgreements(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionImpl.java new file mode 100644 index 00000000000..82bd2c92e3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionImpl.java @@ -0,0 +1,105 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetApplicationAgreementsUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationAgreementsUpdateActionImpl implements SetApplicationAgreementsUpdateAction, ModelBase { + + private String action; + + private java.util.List agreements; + + /** + * create instance with all properties + */ + @JsonCreator + SetApplicationAgreementsUpdateActionImpl( + @JsonProperty("agreements") final java.util.List agreements) { + this.agreements = agreements; + this.action = SET_AGREEMENTS; + } + + /** + * create empty instance + */ + public SetApplicationAgreementsUpdateActionImpl() { + this.action = SET_AGREEMENTS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public java.util.List getAgreements() { + return this.agreements; + } + + public void setAgreements( + final com.commercetools.checkout.models.application.ApplicationAgreementDraft... agreements) { + this.agreements = new ArrayList<>(Arrays.asList(agreements)); + } + + public void setAgreements( + final java.util.List agreements) { + this.agreements = agreements; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationAgreementsUpdateActionImpl that = (SetApplicationAgreementsUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(agreements, that.agreements) + .append(action, that.action) + .append(agreements, that.agreements) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(agreements).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("agreements", agreements) + .build(); + } + + @Override + public SetApplicationAgreementsUpdateAction copyDeep() { + return SetApplicationAgreementsUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateAction.java new file mode 100644 index 00000000000..3ba2f7debe8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateAction.java @@ -0,0 +1,140 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationLogoUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationLogoUpdateAction setApplicationLogoUpdateAction = SetApplicationLogoUpdateAction.builder()
    + *             .logo(logoBuilder -> logoBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setApplicationLogo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationLogoUpdateActionImpl.class) +public interface SetApplicationLogoUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationLogoUpdateAction + */ + String SET_APPLICATION_LOGO = "setApplicationLogo"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New logo to assign to the Application, which must be a valid url.

    + * @return logo + */ + @NotNull + @Valid + @JsonProperty("logo") + public ApplicationLogo getLogo(); + + /** + *

    New logo to assign to the Application, which must be a valid url.

    + * @param logo value to be set + */ + + public void setLogo(final ApplicationLogo logo); + + /** + * factory method + * @return instance of SetApplicationLogoUpdateAction + */ + public static SetApplicationLogoUpdateAction of() { + return new SetApplicationLogoUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationLogoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationLogoUpdateAction of(final SetApplicationLogoUpdateAction template) { + SetApplicationLogoUpdateActionImpl instance = new SetApplicationLogoUpdateActionImpl(); + instance.setLogo(template.getLogo()); + return instance; + } + + public SetApplicationLogoUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationLogoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationLogoUpdateAction deepCopy(@Nullable final SetApplicationLogoUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationLogoUpdateActionImpl instance = new SetApplicationLogoUpdateActionImpl(); + instance.setLogo(com.commercetools.checkout.models.application.ApplicationLogo.deepCopy(template.getLogo())); + return instance; + } + + /** + * builder factory method for SetApplicationLogoUpdateAction + * @return builder + */ + public static SetApplicationLogoUpdateActionBuilder builder() { + return SetApplicationLogoUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationLogoUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationLogoUpdateActionBuilder builder(final SetApplicationLogoUpdateAction template) { + return SetApplicationLogoUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationLogoUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionBuilder.java new file mode 100644 index 00000000000..823ee01d5c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationLogoUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationLogoUpdateAction setApplicationLogoUpdateAction = SetApplicationLogoUpdateAction.builder()
    + *             .logo(logoBuilder -> logoBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationLogoUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.ApplicationLogo logo; + + /** + *

    New logo to assign to the Application, which must be a valid url.

    + * @param builder function to build the logo value + * @return Builder + */ + + public SetApplicationLogoUpdateActionBuilder logo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()).build(); + return this; + } + + /** + *

    New logo to assign to the Application, which must be a valid url.

    + * @param builder function to build the logo value + * @return Builder + */ + + public SetApplicationLogoUpdateActionBuilder withLogo( + Function builder) { + this.logo = builder.apply(com.commercetools.checkout.models.application.ApplicationLogoBuilder.of()); + return this; + } + + /** + *

    New logo to assign to the Application, which must be a valid url.

    + * @param logo value to be set + * @return Builder + */ + + public SetApplicationLogoUpdateActionBuilder logo( + final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + return this; + } + + /** + *

    New logo to assign to the Application, which must be a valid url.

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

    New logo to assign to the Application, which must be a valid url.

    + */ + + public com.commercetools.checkout.models.application.ApplicationLogo getLogo() { + return this.logo; + } + + public void setLogo(final com.commercetools.checkout.models.application.ApplicationLogo logo) { + this.logo = logo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationLogoUpdateActionImpl that = (SetApplicationLogoUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(logo, that.logo) + .append(action, that.action) + .append(logo, that.logo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(logo).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("logo", logo) + .build(); + } + + @Override + public SetApplicationLogoUpdateAction copyDeep() { + return SetApplicationLogoUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateAction.java new file mode 100644 index 00000000000..520491970ec --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationNameUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationNameUpdateAction setApplicationNameUpdateAction = SetApplicationNameUpdateAction.builder()
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setName") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationNameUpdateActionImpl.class) +public interface SetApplicationNameUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationNameUpdateAction + */ + String SET_NAME = "setName"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New name to assign to the Application.

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

    New name to assign to the Application.

    + * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of SetApplicationNameUpdateAction + */ + public static SetApplicationNameUpdateAction of() { + return new SetApplicationNameUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationNameUpdateAction of(final SetApplicationNameUpdateAction template) { + SetApplicationNameUpdateActionImpl instance = new SetApplicationNameUpdateActionImpl(); + instance.setName(template.getName()); + return instance; + } + + public SetApplicationNameUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationNameUpdateAction deepCopy(@Nullable final SetApplicationNameUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationNameUpdateActionImpl instance = new SetApplicationNameUpdateActionImpl(); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for SetApplicationNameUpdateAction + * @return builder + */ + public static SetApplicationNameUpdateActionBuilder builder() { + return SetApplicationNameUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationNameUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationNameUpdateActionBuilder builder(final SetApplicationNameUpdateAction template) { + return SetApplicationNameUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationNameUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionBuilder.java new file mode 100644 index 00000000000..bdcaa84565b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationNameUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationNameUpdateAction setApplicationNameUpdateAction = SetApplicationNameUpdateAction.builder()
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationNameUpdateActionBuilder implements Builder { + + private String name; + + /** + *

    New name to assign to the Application.

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

    New name to assign to the Application.

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

    New name to assign to the Application.

    + */ + + public String getName() { + return this.name; + } + + 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; + + SetApplicationNameUpdateActionImpl that = (SetApplicationNameUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(action, that.action) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .build(); + } + + @Override + public SetApplicationNameUpdateAction copyDeep() { + return SetApplicationNameUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateAction.java new file mode 100644 index 00000000000..cbb2d0a8f6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateAction.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetApplicationStatusUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationStatusUpdateAction setApplicationStatusUpdateAction = SetApplicationStatusUpdateAction.builder()
    + *             .status(ApplicationStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setStatus") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetApplicationStatusUpdateActionImpl.class) +public interface SetApplicationStatusUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetApplicationStatusUpdateAction + */ + String SET_STATUS = "setStatus"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New status to assign to the Application.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public ApplicationStatus getStatus(); + + /** + *

    New status to assign to the Application.

    + * @param status value to be set + */ + + public void setStatus(final ApplicationStatus status); + + /** + * factory method + * @return instance of SetApplicationStatusUpdateAction + */ + public static SetApplicationStatusUpdateAction of() { + return new SetApplicationStatusUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetApplicationStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetApplicationStatusUpdateAction of(final SetApplicationStatusUpdateAction template) { + SetApplicationStatusUpdateActionImpl instance = new SetApplicationStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + public SetApplicationStatusUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetApplicationStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetApplicationStatusUpdateAction deepCopy(@Nullable final SetApplicationStatusUpdateAction template) { + if (template == null) { + return null; + } + SetApplicationStatusUpdateActionImpl instance = new SetApplicationStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * builder factory method for SetApplicationStatusUpdateAction + * @return builder + */ + public static SetApplicationStatusUpdateActionBuilder builder() { + return SetApplicationStatusUpdateActionBuilder.of(); + } + + /** + * create builder for SetApplicationStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetApplicationStatusUpdateActionBuilder builder(final SetApplicationStatusUpdateAction template) { + return SetApplicationStatusUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetApplicationStatusUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionBuilder.java new file mode 100644 index 00000000000..cea94746f3f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionBuilder.java @@ -0,0 +1,83 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetApplicationStatusUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetApplicationStatusUpdateAction setApplicationStatusUpdateAction = SetApplicationStatusUpdateAction.builder()
    + *             .status(ApplicationStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetApplicationStatusUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.ApplicationStatus status; + + /** + *

    New status to assign to the Application.

    + * @param status value to be set + * @return Builder + */ + + public SetApplicationStatusUpdateActionBuilder status( + final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + return this; + } + + /** + *

    New status to assign to the Application.

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

    New status to assign to the Application.

    + */ + + public com.commercetools.checkout.models.application.ApplicationStatus getStatus() { + return this.status; + } + + public void setStatus(final com.commercetools.checkout.models.application.ApplicationStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetApplicationStatusUpdateActionImpl that = (SetApplicationStatusUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(status, that.status) + .append(action, that.action) + .append(status, that.status) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(status).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("status", status) + .build(); + } + + @Override + public SetApplicationStatusUpdateAction copyDeep() { + return SetApplicationStatusUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateAction.java new file mode 100644 index 00000000000..bb61ee98ac5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateAction.java @@ -0,0 +1,146 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetCountriesUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetCountriesUpdateAction setCountriesUpdateAction = SetCountriesUpdateAction.builder()
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setCountries") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetCountriesUpdateActionImpl.class) +public interface SetCountriesUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetCountriesUpdateAction + */ + String SET_COUNTRIES = "setCountries"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @return countries + */ + @NotNull + @JsonProperty("countries") + public List getCountries(); + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + @JsonIgnore + public void setCountries(final String... countries); + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries values to be set + */ + + public void setCountries(final List countries); + + /** + * factory method + * @return instance of SetCountriesUpdateAction + */ + public static SetCountriesUpdateAction of() { + return new SetCountriesUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetCountriesUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetCountriesUpdateAction of(final SetCountriesUpdateAction template) { + SetCountriesUpdateActionImpl instance = new SetCountriesUpdateActionImpl(); + instance.setCountries(template.getCountries()); + return instance; + } + + public SetCountriesUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetCountriesUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetCountriesUpdateAction deepCopy(@Nullable final SetCountriesUpdateAction template) { + if (template == null) { + return null; + } + SetCountriesUpdateActionImpl instance = new SetCountriesUpdateActionImpl(); + instance.setCountries(Optional.ofNullable(template.getCountries()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for SetCountriesUpdateAction + * @return builder + */ + public static SetCountriesUpdateActionBuilder builder() { + return SetCountriesUpdateActionBuilder.of(); + } + + /** + * create builder for SetCountriesUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCountriesUpdateActionBuilder builder(final SetCountriesUpdateAction template) { + return SetCountriesUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetCountriesUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionBuilder.java new file mode 100644 index 00000000000..33e1d151301 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetCountriesUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetCountriesUpdateAction setCountriesUpdateAction = SetCountriesUpdateAction.builder()
    + *             .plusCountries(countriesBuilder -> countriesBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetCountriesUpdateActionBuilder implements Builder { + + private java.util.List countries; + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public SetCountriesUpdateActionBuilder countries(final java.util.List countries) { + this.countries = countries; + return this; + } + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + * @param countries value to be set + * @return Builder + */ + + public SetCountriesUpdateActionBuilder plusCountries(final String... countries) { + if (this.countries == null) { + this.countries = new ArrayList<>(); + } + this.countries.addAll(Arrays.asList(countries)); + return this; + } + + /** + *

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

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

    Sets a list of countries to the Application. Each country is represented by two-digit country code as per ISO 3166-1 alpha-2.

    + */ + + public java.util.List getCountries() { + return this.countries; + } + + public void setCountries(final String... countries) { + this.countries = new ArrayList<>(Arrays.asList(countries)); + } + + public void setCountries(final java.util.List countries) { + this.countries = countries; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetCountriesUpdateActionImpl that = (SetCountriesUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(countries, that.countries) + .append(action, that.action) + .append(countries, that.countries) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(countries).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("countries", countries) + .build(); + } + + @Override + public SetCountriesUpdateAction copyDeep() { + return SetCountriesUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateAction.java new file mode 100644 index 00000000000..5ec5735ba89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateAction.java @@ -0,0 +1,142 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetDescriptionUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDescriptionUpdateAction setDescriptionUpdateAction = SetDescriptionUpdateAction.builder()
    + *             .description(descriptionBuilder -> descriptionBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDescription") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDescriptionUpdateActionImpl.class) +public interface SetDescriptionUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetDescriptionUpdateAction + */ + String SET_DESCRIPTION = "setDescription"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return description + */ + @NotNull + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + * factory method + * @return instance of SetDescriptionUpdateAction + */ + public static SetDescriptionUpdateAction of() { + return new SetDescriptionUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDescriptionUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDescriptionUpdateAction of(final SetDescriptionUpdateAction template) { + SetDescriptionUpdateActionImpl instance = new SetDescriptionUpdateActionImpl(); + instance.setDescription(template.getDescription()); + return instance; + } + + public SetDescriptionUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDescriptionUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDescriptionUpdateAction deepCopy(@Nullable final SetDescriptionUpdateAction template) { + if (template == null) { + return null; + } + SetDescriptionUpdateActionImpl instance = new SetDescriptionUpdateActionImpl(); + instance.setDescription( + com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getDescription())); + return instance; + } + + /** + * builder factory method for SetDescriptionUpdateAction + * @return builder + */ + public static SetDescriptionUpdateActionBuilder builder() { + return SetDescriptionUpdateActionBuilder.of(); + } + + /** + * create builder for SetDescriptionUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDescriptionUpdateActionBuilder builder(final SetDescriptionUpdateAction template) { + return SetDescriptionUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDescriptionUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionBuilder.java new file mode 100644 index 00000000000..80f343e8922 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionBuilder.java @@ -0,0 +1,108 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDescriptionUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDescriptionUpdateAction setDescriptionUpdateAction = SetDescriptionUpdateAction.builder()
    + *             .description(descriptionBuilder -> descriptionBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDescriptionUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.common.LocalizedString description; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the description value + * @return Builder + */ + + public SetDescriptionUpdateActionBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the description value + * @return Builder + */ + + public SetDescriptionUpdateActionBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param description value to be set + * @return Builder + */ + + public SetDescriptionUpdateActionBuilder description( + final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getDescription() { + return this.description; + } + + public void setDescription(final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDescriptionUpdateActionImpl that = (SetDescriptionUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(description, that.description) + .append(action, that.action) + .append(description, that.description) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(description).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("description", description) + .build(); + } + + @Override + public SetDescriptionUpdateAction copyDeep() { + return SetDescriptionUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateAction.java new file mode 100644 index 00000000000..72ac908c575 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetDiscountsConfigurationUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDiscountsConfigurationUpdateAction setDiscountsConfigurationUpdateAction = SetDiscountsConfigurationUpdateAction.builder()
    + *             .discountsConfiguration(discountsConfigurationBuilder -> discountsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDiscountsConfiguration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDiscountsConfigurationUpdateActionImpl.class) +public interface SetDiscountsConfigurationUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetDiscountsConfigurationUpdateAction + */ + String SET_DISCOUNTS_CONFIGURATION = "setDiscountsConfiguration"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New discounts configuration for the Application.

    + * @return discountsConfiguration + */ + @NotNull + @Valid + @JsonProperty("discountsConfiguration") + public DiscountsConfiguration getDiscountsConfiguration(); + + /** + *

    New discounts configuration for the Application.

    + * @param discountsConfiguration value to be set + */ + + public void setDiscountsConfiguration(final DiscountsConfiguration discountsConfiguration); + + /** + * factory method + * @return instance of SetDiscountsConfigurationUpdateAction + */ + public static SetDiscountsConfigurationUpdateAction of() { + return new SetDiscountsConfigurationUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDiscountsConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDiscountsConfigurationUpdateAction of(final SetDiscountsConfigurationUpdateAction template) { + SetDiscountsConfigurationUpdateActionImpl instance = new SetDiscountsConfigurationUpdateActionImpl(); + instance.setDiscountsConfiguration(template.getDiscountsConfiguration()); + return instance; + } + + public SetDiscountsConfigurationUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDiscountsConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDiscountsConfigurationUpdateAction deepCopy( + @Nullable final SetDiscountsConfigurationUpdateAction template) { + if (template == null) { + return null; + } + SetDiscountsConfigurationUpdateActionImpl instance = new SetDiscountsConfigurationUpdateActionImpl(); + instance.setDiscountsConfiguration(com.commercetools.checkout.models.application.DiscountsConfiguration + .deepCopy(template.getDiscountsConfiguration())); + return instance; + } + + /** + * builder factory method for SetDiscountsConfigurationUpdateAction + * @return builder + */ + public static SetDiscountsConfigurationUpdateActionBuilder builder() { + return SetDiscountsConfigurationUpdateActionBuilder.of(); + } + + /** + * create builder for SetDiscountsConfigurationUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDiscountsConfigurationUpdateActionBuilder builder( + final SetDiscountsConfigurationUpdateAction template) { + return SetDiscountsConfigurationUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDiscountsConfigurationUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionBuilder.java new file mode 100644 index 00000000000..ad58fd81ed2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionBuilder.java @@ -0,0 +1,113 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDiscountsConfigurationUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDiscountsConfigurationUpdateAction setDiscountsConfigurationUpdateAction = SetDiscountsConfigurationUpdateAction.builder()
    + *             .discountsConfiguration(discountsConfigurationBuilder -> discountsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDiscountsConfigurationUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration; + + /** + *

    New discounts configuration for the Application.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public SetDiscountsConfigurationUpdateActionBuilder discountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    New discounts configuration for the Application.

    + * @param builder function to build the discountsConfiguration value + * @return Builder + */ + + public SetDiscountsConfigurationUpdateActionBuilder withDiscountsConfiguration( + Function builder) { + this.discountsConfiguration = builder + .apply(com.commercetools.checkout.models.application.DiscountsConfigurationBuilder.of()); + return this; + } + + /** + *

    New discounts configuration for the Application.

    + * @param discountsConfiguration value to be set + * @return Builder + */ + + public SetDiscountsConfigurationUpdateActionBuilder discountsConfiguration( + final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + return this; + } + + /** + *

    New discounts configuration for the Application.

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

    New discounts configuration for the Application.

    + */ + + public com.commercetools.checkout.models.application.DiscountsConfiguration getDiscountsConfiguration() { + return this.discountsConfiguration; + } + + public void setDiscountsConfiguration( + final com.commercetools.checkout.models.application.DiscountsConfiguration discountsConfiguration) { + this.discountsConfiguration = discountsConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDiscountsConfigurationUpdateActionImpl that = (SetDiscountsConfigurationUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(discountsConfiguration, that.discountsConfiguration) + .append(action, that.action) + .append(discountsConfiguration, that.discountsConfiguration) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(discountsConfiguration).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("discountsConfiguration", discountsConfiguration) + .build(); + } + + @Override + public SetDiscountsConfigurationUpdateAction copyDeep() { + return SetDiscountsConfigurationUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateAction.java new file mode 100644 index 00000000000..de938aefc02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateAction.java @@ -0,0 +1,137 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SetPaymentReturnUrlUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPaymentReturnUrlUpdateAction setPaymentReturnUrlUpdateAction = SetPaymentReturnUrlUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setPaymentReturnUrl") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPaymentReturnUrlUpdateActionImpl.class) +public interface SetPaymentReturnUrlUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetPaymentReturnUrlUpdateAction + */ + String SET_PAYMENT_RETURN_URL = "setPaymentReturnUrl"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return paymentReturnUrl + */ + + @JsonProperty("paymentReturnUrl") + public String getPaymentReturnUrl(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param paymentReturnUrl value to be set + */ + + public void setPaymentReturnUrl(final String paymentReturnUrl); + + /** + * factory method + * @return instance of SetPaymentReturnUrlUpdateAction + */ + public static SetPaymentReturnUrlUpdateAction of() { + return new SetPaymentReturnUrlUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetPaymentReturnUrlUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetPaymentReturnUrlUpdateAction of(final SetPaymentReturnUrlUpdateAction template) { + SetPaymentReturnUrlUpdateActionImpl instance = new SetPaymentReturnUrlUpdateActionImpl(); + instance.setPaymentReturnUrl(template.getPaymentReturnUrl()); + return instance; + } + + public SetPaymentReturnUrlUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetPaymentReturnUrlUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPaymentReturnUrlUpdateAction deepCopy(@Nullable final SetPaymentReturnUrlUpdateAction template) { + if (template == null) { + return null; + } + SetPaymentReturnUrlUpdateActionImpl instance = new SetPaymentReturnUrlUpdateActionImpl(); + instance.setPaymentReturnUrl(template.getPaymentReturnUrl()); + return instance; + } + + /** + * builder factory method for SetPaymentReturnUrlUpdateAction + * @return builder + */ + public static SetPaymentReturnUrlUpdateActionBuilder builder() { + return SetPaymentReturnUrlUpdateActionBuilder.of(); + } + + /** + * create builder for SetPaymentReturnUrlUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPaymentReturnUrlUpdateActionBuilder builder(final SetPaymentReturnUrlUpdateAction template) { + return SetPaymentReturnUrlUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPaymentReturnUrlUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionBuilder.java new file mode 100644 index 00000000000..2d25f3211f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetPaymentReturnUrlUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPaymentReturnUrlUpdateAction setPaymentReturnUrlUpdateAction = SetPaymentReturnUrlUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPaymentReturnUrlUpdateActionBuilder implements Builder { + + @Nullable + private String paymentReturnUrl; + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + * @return paymentReturnUrl + */ + + @Nullable + public String getPaymentReturnUrl() { + return this.paymentReturnUrl; + } + + /** + * builds SetPaymentReturnUrlUpdateAction with checking for non-null required values + * @return SetPaymentReturnUrlUpdateAction + */ + public SetPaymentReturnUrlUpdateAction build() { + return new SetPaymentReturnUrlUpdateActionImpl(paymentReturnUrl); + } + + /** + * builds SetPaymentReturnUrlUpdateAction without checking for non-null required values + * @return SetPaymentReturnUrlUpdateAction + */ + public SetPaymentReturnUrlUpdateAction buildUnchecked() { + return new SetPaymentReturnUrlUpdateActionImpl(paymentReturnUrl); + } + + /** + * factory method for an instance of SetPaymentReturnUrlUpdateActionBuilder + * @return builder + */ + public static SetPaymentReturnUrlUpdateActionBuilder of() { + return new SetPaymentReturnUrlUpdateActionBuilder(); + } + + /** + * create builder for SetPaymentReturnUrlUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPaymentReturnUrlUpdateActionBuilder of(final SetPaymentReturnUrlUpdateAction template) { + SetPaymentReturnUrlUpdateActionBuilder builder = new SetPaymentReturnUrlUpdateActionBuilder(); + builder.paymentReturnUrl = template.getPaymentReturnUrl(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionImpl.java new file mode 100644 index 00000000000..a41374f1872 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetPaymentReturnUrlUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPaymentReturnUrlUpdateActionImpl implements SetPaymentReturnUrlUpdateAction, ModelBase { + + private String action; + + private String paymentReturnUrl; + + /** + * create instance with all properties + */ + @JsonCreator + SetPaymentReturnUrlUpdateActionImpl(@JsonProperty("paymentReturnUrl") final String paymentReturnUrl) { + this.paymentReturnUrl = paymentReturnUrl; + this.action = SET_PAYMENT_RETURN_URL; + } + + /** + * create empty instance + */ + public SetPaymentReturnUrlUpdateActionImpl() { + this.action = SET_PAYMENT_RETURN_URL; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public String getPaymentReturnUrl() { + return this.paymentReturnUrl; + } + + public void setPaymentReturnUrl(final String paymentReturnUrl) { + this.paymentReturnUrl = paymentReturnUrl; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetPaymentReturnUrlUpdateActionImpl that = (SetPaymentReturnUrlUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(paymentReturnUrl, that.paymentReturnUrl) + .append(action, that.action) + .append(paymentReturnUrl, that.paymentReturnUrl) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(paymentReturnUrl).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("paymentReturnUrl", paymentReturnUrl) + .build(); + } + + @Override + public SetPaymentReturnUrlUpdateAction copyDeep() { + return SetPaymentReturnUrlUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateAction.java new file mode 100644 index 00000000000..303993ff91b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateAction.java @@ -0,0 +1,143 @@ + +package com.commercetools.checkout.models.application; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * SetPaymentsConfigurationUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPaymentsConfigurationUpdateAction setPaymentsConfigurationUpdateAction = SetPaymentsConfigurationUpdateAction.builder()
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setPaymentsConfiguration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPaymentsConfigurationUpdateActionImpl.class) +public interface SetPaymentsConfigurationUpdateAction extends ApplicationUpdateAction { + + /** + * discriminator value for SetPaymentsConfigurationUpdateAction + */ + String SET_PAYMENTS_CONFIGURATION = "setPaymentsConfiguration"; + + /** + * + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + /** + *

    New payments configuration for the Application.

    + * @return paymentsConfiguration + */ + @NotNull + @Valid + @JsonProperty("paymentsConfiguration") + public PaymentsConfiguration getPaymentsConfiguration(); + + /** + *

    New payments configuration for the Application.

    + * @param paymentsConfiguration value to be set + */ + + public void setPaymentsConfiguration(final PaymentsConfiguration paymentsConfiguration); + + /** + * factory method + * @return instance of SetPaymentsConfigurationUpdateAction + */ + public static SetPaymentsConfigurationUpdateAction of() { + return new SetPaymentsConfigurationUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetPaymentsConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetPaymentsConfigurationUpdateAction of(final SetPaymentsConfigurationUpdateAction template) { + SetPaymentsConfigurationUpdateActionImpl instance = new SetPaymentsConfigurationUpdateActionImpl(); + instance.setPaymentsConfiguration(template.getPaymentsConfiguration()); + return instance; + } + + public SetPaymentsConfigurationUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetPaymentsConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPaymentsConfigurationUpdateAction deepCopy( + @Nullable final SetPaymentsConfigurationUpdateAction template) { + if (template == null) { + return null; + } + SetPaymentsConfigurationUpdateActionImpl instance = new SetPaymentsConfigurationUpdateActionImpl(); + instance.setPaymentsConfiguration(com.commercetools.checkout.models.application.PaymentsConfiguration + .deepCopy(template.getPaymentsConfiguration())); + return instance; + } + + /** + * builder factory method for SetPaymentsConfigurationUpdateAction + * @return builder + */ + public static SetPaymentsConfigurationUpdateActionBuilder builder() { + return SetPaymentsConfigurationUpdateActionBuilder.of(); + } + + /** + * create builder for SetPaymentsConfigurationUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPaymentsConfigurationUpdateActionBuilder builder( + final SetPaymentsConfigurationUpdateAction template) { + return SetPaymentsConfigurationUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPaymentsConfigurationUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionBuilder.java new file mode 100644 index 00000000000..60dc57f1936 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionBuilder.java @@ -0,0 +1,112 @@ + +package com.commercetools.checkout.models.application; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetPaymentsConfigurationUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPaymentsConfigurationUpdateAction setPaymentsConfigurationUpdateAction = SetPaymentsConfigurationUpdateAction.builder()
    + *             .paymentsConfiguration(paymentsConfigurationBuilder -> paymentsConfigurationBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPaymentsConfigurationUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration; + + /** + *

    New payments configuration for the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public SetPaymentsConfigurationUpdateActionBuilder paymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    New payments configuration for the Application.

    + * @param builder function to build the paymentsConfiguration value + * @return Builder + */ + + public SetPaymentsConfigurationUpdateActionBuilder withPaymentsConfiguration( + Function builder) { + this.paymentsConfiguration = builder + .apply(com.commercetools.checkout.models.application.PaymentsConfigurationBuilder.of()); + return this; + } + + /** + *

    New payments configuration for the Application.

    + * @param paymentsConfiguration value to be set + * @return Builder + */ + + public SetPaymentsConfigurationUpdateActionBuilder paymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + return this; + } + + /** + *

    New payments configuration for the Application.

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

    New payments configuration for the Application.

    + */ + + public com.commercetools.checkout.models.application.PaymentsConfiguration getPaymentsConfiguration() { + return this.paymentsConfiguration; + } + + public void setPaymentsConfiguration( + final com.commercetools.checkout.models.application.PaymentsConfiguration paymentsConfiguration) { + this.paymentsConfiguration = paymentsConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetPaymentsConfigurationUpdateActionImpl that = (SetPaymentsConfigurationUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(paymentsConfiguration, that.paymentsConfiguration) + .append(action, that.action) + .append(paymentsConfiguration, that.paymentsConfiguration) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(paymentsConfiguration).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("paymentsConfiguration", paymentsConfiguration) + .build(); + } + + @Override + public SetPaymentsConfigurationUpdateAction copyDeep() { + return SetPaymentsConfigurationUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java index 35570d4dadb..1ee2f1f0237 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/cart/CartResourceIdentifierImpl.java @@ -47,7 +47,7 @@ public CartResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedString.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedString.java new file mode 100644 index 00000000000..135a982be93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedString.java @@ -0,0 +1,126 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LocalizedString localizedString = LocalizedString.builder()
    + *             ./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LocalizedStringImpl.class) +public interface LocalizedString { + + /** + *

    String used for the specified language.

    + * @return map of the pattern property values + */ + @NotNull + @JsonAnyGetter + public Map values(); + + /** + *

    String used for the specified language.

    + * @param key property name + * @param value property value + */ + + @JsonAnySetter + public void setValue(String key, String value); + + /** + * factory method + * @return instance of LocalizedString + */ + public static LocalizedString of() { + return new LocalizedStringImpl(); + } + + /** + * factory method to create a shallow copy LocalizedString + * @param template instance to be copied + * @return copy instance + */ + public static LocalizedString of(final LocalizedString template) { + LocalizedStringImpl instance = new LocalizedStringImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + public LocalizedString copyDeep(); + + /** + * factory method to create a deep copy of LocalizedString + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LocalizedString deepCopy(@Nullable final LocalizedString template) { + if (template == null) { + return null; + } + LocalizedStringImpl instance = new LocalizedStringImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * builder factory method for LocalizedString + * @return builder + */ + public static LocalizedStringBuilder builder() { + return LocalizedStringBuilder.of(); + } + + /** + * create builder for LocalizedString instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LocalizedStringBuilder builder(final LocalizedString template) { + return LocalizedStringBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLocalizedString(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-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringBuilder.java new file mode 100644 index 00000000000..558670fab21 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringBuilder.java @@ -0,0 +1,96 @@ + +package com.commercetools.checkout.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * LocalizedStringBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LocalizedString localizedString = LocalizedString.builder()
    + *             ./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LocalizedStringBuilder implements Builder { + + private Map values = new HashMap<>(); + + /** + *

    String used for the specified language.

    + * @param values properties to be set + * @return Builder + */ + + public LocalizedStringBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

    String used for the specified language.

    + * @param key property name + * @param value property value + * @return Builder + */ + + public LocalizedStringBuilder addValue(final String key, final String value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

    String used for the specified language.

    + * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + * builds LocalizedString with checking for non-null required values + * @return LocalizedString + */ + public LocalizedString build() { + return new LocalizedStringImpl(values); + } + + /** + * builds LocalizedString without checking for non-null required values + * @return LocalizedString + */ + public LocalizedString buildUnchecked() { + return new LocalizedStringImpl(values); + } + + /** + * factory method for an instance of LocalizedStringBuilder + * @return builder + */ + public static LocalizedStringBuilder of() { + return new LocalizedStringBuilder(); + } + + /** + * create builder for LocalizedString instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LocalizedStringBuilder of(final LocalizedString template) { + LocalizedStringBuilder builder = new LocalizedStringBuilder(); + builder.values = template.values(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringImpl.java new file mode 100644 index 00000000000..0b709e8d98f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedStringImpl.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LocalizedStringImpl implements LocalizedString, ModelBase { + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + LocalizedStringImpl(@JsonAnySetter @JsonProperty("values") final Map values) { + this.values = values; + } + + /** + * create empty instance + */ + public LocalizedStringImpl() { + } + + /** + *

    String used for the specified language.

    + */ + + public Map values() { + return values; + } + + public void setValue(String key, String value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LocalizedStringImpl that = (LocalizedStringImpl) o; + + return new EqualsBuilder().append(values, that.values).append(values, that.values).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("values", values).build(); + } + + @Override + public LocalizedString copyDeep() { + return LocalizedString.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrl.java new file mode 100644 index 00000000000..45e699c30fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrl.java @@ -0,0 +1,126 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    A localized URL that provides different URL values for different locales.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LocalizedUrl localizedUrl = LocalizedUrl.builder()
    + *             ./^https?:\/\/[^\s/$.?#].[^\s]*$/("{/^https?:\/\/[^\s/$.?#].[^\s]*$/}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LocalizedUrlImpl.class) +public interface LocalizedUrl { + + /** + *

    URL for the specific locale.

    + * @return map of the pattern property values + */ + @NotNull + @JsonAnyGetter + public Map values(); + + /** + *

    URL for the specific locale.

    + * @param key property name + * @param value property value + */ + + @JsonAnySetter + public void setValue(String key, String value); + + /** + * factory method + * @return instance of LocalizedUrl + */ + public static LocalizedUrl of() { + return new LocalizedUrlImpl(); + } + + /** + * factory method to create a shallow copy LocalizedUrl + * @param template instance to be copied + * @return copy instance + */ + public static LocalizedUrl of(final LocalizedUrl template) { + LocalizedUrlImpl instance = new LocalizedUrlImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + public LocalizedUrl copyDeep(); + + /** + * factory method to create a deep copy of LocalizedUrl + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LocalizedUrl deepCopy(@Nullable final LocalizedUrl template) { + if (template == null) { + return null; + } + LocalizedUrlImpl instance = new LocalizedUrlImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * builder factory method for LocalizedUrl + * @return builder + */ + public static LocalizedUrlBuilder builder() { + return LocalizedUrlBuilder.of(); + } + + /** + * create builder for LocalizedUrl instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LocalizedUrlBuilder builder(final LocalizedUrl template) { + return LocalizedUrlBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLocalizedUrl(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-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlBuilder.java new file mode 100644 index 00000000000..3b1311336cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlBuilder.java @@ -0,0 +1,96 @@ + +package com.commercetools.checkout.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * LocalizedUrlBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LocalizedUrl localizedUrl = LocalizedUrl.builder()
    + *             ./^https?:\/\/[^\s/$.?#].[^\s]*$/("{/^https?:\/\/[^\s/$.?#].[^\s]*$/}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LocalizedUrlBuilder implements Builder { + + private Map values = new HashMap<>(); + + /** + *

    URL for the specific locale.

    + * @param values properties to be set + * @return Builder + */ + + public LocalizedUrlBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

    URL for the specific locale.

    + * @param key property name + * @param value property value + * @return Builder + */ + + public LocalizedUrlBuilder addValue(final String key, final String value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

    URL for the specific locale.

    + * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + * builds LocalizedUrl with checking for non-null required values + * @return LocalizedUrl + */ + public LocalizedUrl build() { + return new LocalizedUrlImpl(values); + } + + /** + * builds LocalizedUrl without checking for non-null required values + * @return LocalizedUrl + */ + public LocalizedUrl buildUnchecked() { + return new LocalizedUrlImpl(values); + } + + /** + * factory method for an instance of LocalizedUrlBuilder + * @return builder + */ + public static LocalizedUrlBuilder of() { + return new LocalizedUrlBuilder(); + } + + /** + * create builder for LocalizedUrl instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LocalizedUrlBuilder of(final LocalizedUrl template) { + LocalizedUrlBuilder builder = new LocalizedUrlBuilder(); + builder.values = template.values(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlImpl.java new file mode 100644 index 00000000000..5d1cfce5f93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/LocalizedUrlImpl.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    A localized URL that provides different URL values for different locales.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LocalizedUrlImpl implements LocalizedUrl, ModelBase { + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + LocalizedUrlImpl(@JsonAnySetter @JsonProperty("values") final Map values) { + this.values = values; + } + + /** + * create empty instance + */ + public LocalizedUrlImpl() { + } + + /** + *

    URL for the specific locale.

    + */ + + public Map values() { + return values; + } + + public void setValue(String key, String value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LocalizedUrlImpl that = (LocalizedUrlImpl) o; + + return new EqualsBuilder().append(values, that.values).append(values, that.values).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("values", values).build(); + } + + @Override + public LocalizedUrl copyDeep() { + return LocalizedUrl.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java index 2e9506a5203..1207f44a620 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/Reference.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

    A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

    + *

    A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ApplicationReference.

    * *
    * Example to create a subtype instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java index baf4c5e1994..585a589b102 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

    + *

    A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ApplicationReference.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ReferenceImpl implements Reference, ModelBase { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java index 1d8cc1e9979..50f0d6a8884 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ReferenceTypeId.java @@ -17,20 +17,23 @@ public interface ReferenceTypeId extends JsonEnum { /** -

    References a Cart.

    */ +

    References a Cart.

    */ ReferenceTypeId CART = ReferenceTypeIdEnum.CART; /** -

    References an Order.

    */ +

    References an Order.

    */ ReferenceTypeId ORDER = ReferenceTypeIdEnum.ORDER; /** -

    References a Payment.

    */ +

    References a Payment.

    */ ReferenceTypeId PAYMENT = ReferenceTypeIdEnum.PAYMENT; /** -

    References an Application.

    */ +

    References an Application.

    */ ReferenceTypeId APPLICATION = ReferenceTypeIdEnum.APPLICATION; /** -

    References a Payment Integration.

    */ +

    References a Payment Integration.

    */ ReferenceTypeId PAYMENT_INTEGRATION = ReferenceTypeIdEnum.PAYMENT_INTEGRATION; + /** +

    References a Connector Deployment.

    */ + ReferenceTypeId DEPLOYMENT = ReferenceTypeIdEnum.DEPLOYMENT; /** * possible values of ReferenceTypeId @@ -59,7 +62,12 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { /** * payment-integration */ - PAYMENT_INTEGRATION("payment-integration"); + PAYMENT_INTEGRATION("payment-integration"), + + /** + * deployment + */ + DEPLOYMENT("deployment"); private final String jsonName; private ReferenceTypeIdEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java index 63ba91da6e6..2a83b608783 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifier.java @@ -13,8 +13,8 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

    Draft type to create a Reference or a KeyReference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.

    - *

    Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.

    + *

    Draft type to create a Reference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns a Reference.

    + *

    Each resource type has its corresponding ResourceIdentifier, like PaymentResourceIdentifier.

    * *
    * Example to create a subtype instance using the builder pattern @@ -31,7 +31,7 @@ public interface ResourceIdentifier { /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    * @return typeId */ diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java index 460410923a9..fda20d4641b 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/common/ResourceIdentifierImpl.java @@ -17,8 +17,8 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Draft type to create a Reference or a KeyReference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns either a Reference or a KeyReference. For example, the field parent of a CategoryDraft takes a ResourceIdentifier for its value while the value of the corresponding field of a Category is a Reference.

    - *

    Each resource type has its corresponding ResourceIdentifier, like ChannelResourceIdentifier.

    + *

    Draft type to create a Reference to a resource. Provide either the id or (wherever supported) the key of the resource to reference, but depending on the API endpoint the response returns a Reference.

    + *

    Each resource type has its corresponding ResourceIdentifier, like PaymentResourceIdentifier.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ResourceIdentifierImpl implements ResourceIdentifier, ModelBase { @@ -48,7 +48,7 @@ public ResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationError.java new file mode 100644 index 00000000000..38f7bb890f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationError.java @@ -0,0 +1,192 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). The client application should resolve the conflict (with or without involving the end user) before retrying the request.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
    + *             .message("{message}")
    + *             .resourceId("{resourceId}")
    + *             .expectedVersion(0.3)
    + *             .currentVersion(0.3)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("ConcurrentModification") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ConcurrentModificationErrorImpl.class) +public interface ConcurrentModificationError extends ErrorObject { + + /** + * discriminator value for ConcurrentModificationError + */ + String CONCURRENT_MODIFICATION = "ConcurrentModification"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    The ID of the resource that has a version conflict.

    + * @return resourceId + */ + @NotNull + @JsonProperty("resourceId") + public String getResourceId(); + + /** + *

    Expected version of the resource.

    + * @return expectedVersion + */ + @NotNull + @JsonProperty("expectedVersion") + public Long getExpectedVersion(); + + /** + *

    Current version of the resource.

    + * @return currentVersion + */ + @NotNull + @JsonProperty("currentVersion") + public Long getCurrentVersion(); + + /** + *

    "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

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

    The ID of the resource that has a version conflict.

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

    Expected version of the resource.

    + * @param expectedVersion value to be set + */ + + public void setExpectedVersion(final Long expectedVersion); + + /** + *

    Current version of the resource.

    + * @param currentVersion value to be set + */ + + public void setCurrentVersion(final Long currentVersion); + + /** + * factory method + * @return instance of ConcurrentModificationError + */ + public static ConcurrentModificationError of() { + return new ConcurrentModificationErrorImpl(); + } + + /** + * factory method to create a shallow copy ConcurrentModificationError + * @param template instance to be copied + * @return copy instance + */ + public static ConcurrentModificationError of(final ConcurrentModificationError template) { + ConcurrentModificationErrorImpl instance = new ConcurrentModificationErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setResourceId(template.getResourceId()); + instance.setExpectedVersion(template.getExpectedVersion()); + instance.setCurrentVersion(template.getCurrentVersion()); + return instance; + } + + public ConcurrentModificationError copyDeep(); + + /** + * factory method to create a deep copy of ConcurrentModificationError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ConcurrentModificationError deepCopy(@Nullable final ConcurrentModificationError template) { + if (template == null) { + return null; + } + ConcurrentModificationErrorImpl instance = new ConcurrentModificationErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setResourceId(template.getResourceId()); + instance.setExpectedVersion(template.getExpectedVersion()); + instance.setCurrentVersion(template.getCurrentVersion()); + return instance; + } + + /** + * builder factory method for ConcurrentModificationError + * @return builder + */ + public static ConcurrentModificationErrorBuilder builder() { + return ConcurrentModificationErrorBuilder.of(); + } + + /** + * create builder for ConcurrentModificationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConcurrentModificationErrorBuilder builder(final ConcurrentModificationError template) { + return ConcurrentModificationErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withConcurrentModificationError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorBuilder.java new file mode 100644 index 00000000000..868c15ad260 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorBuilder.java @@ -0,0 +1,157 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ConcurrentModificationErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
    + *             .message("{message}")
    + *             .resourceId("{resourceId}")
    + *             .expectedVersion(0.3)
    + *             .currentVersion(0.3)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConcurrentModificationErrorBuilder implements Builder { + + private String message; + + private String resourceId; + + private Long expectedVersion; + + private Long currentVersion; + + /** + *

    "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

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

    The ID of the resource that has a version conflict.

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

    Expected version of the resource.

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

    Current version of the resource.

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

    "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

    The ID of the resource that has a version conflict.

    + * @return resourceId + */ + + public String getResourceId() { + return this.resourceId; + } + + /** + *

    Expected version of the resource.

    + * @return expectedVersion + */ + + public Long getExpectedVersion() { + return this.expectedVersion; + } + + /** + *

    Current version of the resource.

    + * @return currentVersion + */ + + public Long getCurrentVersion() { + return this.currentVersion; + } + + /** + * builds ConcurrentModificationError with checking for non-null required values + * @return ConcurrentModificationError + */ + public ConcurrentModificationError build() { + Objects.requireNonNull(message, ConcurrentModificationError.class + ": message is missing"); + Objects.requireNonNull(resourceId, ConcurrentModificationError.class + ": resourceId is missing"); + Objects.requireNonNull(expectedVersion, ConcurrentModificationError.class + ": expectedVersion is missing"); + Objects.requireNonNull(currentVersion, ConcurrentModificationError.class + ": currentVersion is missing"); + return new ConcurrentModificationErrorImpl(message, resourceId, expectedVersion, currentVersion); + } + + /** + * builds ConcurrentModificationError without checking for non-null required values + * @return ConcurrentModificationError + */ + public ConcurrentModificationError buildUnchecked() { + return new ConcurrentModificationErrorImpl(message, resourceId, expectedVersion, currentVersion); + } + + /** + * factory method for an instance of ConcurrentModificationErrorBuilder + * @return builder + */ + public static ConcurrentModificationErrorBuilder of() { + return new ConcurrentModificationErrorBuilder(); + } + + /** + * create builder for ConcurrentModificationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConcurrentModificationErrorBuilder of(final ConcurrentModificationError template) { + ConcurrentModificationErrorBuilder builder = new ConcurrentModificationErrorBuilder(); + builder.message = template.getMessage(); + builder.resourceId = template.getResourceId(); + builder.expectedVersion = template.getExpectedVersion(); + builder.currentVersion = template.getCurrentVersion(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorImpl.java new file mode 100644 index 00000000000..fb25f8d1531 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorImpl.java @@ -0,0 +1,160 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). The client application should resolve the conflict (with or without involving the end user) before retrying the request.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConcurrentModificationErrorImpl implements ConcurrentModificationError, ModelBase { + + private String code; + + private String message; + + private String resourceId; + + private Long expectedVersion; + + private Long currentVersion; + + /** + * create instance with all properties + */ + @JsonCreator + ConcurrentModificationErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("resourceId") final String resourceId, + @JsonProperty("expectedVersion") final Long expectedVersion, + @JsonProperty("currentVersion") final Long currentVersion) { + this.message = message; + this.resourceId = resourceId; + this.expectedVersion = expectedVersion; + this.currentVersion = currentVersion; + this.code = CONCURRENT_MODIFICATION; + } + + /** + * create empty instance + */ + public ConcurrentModificationErrorImpl() { + this.code = CONCURRENT_MODIFICATION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

    + */ + + public String getMessage() { + return this.message; + } + + /** + *

    The ID of the resource that has a version conflict.

    + */ + + public String getResourceId() { + return this.resourceId; + } + + /** + *

    Expected version of the resource.

    + */ + + public Long getExpectedVersion() { + return this.expectedVersion; + } + + /** + *

    Current version of the resource.

    + */ + + public Long getCurrentVersion() { + return this.currentVersion; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setResourceId(final String resourceId) { + this.resourceId = resourceId; + } + + public void setExpectedVersion(final Long expectedVersion) { + this.expectedVersion = expectedVersion; + } + + public void setCurrentVersion(final Long currentVersion) { + this.currentVersion = currentVersion; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ConcurrentModificationErrorImpl that = (ConcurrentModificationErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(resourceId, that.resourceId) + .append(expectedVersion, that.expectedVersion) + .append(currentVersion, that.currentVersion) + .append(code, that.code) + .append(message, that.message) + .append(resourceId, that.resourceId) + .append(expectedVersion, that.expectedVersion) + .append(currentVersion, that.currentVersion) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(resourceId) + .append(expectedVersion) + .append(currentVersion) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("resourceId", resourceId) + .append("expectedVersion", expectedVersion) + .append("currentVersion", currentVersion) + .build(); + } + + @Override + public ConcurrentModificationError copyDeep() { + return ConcurrentModificationError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceError.java new file mode 100644 index 00000000000..58cf99c8b16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceError.java @@ -0,0 +1,142 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when a field value conflicts with an existing value stored in a particular resource causing a duplicate.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DuplicateFieldWithConflictingResourceError duplicateFieldWithConflictingResourceError = DuplicateFieldWithConflictingResourceError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("DuplicateFieldWithConflictingResource") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DuplicateFieldWithConflictingResourceErrorImpl.class) +public interface DuplicateFieldWithConflictingResourceError extends ErrorObject { + + /** + * discriminator value for DuplicateFieldWithConflictingResourceError + */ + String DUPLICATE_FIELD_WITH_CONFLICTING_RESOURCE = "DuplicateFieldWithConflictingResource"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "A duplicate value $duplicateValue exists for field $field in request."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    "A duplicate value $duplicateValue exists for field $field in request."

    + * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of DuplicateFieldWithConflictingResourceError + */ + public static DuplicateFieldWithConflictingResourceError of() { + return new DuplicateFieldWithConflictingResourceErrorImpl(); + } + + /** + * factory method to create a shallow copy DuplicateFieldWithConflictingResourceError + * @param template instance to be copied + * @return copy instance + */ + public static DuplicateFieldWithConflictingResourceError of( + final DuplicateFieldWithConflictingResourceError template) { + DuplicateFieldWithConflictingResourceErrorImpl instance = new DuplicateFieldWithConflictingResourceErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public DuplicateFieldWithConflictingResourceError copyDeep(); + + /** + * factory method to create a deep copy of DuplicateFieldWithConflictingResourceError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DuplicateFieldWithConflictingResourceError deepCopy( + @Nullable final DuplicateFieldWithConflictingResourceError template) { + if (template == null) { + return null; + } + DuplicateFieldWithConflictingResourceErrorImpl instance = new DuplicateFieldWithConflictingResourceErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for DuplicateFieldWithConflictingResourceError + * @return builder + */ + public static DuplicateFieldWithConflictingResourceErrorBuilder builder() { + return DuplicateFieldWithConflictingResourceErrorBuilder.of(); + } + + /** + * create builder for DuplicateFieldWithConflictingResourceError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DuplicateFieldWithConflictingResourceErrorBuilder builder( + final DuplicateFieldWithConflictingResourceError template) { + return DuplicateFieldWithConflictingResourceErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDuplicateFieldWithConflictingResourceError( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorBuilder.java new file mode 100644 index 00000000000..8a88c026146 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DuplicateFieldWithConflictingResourceErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DuplicateFieldWithConflictingResourceError duplicateFieldWithConflictingResourceError = DuplicateFieldWithConflictingResourceError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DuplicateFieldWithConflictingResourceErrorBuilder + implements Builder { + + private String message; + + /** + *

    "A duplicate value $duplicateValue exists for field $field in request."

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

    "A duplicate value $duplicateValue exists for field $field in request."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds DuplicateFieldWithConflictingResourceError with checking for non-null required values + * @return DuplicateFieldWithConflictingResourceError + */ + public DuplicateFieldWithConflictingResourceError build() { + Objects.requireNonNull(message, DuplicateFieldWithConflictingResourceError.class + ": message is missing"); + return new DuplicateFieldWithConflictingResourceErrorImpl(message); + } + + /** + * builds DuplicateFieldWithConflictingResourceError without checking for non-null required values + * @return DuplicateFieldWithConflictingResourceError + */ + public DuplicateFieldWithConflictingResourceError buildUnchecked() { + return new DuplicateFieldWithConflictingResourceErrorImpl(message); + } + + /** + * factory method for an instance of DuplicateFieldWithConflictingResourceErrorBuilder + * @return builder + */ + public static DuplicateFieldWithConflictingResourceErrorBuilder of() { + return new DuplicateFieldWithConflictingResourceErrorBuilder(); + } + + /** + * create builder for DuplicateFieldWithConflictingResourceError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DuplicateFieldWithConflictingResourceErrorBuilder of( + final DuplicateFieldWithConflictingResourceError template) { + DuplicateFieldWithConflictingResourceErrorBuilder builder = new DuplicateFieldWithConflictingResourceErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorImpl.java new file mode 100644 index 00000000000..c6b10277459 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when a field value conflicts with an existing value stored in a particular resource causing a duplicate.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DuplicateFieldWithConflictingResourceErrorImpl + implements DuplicateFieldWithConflictingResourceError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + DuplicateFieldWithConflictingResourceErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = DUPLICATE_FIELD_WITH_CONFLICTING_RESOURCE; + } + + /** + * create empty instance + */ + public DuplicateFieldWithConflictingResourceErrorImpl() { + this.code = DUPLICATE_FIELD_WITH_CONFLICTING_RESOURCE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "A duplicate value $duplicateValue exists for field $field in request."

    + */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DuplicateFieldWithConflictingResourceErrorImpl that = (DuplicateFieldWithConflictingResourceErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public DuplicateFieldWithConflictingResourceError copyDeep() { + return DuplicateFieldWithConflictingResourceError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java index c7bde8ae59f..87bfcf0a8eb 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObject.java @@ -21,8 +21,11 @@ * Example to create a subtype instance using the builder pattern *
    *
    
    - *     ErrorObject errorObject = ErrorObject.connectorFailedBuilder()
    + *     ErrorObject errorObject = ErrorObject.concurrentModificationBuilder()
      *             message("{message}")
    + *             resourceId("{resourceId}")
    + *             expectedVersion(0.3)
    + *             currentVersion(0.3)
      *             .build()
      * 
    *
    @@ -76,6 +79,14 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) { return instance; } + /** + * builder for concurrentModification subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.ConcurrentModificationErrorBuilder concurrentModificationBuilder() { + return com.commercetools.checkout.models.error.ConcurrentModificationErrorBuilder.of(); + } + /** * builder for connectorFailed subtype * @return builder @@ -84,6 +95,14 @@ public static com.commercetools.checkout.models.error.ConnectorFailedErrorBuilde return com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder.of(); } + /** + * builder for duplicateFieldWithConflictingResource subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.DuplicateFieldWithConflictingResourceErrorBuilder duplicateFieldWithConflictingResourceBuilder() { + return com.commercetools.checkout.models.error.DuplicateFieldWithConflictingResourceErrorBuilder.of(); + } + /** * builder for general subtype * @return builder @@ -92,6 +111,14 @@ public static com.commercetools.checkout.models.error.GeneralErrorBuilder genera return com.commercetools.checkout.models.error.GeneralErrorBuilder.of(); } + /** + * builder for invalidField subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.InvalidFieldErrorBuilder invalidFieldBuilder() { + return com.commercetools.checkout.models.error.InvalidFieldErrorBuilder.of(); + } + /** * builder for invalidInput subtype * @return builder @@ -108,6 +135,30 @@ public static com.commercetools.checkout.models.error.InvalidJsonInputErrorBuild return com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder.of(); } + /** + * builder for invalidOperation subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.InvalidOperationErrorBuilder invalidOperationBuilder() { + return com.commercetools.checkout.models.error.InvalidOperationErrorBuilder.of(); + } + + /** + * builder for maxResourceLimitExceeded subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.MaxResourceLimitExceededErrorBuilder maxResourceLimitExceededBuilder() { + return com.commercetools.checkout.models.error.MaxResourceLimitExceededErrorBuilder.of(); + } + + /** + * builder for missingProjectKey subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.MissingProjectKeyErrorBuilder missingProjectKeyBuilder() { + return com.commercetools.checkout.models.error.MissingProjectKeyErrorBuilder.of(); + } + /** * builder for multipleActionsNotAllowed subtype * @return builder @@ -124,6 +175,14 @@ public static com.commercetools.checkout.models.error.PaymentFailureErrorBuilder return com.commercetools.checkout.models.error.PaymentFailureErrorBuilder.of(); } + /** + * builder for referencedResourceNotFound subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.ReferencedResourceNotFoundErrorBuilder referencedResourceNotFoundBuilder() { + return com.commercetools.checkout.models.error.ReferencedResourceNotFoundErrorBuilder.of(); + } + /** * builder for requiredField subtype * @return builder @@ -140,6 +199,22 @@ public static com.commercetools.checkout.models.error.ResourceNotFoundErrorBuild return com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder.of(); } + /** + * builder for serviceUnavailable subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.ServiceUnavailableErrorBuilder serviceUnavailableBuilder() { + return com.commercetools.checkout.models.error.ServiceUnavailableErrorBuilder.of(); + } + + /** + * builder for syntaxError subtype + * @return builder + */ + public static com.commercetools.checkout.models.error.SyntaxErrorErrorBuilder syntaxErrorBuilder() { + return com.commercetools.checkout.models.error.SyntaxErrorErrorBuilder.of(); + } + /** * accessor map function * @param mapped type diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java index 9e8e13e6562..ba70550effb 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorObjectBuilder.java @@ -11,14 +11,26 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ErrorObjectBuilder { + public com.commercetools.checkout.models.error.ConcurrentModificationErrorBuilder concurrentModificationBuilder() { + return com.commercetools.checkout.models.error.ConcurrentModificationErrorBuilder.of(); + } + public com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder connectorFailedBuilder() { return com.commercetools.checkout.models.error.ConnectorFailedErrorBuilder.of(); } + public com.commercetools.checkout.models.error.DuplicateFieldWithConflictingResourceErrorBuilder duplicateFieldWithConflictingResourceBuilder() { + return com.commercetools.checkout.models.error.DuplicateFieldWithConflictingResourceErrorBuilder.of(); + } + public com.commercetools.checkout.models.error.GeneralErrorBuilder generalBuilder() { return com.commercetools.checkout.models.error.GeneralErrorBuilder.of(); } + public com.commercetools.checkout.models.error.InvalidFieldErrorBuilder invalidFieldBuilder() { + return com.commercetools.checkout.models.error.InvalidFieldErrorBuilder.of(); + } + public com.commercetools.checkout.models.error.InvalidInputErrorBuilder invalidInputBuilder() { return com.commercetools.checkout.models.error.InvalidInputErrorBuilder.of(); } @@ -27,6 +39,18 @@ public com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder inva return com.commercetools.checkout.models.error.InvalidJsonInputErrorBuilder.of(); } + public com.commercetools.checkout.models.error.InvalidOperationErrorBuilder invalidOperationBuilder() { + return com.commercetools.checkout.models.error.InvalidOperationErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.MaxResourceLimitExceededErrorBuilder maxResourceLimitExceededBuilder() { + return com.commercetools.checkout.models.error.MaxResourceLimitExceededErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.MissingProjectKeyErrorBuilder missingProjectKeyBuilder() { + return com.commercetools.checkout.models.error.MissingProjectKeyErrorBuilder.of(); + } + public com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder multipleActionsNotAllowedBuilder() { return com.commercetools.checkout.models.error.MultipleActionsNotAllowedErrorBuilder.of(); } @@ -35,6 +59,10 @@ public com.commercetools.checkout.models.error.PaymentFailureErrorBuilder paymen return com.commercetools.checkout.models.error.PaymentFailureErrorBuilder.of(); } + public com.commercetools.checkout.models.error.ReferencedResourceNotFoundErrorBuilder referencedResourceNotFoundBuilder() { + return com.commercetools.checkout.models.error.ReferencedResourceNotFoundErrorBuilder.of(); + } + public com.commercetools.checkout.models.error.RequiredFieldErrorBuilder requiredFieldBuilder() { return com.commercetools.checkout.models.error.RequiredFieldErrorBuilder.of(); } @@ -43,6 +71,14 @@ public com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder reso return com.commercetools.checkout.models.error.ResourceNotFoundErrorBuilder.of(); } + public com.commercetools.checkout.models.error.ServiceUnavailableErrorBuilder serviceUnavailableBuilder() { + return com.commercetools.checkout.models.error.ServiceUnavailableErrorBuilder.of(); + } + + public com.commercetools.checkout.models.error.SyntaxErrorErrorBuilder syntaxErrorBuilder() { + return com.commercetools.checkout.models.error.SyntaxErrorErrorBuilder.of(); + } + /** * factory method for an instance of ErrorObjectBuilder * @return builder diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponse.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponse.java new file mode 100644 index 00000000000..4daab933a73 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponse.java @@ -0,0 +1,176 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    Base representation of an error response containing common fields to all errors.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ErrorResponse errorResponse = ErrorResponse.builder()
    + *             .statusCode(1)
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ErrorResponseImpl.class) +public interface ErrorResponse { + + /** + *

    HTTP status code corresponding to the error.

    + * @return statusCode + */ + @NotNull + @JsonProperty("statusCode") + public Integer getStatusCode(); + + /** + *

    First error message in the errors array.

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @return errors + */ + @Valid + @JsonProperty("errors") + public List getErrors(); + + /** + *

    HTTP status code corresponding to the error.

    + * @param statusCode value to be set + */ + + public void setStatusCode(final Integer statusCode); + + /** + *

    First error message in the errors array.

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

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param errors values to be set + */ + + @JsonIgnore + public void setErrors(final ErrorObject... errors); + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param errors values to be set + */ + + public void setErrors(final List errors); + + /** + * factory method + * @return instance of ErrorResponse + */ + public static ErrorResponse of() { + return new ErrorResponseImpl(); + } + + /** + * factory method to create a shallow copy ErrorResponse + * @param template instance to be copied + * @return copy instance + */ + public static ErrorResponse of(final ErrorResponse template) { + ErrorResponseImpl instance = new ErrorResponseImpl(); + instance.setStatusCode(template.getStatusCode()); + instance.setMessage(template.getMessage()); + instance.setErrors(template.getErrors()); + return instance; + } + + public ErrorResponse copyDeep(); + + /** + * factory method to create a deep copy of ErrorResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ErrorResponse deepCopy(@Nullable final ErrorResponse template) { + if (template == null) { + return null; + } + ErrorResponseImpl instance = new ErrorResponseImpl(); + instance.setStatusCode(template.getStatusCode()); + instance.setMessage(template.getMessage()); + instance.setErrors(Optional.ofNullable(template.getErrors()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.error.ErrorObject::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ErrorResponse + * @return builder + */ + public static ErrorResponseBuilder builder() { + return ErrorResponseBuilder.of(); + } + + /** + * create builder for ErrorResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ErrorResponseBuilder builder(final ErrorResponse template) { + return ErrorResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withErrorResponse(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseBuilder.java new file mode 100644 index 00000000000..7a6c24c85e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseBuilder.java @@ -0,0 +1,196 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ErrorResponseBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ErrorResponse errorResponse = ErrorResponse.builder()
    + *             .statusCode(1)
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorResponseBuilder implements Builder { + + private Integer statusCode; + + private String message; + + @Nullable + private java.util.List errors; + + /** + *

    HTTP status code corresponding to the error.

    + * @param statusCode value to be set + * @return Builder + */ + + public ErrorResponseBuilder statusCode(final Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + *

    First error message in the errors array.

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

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param errors value to be set + * @return Builder + */ + + public ErrorResponseBuilder errors(@Nullable final com.commercetools.checkout.models.error.ErrorObject... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + return this; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param errors value to be set + * @return Builder + */ + + public ErrorResponseBuilder errors( + @Nullable final java.util.List errors) { + this.errors = errors; + return this; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param errors value to be set + * @return Builder + */ + + public ErrorResponseBuilder plusErrors( + @Nullable final com.commercetools.checkout.models.error.ErrorObject... errors) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.addAll(Arrays.asList(errors)); + return this; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param builder function to build the errors value + * @return Builder + */ + + public ErrorResponseBuilder plusErrors( + Function> builder) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(builder.apply(com.commercetools.checkout.models.error.ErrorObjectBuilder.of()).build()); + return this; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @param builder function to build the errors value + * @return Builder + */ + + public ErrorResponseBuilder withErrors( + Function> builder) { + this.errors = new ArrayList<>(); + this.errors.add(builder.apply(com.commercetools.checkout.models.error.ErrorObjectBuilder.of()).build()); + return this; + } + + /** + *

    HTTP status code corresponding to the error.

    + * @return statusCode + */ + + public Integer getStatusCode() { + return this.statusCode; + } + + /** + *

    First error message in the errors array.

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + * @return errors + */ + + @Nullable + public java.util.List getErrors() { + return this.errors; + } + + /** + * builds ErrorResponse with checking for non-null required values + * @return ErrorResponse + */ + public ErrorResponse build() { + Objects.requireNonNull(statusCode, ErrorResponse.class + ": statusCode is missing"); + Objects.requireNonNull(message, ErrorResponse.class + ": message is missing"); + return new ErrorResponseImpl(statusCode, message, errors); + } + + /** + * builds ErrorResponse without checking for non-null required values + * @return ErrorResponse + */ + public ErrorResponse buildUnchecked() { + return new ErrorResponseImpl(statusCode, message, errors); + } + + /** + * factory method for an instance of ErrorResponseBuilder + * @return builder + */ + public static ErrorResponseBuilder of() { + return new ErrorResponseBuilder(); + } + + /** + * create builder for ErrorResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ErrorResponseBuilder of(final ErrorResponse template) { + ErrorResponseBuilder builder = new ErrorResponseBuilder(); + builder.statusCode = template.getStatusCode(); + builder.message = template.getMessage(); + builder.errors = template.getErrors(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseImpl.java new file mode 100644 index 00000000000..6c017344c4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ErrorResponseImpl.java @@ -0,0 +1,126 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Base representation of an error response containing common fields to all errors.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ErrorResponseImpl implements ErrorResponse, ModelBase { + + private Integer statusCode; + + private String message; + + private java.util.List errors; + + /** + * create instance with all properties + */ + @JsonCreator + ErrorResponseImpl(@JsonProperty("statusCode") final Integer statusCode, + @JsonProperty("message") final String message, + @JsonProperty("errors") final java.util.List errors) { + this.statusCode = statusCode; + this.message = message; + this.errors = errors; + } + + /** + * create empty instance + */ + public ErrorResponseImpl() { + } + + /** + *

    HTTP status code corresponding to the error.

    + */ + + public Integer getStatusCode() { + return this.statusCode; + } + + /** + *

    First error message in the errors array.

    + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Errors returned for a request.

    + *

    A single error response can contain multiple errors if the errors are related to the same HTTP status code such as 400.

    + */ + + public java.util.List getErrors() { + return this.errors; + } + + public void setStatusCode(final Integer statusCode) { + this.statusCode = statusCode; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setErrors(final com.commercetools.checkout.models.error.ErrorObject... errors) { + this.errors = new ArrayList<>(Arrays.asList(errors)); + } + + public void setErrors(final java.util.List errors) { + this.errors = errors; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ErrorResponseImpl that = (ErrorResponseImpl) o; + + return new EqualsBuilder().append(statusCode, that.statusCode) + .append(message, that.message) + .append(errors, that.errors) + .append(statusCode, that.statusCode) + .append(message, that.message) + .append(errors, that.errors) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(statusCode).append(message).append(errors).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("statusCode", statusCode) + .append("message", message) + .append("errors", errors) + .build(); + } + + @Override + public ErrorResponse copyDeep() { + return ErrorResponse.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldError.java new file mode 100644 index 00000000000..a62598f0b6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldError.java @@ -0,0 +1,198 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when a field has an invalid value.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     InvalidFieldError invalidFieldError = InvalidFieldError.builder()
    + *             .message("{message}")
    + *             .field("{field}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("InvalidField") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidFieldErrorImpl.class) +public interface InvalidFieldError extends ErrorObject { + + /** + * discriminator value for InvalidFieldError + */ + String INVALID_FIELD = "InvalidField"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "The value $invalidValue is not valid for field $field."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    Name of the field with the invalid value.

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

    Value invalid for the field.

    + * @return invalidValue + */ + @NotNull + @JsonProperty("invalidValue") + public Object getInvalidValue(); + + /** + *

    Fixed set of allowed values for the field, if any.

    + * @return allowedValues + */ + + @JsonProperty("allowedValues") + public List getAllowedValues(); + + /** + *

    "The value $invalidValue is not valid for field $field."

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

    Name of the field with the invalid value.

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

    Value invalid for the field.

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

    Fixed set of allowed values for the field, if any.

    + * @param allowedValues values to be set + */ + + @JsonIgnore + public void setAllowedValues(final String... allowedValues); + + /** + *

    Fixed set of allowed values for the field, if any.

    + * @param allowedValues values to be set + */ + + public void setAllowedValues(final List allowedValues); + + /** + * factory method + * @return instance of InvalidFieldError + */ + public static InvalidFieldError of() { + return new InvalidFieldErrorImpl(); + } + + /** + * factory method to create a shallow copy InvalidFieldError + * @param template instance to be copied + * @return copy instance + */ + public static InvalidFieldError of(final InvalidFieldError template) { + InvalidFieldErrorImpl instance = new InvalidFieldErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setField(template.getField()); + instance.setInvalidValue(template.getInvalidValue()); + instance.setAllowedValues(template.getAllowedValues()); + return instance; + } + + public InvalidFieldError copyDeep(); + + /** + * factory method to create a deep copy of InvalidFieldError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidFieldError deepCopy(@Nullable final InvalidFieldError template) { + if (template == null) { + return null; + } + InvalidFieldErrorImpl instance = new InvalidFieldErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setField(template.getField()); + instance.setInvalidValue(template.getInvalidValue()); + instance.setAllowedValues(Optional.ofNullable(template.getAllowedValues()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for InvalidFieldError + * @return builder + */ + public static InvalidFieldErrorBuilder builder() { + return InvalidFieldErrorBuilder.of(); + } + + /** + * create builder for InvalidFieldError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidFieldErrorBuilder builder(final InvalidFieldError template) { + return InvalidFieldErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidFieldError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorBuilder.java new file mode 100644 index 00000000000..857dd23b59e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorBuilder.java @@ -0,0 +1,183 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidFieldErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     InvalidFieldError invalidFieldError = InvalidFieldError.builder()
    + *             .message("{message}")
    + *             .field("{field}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidFieldErrorBuilder implements Builder { + + private String message; + + private String field; + + private java.lang.Object invalidValue; + + @Nullable + private java.util.List allowedValues; + + /** + *

    "The value $invalidValue is not valid for field $field."

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

    Name of the field with the invalid value.

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

    Value invalid for the field.

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

    Fixed set of allowed values for the field, if any.

    + * @param allowedValues value to be set + * @return Builder + */ + + public InvalidFieldErrorBuilder allowedValues(@Nullable final String... allowedValues) { + this.allowedValues = new ArrayList<>(Arrays.asList(allowedValues)); + return this; + } + + /** + *

    Fixed set of allowed values for the field, if any.

    + * @param allowedValues value to be set + * @return Builder + */ + + public InvalidFieldErrorBuilder allowedValues(@Nullable final java.util.List allowedValues) { + this.allowedValues = allowedValues; + return this; + } + + /** + *

    Fixed set of allowed values for the field, if any.

    + * @param allowedValues value to be set + * @return Builder + */ + + public InvalidFieldErrorBuilder plusAllowedValues(@Nullable final String... allowedValues) { + if (this.allowedValues == null) { + this.allowedValues = new ArrayList<>(); + } + this.allowedValues.addAll(Arrays.asList(allowedValues)); + return this; + } + + /** + *

    "The value $invalidValue is not valid for field $field."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Name of the field with the invalid value.

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

    Value invalid for the field.

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

    Fixed set of allowed values for the field, if any.

    + * @return allowedValues + */ + + @Nullable + public java.util.List getAllowedValues() { + return this.allowedValues; + } + + /** + * builds InvalidFieldError with checking for non-null required values + * @return InvalidFieldError + */ + public InvalidFieldError build() { + Objects.requireNonNull(message, InvalidFieldError.class + ": message is missing"); + Objects.requireNonNull(field, InvalidFieldError.class + ": field is missing"); + Objects.requireNonNull(invalidValue, InvalidFieldError.class + ": invalidValue is missing"); + return new InvalidFieldErrorImpl(message, field, invalidValue, allowedValues); + } + + /** + * builds InvalidFieldError without checking for non-null required values + * @return InvalidFieldError + */ + public InvalidFieldError buildUnchecked() { + return new InvalidFieldErrorImpl(message, field, invalidValue, allowedValues); + } + + /** + * factory method for an instance of InvalidFieldErrorBuilder + * @return builder + */ + public static InvalidFieldErrorBuilder of() { + return new InvalidFieldErrorBuilder(); + } + + /** + * create builder for InvalidFieldError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidFieldErrorBuilder of(final InvalidFieldError template) { + InvalidFieldErrorBuilder builder = new InvalidFieldErrorBuilder(); + builder.message = template.getMessage(); + builder.field = template.getField(); + builder.invalidValue = template.getInvalidValue(); + builder.allowedValues = template.getAllowedValues(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorImpl.java new file mode 100644 index 00000000000..bdcd4ee8e8d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorImpl.java @@ -0,0 +1,163 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when a field has an invalid value.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidFieldErrorImpl implements InvalidFieldError, ModelBase { + + private String code; + + private String message; + + private String field; + + private java.lang.Object invalidValue; + + private java.util.List allowedValues; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidFieldErrorImpl(@JsonProperty("message") final String message, @JsonProperty("field") final String field, + @JsonProperty("invalidValue") final java.lang.Object invalidValue, + @JsonProperty("allowedValues") final java.util.List allowedValues) { + this.message = message; + this.field = field; + this.invalidValue = invalidValue; + this.allowedValues = allowedValues; + this.code = INVALID_FIELD; + } + + /** + * create empty instance + */ + public InvalidFieldErrorImpl() { + this.code = INVALID_FIELD; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "The value $invalidValue is not valid for field $field."

    + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Name of the field with the invalid value.

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

    Value invalid for the field.

    + */ + + public java.lang.Object getInvalidValue() { + return this.invalidValue; + } + + /** + *

    Fixed set of allowed values for the field, if any.

    + */ + + public java.util.List getAllowedValues() { + return this.allowedValues; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setField(final String field) { + this.field = field; + } + + public void setInvalidValue(final java.lang.Object invalidValue) { + this.invalidValue = invalidValue; + } + + public void setAllowedValues(final String... allowedValues) { + this.allowedValues = new ArrayList<>(Arrays.asList(allowedValues)); + } + + public void setAllowedValues(final java.util.List allowedValues) { + this.allowedValues = allowedValues; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidFieldErrorImpl that = (InvalidFieldErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(field, that.field) + .append(invalidValue, that.invalidValue) + .append(allowedValues, that.allowedValues) + .append(code, that.code) + .append(message, that.message) + .append(field, that.field) + .append(invalidValue, that.invalidValue) + .append(allowedValues, that.allowedValues) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(field) + .append(invalidValue) + .append(allowedValues) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("field", field) + .append("invalidValue", invalidValue) + .append("allowedValues", allowedValues) + .build(); + } + + @Override + public InvalidFieldError copyDeep() { + return InvalidFieldError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java index 886fec4d9b9..d79bcf042d2 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputError.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

    Returned when input is not valid.

    + *

    Returned when an invalid input has been sent.

    * *
    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java index 3ade5968d9a..56b2b828e5c 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidInputErrorImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Returned when input is not valid.

    + *

    Returned when an invalid input has been sent.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class InvalidInputErrorImpl implements InvalidInputError, ModelBase { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java index ccf0e6f7a56..e6f3432369f 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputError.java @@ -24,7 +24,6 @@ *
    
      *     InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
      *             .message("{message}")
    - *             .detailedErrorMessage("{detailedErrorMessage}")
      *             .build()
      * 
    * @@ -59,7 +58,7 @@ public interface InvalidJsonInputError extends ErrorObject { *

    Further explanation about why the JSON is invalid.

    * @return detailedErrorMessage */ - @NotNull + @JsonProperty("detailedErrorMessage") public String getDetailedErrorMessage(); diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java index 42452cfd00a..8c8ce7ce8ee 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidJsonInputErrorBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,7 +16,6 @@ *
    
      *     InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
      *             .message("{message}")
    - *             .detailedErrorMessage("{detailedErrorMessage}")
      *             .build()
      * 
    * @@ -24,6 +25,7 @@ public class InvalidJsonInputErrorBuilder implements BuilderReturned when the resources involved in the request are not in a valid state for the operation.

    + *

    The client application should validate the constraints described in the error message before sending the request.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     InvalidOperationError invalidOperationError = InvalidOperationError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("InvalidOperation") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidOperationErrorImpl.class) +public interface InvalidOperationError extends ErrorObject { + + /** + * discriminator value for InvalidOperationError + */ + String INVALID_OPERATION = "InvalidOperation"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    Description of the error.

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    Description of the error.

    + * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of InvalidOperationError + */ + public static InvalidOperationError of() { + return new InvalidOperationErrorImpl(); + } + + /** + * factory method to create a shallow copy InvalidOperationError + * @param template instance to be copied + * @return copy instance + */ + public static InvalidOperationError of(final InvalidOperationError template) { + InvalidOperationErrorImpl instance = new InvalidOperationErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public InvalidOperationError copyDeep(); + + /** + * factory method to create a deep copy of InvalidOperationError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidOperationError deepCopy(@Nullable final InvalidOperationError template) { + if (template == null) { + return null; + } + InvalidOperationErrorImpl instance = new InvalidOperationErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for InvalidOperationError + * @return builder + */ + public static InvalidOperationErrorBuilder builder() { + return InvalidOperationErrorBuilder.of(); + } + + /** + * create builder for InvalidOperationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidOperationErrorBuilder builder(final InvalidOperationError template) { + return InvalidOperationErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidOperationError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorBuilder.java new file mode 100644 index 00000000000..8ee93568113 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidOperationErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     InvalidOperationError invalidOperationError = InvalidOperationError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidOperationErrorBuilder implements Builder { + + private String message; + + /** + *

    Description of the error.

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

    Description of the error.

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds InvalidOperationError with checking for non-null required values + * @return InvalidOperationError + */ + public InvalidOperationError build() { + Objects.requireNonNull(message, InvalidOperationError.class + ": message is missing"); + return new InvalidOperationErrorImpl(message); + } + + /** + * builds InvalidOperationError without checking for non-null required values + * @return InvalidOperationError + */ + public InvalidOperationError buildUnchecked() { + return new InvalidOperationErrorImpl(message); + } + + /** + * factory method for an instance of InvalidOperationErrorBuilder + * @return builder + */ + public static InvalidOperationErrorBuilder of() { + return new InvalidOperationErrorBuilder(); + } + + /** + * create builder for InvalidOperationError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidOperationErrorBuilder of(final InvalidOperationError template) { + InvalidOperationErrorBuilder builder = new InvalidOperationErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorImpl.java new file mode 100644 index 00000000000..d7103e85faa --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when the resources involved in the request are not in a valid state for the operation.

    + *

    The client application should validate the constraints described in the error message before sending the request.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidOperationErrorImpl implements InvalidOperationError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + InvalidOperationErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = INVALID_OPERATION; + } + + /** + * create empty instance + */ + public InvalidOperationErrorImpl() { + this.code = INVALID_OPERATION; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    Description of the error.

    + */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidOperationErrorImpl that = (InvalidOperationErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public InvalidOperationError copyDeep() { + return InvalidOperationError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededError.java new file mode 100644 index 00000000000..7f428852a42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededError.java @@ -0,0 +1,175 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when a resource type cannot be created as it has reached its limits.

    + *

    The limits must be adjusted for this resource before sending the request again.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     MaxResourceLimitExceededError maxResourceLimitExceededError = MaxResourceLimitExceededError.builder()
    + *             .message("{message}")
    + *             .limit(0.3)
    + *             .resourceTypeId("{resourceTypeId}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("MaxResourceLimitExceeded") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MaxResourceLimitExceededErrorImpl.class) +public interface MaxResourceLimitExceededError extends ErrorObject { + + /** + * discriminator value for MaxResourceLimitExceededError + */ + String MAX_RESOURCE_LIMIT_EXCEEDED = "MaxResourceLimitExceeded"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "You have exceeded the limit of $limit resources of type $resourceTypeId."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    The limit that was exceeded.

    + * @return limit + */ + @NotNull + @JsonProperty("limit") + public Double getLimit(); + + /** + *

    The resource type that reached its limit.

    + * @return resourceTypeId + */ + @NotNull + @JsonProperty("resourceTypeId") + public String getResourceTypeId(); + + /** + *

    "You have exceeded the limit of $limit resources of type $resourceTypeId."

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

    The limit that was exceeded.

    + * @param limit value to be set + */ + + public void setLimit(final Double limit); + + /** + *

    The resource type that reached its limit.

    + * @param resourceTypeId value to be set + */ + + public void setResourceTypeId(final String resourceTypeId); + + /** + * factory method + * @return instance of MaxResourceLimitExceededError + */ + public static MaxResourceLimitExceededError of() { + return new MaxResourceLimitExceededErrorImpl(); + } + + /** + * factory method to create a shallow copy MaxResourceLimitExceededError + * @param template instance to be copied + * @return copy instance + */ + public static MaxResourceLimitExceededError of(final MaxResourceLimitExceededError template) { + MaxResourceLimitExceededErrorImpl instance = new MaxResourceLimitExceededErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setLimit(template.getLimit()); + instance.setResourceTypeId(template.getResourceTypeId()); + return instance; + } + + public MaxResourceLimitExceededError copyDeep(); + + /** + * factory method to create a deep copy of MaxResourceLimitExceededError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MaxResourceLimitExceededError deepCopy(@Nullable final MaxResourceLimitExceededError template) { + if (template == null) { + return null; + } + MaxResourceLimitExceededErrorImpl instance = new MaxResourceLimitExceededErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setLimit(template.getLimit()); + instance.setResourceTypeId(template.getResourceTypeId()); + return instance; + } + + /** + * builder factory method for MaxResourceLimitExceededError + * @return builder + */ + public static MaxResourceLimitExceededErrorBuilder builder() { + return MaxResourceLimitExceededErrorBuilder.of(); + } + + /** + * create builder for MaxResourceLimitExceededError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MaxResourceLimitExceededErrorBuilder builder(final MaxResourceLimitExceededError template) { + return MaxResourceLimitExceededErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMaxResourceLimitExceededError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorBuilder.java new file mode 100644 index 00000000000..3d19c5e2a07 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MaxResourceLimitExceededErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     MaxResourceLimitExceededError maxResourceLimitExceededError = MaxResourceLimitExceededError.builder()
    + *             .message("{message}")
    + *             .limit(0.3)
    + *             .resourceTypeId("{resourceTypeId}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MaxResourceLimitExceededErrorBuilder implements Builder { + + private String message; + + private Double limit; + + private String resourceTypeId; + + /** + *

    "You have exceeded the limit of $limit resources of type $resourceTypeId."

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

    The limit that was exceeded.

    + * @param limit value to be set + * @return Builder + */ + + public MaxResourceLimitExceededErrorBuilder limit(final Double limit) { + this.limit = limit; + return this; + } + + /** + *

    The resource type that reached its limit.

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

    "You have exceeded the limit of $limit resources of type $resourceTypeId."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

    The limit that was exceeded.

    + * @return limit + */ + + public Double getLimit() { + return this.limit; + } + + /** + *

    The resource type that reached its limit.

    + * @return resourceTypeId + */ + + public String getResourceTypeId() { + return this.resourceTypeId; + } + + /** + * builds MaxResourceLimitExceededError with checking for non-null required values + * @return MaxResourceLimitExceededError + */ + public MaxResourceLimitExceededError build() { + Objects.requireNonNull(message, MaxResourceLimitExceededError.class + ": message is missing"); + Objects.requireNonNull(limit, MaxResourceLimitExceededError.class + ": limit is missing"); + Objects.requireNonNull(resourceTypeId, MaxResourceLimitExceededError.class + ": resourceTypeId is missing"); + return new MaxResourceLimitExceededErrorImpl(message, limit, resourceTypeId); + } + + /** + * builds MaxResourceLimitExceededError without checking for non-null required values + * @return MaxResourceLimitExceededError + */ + public MaxResourceLimitExceededError buildUnchecked() { + return new MaxResourceLimitExceededErrorImpl(message, limit, resourceTypeId); + } + + /** + * factory method for an instance of MaxResourceLimitExceededErrorBuilder + * @return builder + */ + public static MaxResourceLimitExceededErrorBuilder of() { + return new MaxResourceLimitExceededErrorBuilder(); + } + + /** + * create builder for MaxResourceLimitExceededError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MaxResourceLimitExceededErrorBuilder of(final MaxResourceLimitExceededError template) { + MaxResourceLimitExceededErrorBuilder builder = new MaxResourceLimitExceededErrorBuilder(); + builder.message = template.getMessage(); + builder.limit = template.getLimit(); + builder.resourceTypeId = template.getResourceTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorImpl.java new file mode 100644 index 00000000000..b88e711affc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorImpl.java @@ -0,0 +1,140 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when a resource type cannot be created as it has reached its limits.

    + *

    The limits must be adjusted for this resource before sending the request again.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MaxResourceLimitExceededErrorImpl implements MaxResourceLimitExceededError, ModelBase { + + private String code; + + private String message; + + private Double limit; + + private String resourceTypeId; + + /** + * create instance with all properties + */ + @JsonCreator + MaxResourceLimitExceededErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("limit") final Double limit, @JsonProperty("resourceTypeId") final String resourceTypeId) { + this.message = message; + this.limit = limit; + this.resourceTypeId = resourceTypeId; + this.code = MAX_RESOURCE_LIMIT_EXCEEDED; + } + + /** + * create empty instance + */ + public MaxResourceLimitExceededErrorImpl() { + this.code = MAX_RESOURCE_LIMIT_EXCEEDED; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "You have exceeded the limit of $limit resources of type $resourceTypeId."

    + */ + + public String getMessage() { + return this.message; + } + + /** + *

    The limit that was exceeded.

    + */ + + public Double getLimit() { + return this.limit; + } + + /** + *

    The resource type that reached its limit.

    + */ + + public String getResourceTypeId() { + return this.resourceTypeId; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setLimit(final Double limit) { + this.limit = limit; + } + + public void setResourceTypeId(final String resourceTypeId) { + this.resourceTypeId = resourceTypeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MaxResourceLimitExceededErrorImpl that = (MaxResourceLimitExceededErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(limit, that.limit) + .append(resourceTypeId, that.resourceTypeId) + .append(code, that.code) + .append(message, that.message) + .append(limit, that.limit) + .append(resourceTypeId, that.resourceTypeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(limit) + .append(resourceTypeId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("limit", limit) + .append("resourceTypeId", resourceTypeId) + .build(); + } + + @Override + public MaxResourceLimitExceededError copyDeep() { + return MaxResourceLimitExceededError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyError.java new file mode 100644 index 00000000000..7f635fc31f8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when the project key is missing from the request.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     MissingProjectKeyError missingProjectKeyError = MissingProjectKeyError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("MissingProjectKey") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MissingProjectKeyErrorImpl.class) +public interface MissingProjectKeyError extends ErrorObject { + + /** + * discriminator value for MissingProjectKeyError + */ + String MISSING_PROJECT_KEY = "MissingProjectKey"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "Missing project key in the request path."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    "Missing project key in the request path."

    + * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of MissingProjectKeyError + */ + public static MissingProjectKeyError of() { + return new MissingProjectKeyErrorImpl(); + } + + /** + * factory method to create a shallow copy MissingProjectKeyError + * @param template instance to be copied + * @return copy instance + */ + public static MissingProjectKeyError of(final MissingProjectKeyError template) { + MissingProjectKeyErrorImpl instance = new MissingProjectKeyErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public MissingProjectKeyError copyDeep(); + + /** + * factory method to create a deep copy of MissingProjectKeyError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MissingProjectKeyError deepCopy(@Nullable final MissingProjectKeyError template) { + if (template == null) { + return null; + } + MissingProjectKeyErrorImpl instance = new MissingProjectKeyErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for MissingProjectKeyError + * @return builder + */ + public static MissingProjectKeyErrorBuilder builder() { + return MissingProjectKeyErrorBuilder.of(); + } + + /** + * create builder for MissingProjectKeyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MissingProjectKeyErrorBuilder builder(final MissingProjectKeyError template) { + return MissingProjectKeyErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMissingProjectKeyError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorBuilder.java new file mode 100644 index 00000000000..69dfe05671b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MissingProjectKeyErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     MissingProjectKeyError missingProjectKeyError = MissingProjectKeyError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MissingProjectKeyErrorBuilder implements Builder { + + private String message; + + /** + *

    "Missing project key in the request path."

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

    "Missing project key in the request path."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds MissingProjectKeyError with checking for non-null required values + * @return MissingProjectKeyError + */ + public MissingProjectKeyError build() { + Objects.requireNonNull(message, MissingProjectKeyError.class + ": message is missing"); + return new MissingProjectKeyErrorImpl(message); + } + + /** + * builds MissingProjectKeyError without checking for non-null required values + * @return MissingProjectKeyError + */ + public MissingProjectKeyError buildUnchecked() { + return new MissingProjectKeyErrorImpl(message); + } + + /** + * factory method for an instance of MissingProjectKeyErrorBuilder + * @return builder + */ + public static MissingProjectKeyErrorBuilder of() { + return new MissingProjectKeyErrorBuilder(); + } + + /** + * create builder for MissingProjectKeyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MissingProjectKeyErrorBuilder of(final MissingProjectKeyError template) { + MissingProjectKeyErrorBuilder builder = new MissingProjectKeyErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorImpl.java new file mode 100644 index 00000000000..8e6c5bc0768 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when the project key is missing from the request.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MissingProjectKeyErrorImpl implements MissingProjectKeyError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + MissingProjectKeyErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = MISSING_PROJECT_KEY; + } + + /** + * create empty instance + */ + public MissingProjectKeyErrorImpl() { + this.code = MISSING_PROJECT_KEY; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "Missing project key in the request path."

    + */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MissingProjectKeyErrorImpl that = (MissingProjectKeyErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public MissingProjectKeyError copyDeep() { + return MissingProjectKeyError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundError.java new file mode 100644 index 00000000000..534bb898c90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundError.java @@ -0,0 +1,190 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
    + *             .message("{message}")
    + *             .typeId("{typeId}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("ReferencedResourceNotFound") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ReferencedResourceNotFoundErrorImpl.class) +public interface ReferencedResourceNotFoundError extends ErrorObject { + + /** + * discriminator value for ReferencedResourceNotFoundError + */ + String REFERENCED_RESOURCE_NOT_FOUND = "ReferencedResourceNotFound"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "The referenced object of type $typeId $id || key was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    Type of referenced resource.

    + * @return typeId + */ + @NotNull + @JsonProperty("typeId") + public String getTypeId(); + + /** + *

    Unique identifier of the referenced resource, if known.

    + * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

    User-defined unique identifier of the referenced resource, if known.

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

    "The referenced object of type $typeId $id || key was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

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

    Type of referenced resource.

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

    Unique identifier of the referenced resource, if known.

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

    User-defined unique identifier of the referenced resource, if known.

    + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of ReferencedResourceNotFoundError + */ + public static ReferencedResourceNotFoundError of() { + return new ReferencedResourceNotFoundErrorImpl(); + } + + /** + * factory method to create a shallow copy ReferencedResourceNotFoundError + * @param template instance to be copied + * @return copy instance + */ + public static ReferencedResourceNotFoundError of(final ReferencedResourceNotFoundError template) { + ReferencedResourceNotFoundErrorImpl instance = new ReferencedResourceNotFoundErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setTypeId(template.getTypeId()); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + public ReferencedResourceNotFoundError copyDeep(); + + /** + * factory method to create a deep copy of ReferencedResourceNotFoundError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ReferencedResourceNotFoundError deepCopy(@Nullable final ReferencedResourceNotFoundError template) { + if (template == null) { + return null; + } + ReferencedResourceNotFoundErrorImpl instance = new ReferencedResourceNotFoundErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setTypeId(template.getTypeId()); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for ReferencedResourceNotFoundError + * @return builder + */ + public static ReferencedResourceNotFoundErrorBuilder builder() { + return ReferencedResourceNotFoundErrorBuilder.of(); + } + + /** + * create builder for ReferencedResourceNotFoundError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ReferencedResourceNotFoundErrorBuilder builder(final ReferencedResourceNotFoundError template) { + return ReferencedResourceNotFoundErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withReferencedResourceNotFoundError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorBuilder.java new file mode 100644 index 00000000000..b8e3b6a4f39 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorBuilder.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ReferencedResourceNotFoundErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ReferencedResourceNotFoundError referencedResourceNotFoundError = ReferencedResourceNotFoundError.builder()
    + *             .message("{message}")
    + *             .typeId("{typeId}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ReferencedResourceNotFoundErrorBuilder implements Builder { + + private String message; + + private String typeId; + + @Nullable + private String id; + + @Nullable + private String key; + + /** + *

    "The referenced object of type $typeId $id || key was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

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

    Type of referenced resource.

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

    Unique identifier of the referenced resource, if known.

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

    User-defined unique identifier of the referenced resource, if known.

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

    "The referenced object of type $typeId $id || key was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Type of referenced resource.

    + * @return typeId + */ + + public String getTypeId() { + return this.typeId; + } + + /** + *

    Unique identifier of the referenced resource, if known.

    + * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

    User-defined unique identifier of the referenced resource, if known.

    + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds ReferencedResourceNotFoundError with checking for non-null required values + * @return ReferencedResourceNotFoundError + */ + public ReferencedResourceNotFoundError build() { + Objects.requireNonNull(message, ReferencedResourceNotFoundError.class + ": message is missing"); + Objects.requireNonNull(typeId, ReferencedResourceNotFoundError.class + ": typeId is missing"); + return new ReferencedResourceNotFoundErrorImpl(message, typeId, id, key); + } + + /** + * builds ReferencedResourceNotFoundError without checking for non-null required values + * @return ReferencedResourceNotFoundError + */ + public ReferencedResourceNotFoundError buildUnchecked() { + return new ReferencedResourceNotFoundErrorImpl(message, typeId, id, key); + } + + /** + * factory method for an instance of ReferencedResourceNotFoundErrorBuilder + * @return builder + */ + public static ReferencedResourceNotFoundErrorBuilder of() { + return new ReferencedResourceNotFoundErrorBuilder(); + } + + /** + * create builder for ReferencedResourceNotFoundError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ReferencedResourceNotFoundErrorBuilder of(final ReferencedResourceNotFoundError template) { + ReferencedResourceNotFoundErrorBuilder builder = new ReferencedResourceNotFoundErrorBuilder(); + builder.message = template.getMessage(); + builder.typeId = template.getTypeId(); + builder.id = template.getId(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorImpl.java new file mode 100644 index 00000000000..1ec6536f407 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ReferencedResourceNotFoundErrorImpl implements ReferencedResourceNotFoundError, ModelBase { + + private String code; + + private String message; + + private String typeId; + + private String id; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + ReferencedResourceNotFoundErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("typeId") final String typeId, @JsonProperty("id") final String id, + @JsonProperty("key") final String key) { + this.message = message; + this.typeId = typeId; + this.id = id; + this.key = key; + this.code = REFERENCED_RESOURCE_NOT_FOUND; + } + + /** + * create empty instance + */ + public ReferencedResourceNotFoundErrorImpl() { + this.code = REFERENCED_RESOURCE_NOT_FOUND; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "The referenced object of type $typeId $id || key was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."

    + */ + + public String getMessage() { + return this.message; + } + + /** + *

    Type of referenced resource.

    + */ + + public String getTypeId() { + return this.typeId; + } + + /** + *

    Unique identifier of the referenced resource, if known.

    + */ + + public String getId() { + return this.id; + } + + /** + *

    User-defined unique identifier of the referenced resource, if known.

    + */ + + public String getKey() { + return this.key; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setTypeId(final String typeId) { + this.typeId = typeId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ReferencedResourceNotFoundErrorImpl that = (ReferencedResourceNotFoundErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .append(code, that.code) + .append(message, that.message) + .append(typeId, that.typeId) + .append(id, that.id) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(typeId) + .append(id) + .append(key) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("typeId", typeId) + .append("id", id) + .append("key", key) + .build(); + } + + @Override + public ReferencedResourceNotFoundError copyDeep() { + return ReferencedResourceNotFoundError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java index cf24f46485a..c0952010017 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundError.java @@ -23,6 +23,8 @@ *
    
      *     ResourceNotFoundError resourceNotFoundError = ResourceNotFoundError.builder()
      *             .message("{message}")
    + *             .resourceIdentifier("{resourceIdentifier}")
    + *             .resourceId("{resourceId}")
      *             .build()
      * 
    * @@ -46,7 +48,7 @@ public interface ResourceNotFoundError extends ErrorObject { public String getCode(); /** - *

    "The Resource with ID $resourceId was not found."

    + *

    "The Resource with $resourceIdentifier $resourceId was not found."

    * @return message */ @NotNull @@ -54,12 +56,42 @@ public interface ResourceNotFoundError extends ErrorObject { public String getMessage(); /** - *

    "The Resource with ID $resourceId was not found."

    + *

    The identifier type used (e.g., id, key).

    + * @return resourceIdentifier + */ + @NotNull + @JsonProperty("resourceIdentifier") + public String getResourceIdentifier(); + + /** + *

    The actual identifier value.

    + * @return resourceId + */ + @NotNull + @JsonProperty("resourceId") + public String getResourceId(); + + /** + *

    "The Resource with $resourceIdentifier $resourceId was not found."

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

    The identifier type used (e.g., id, key).

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

    The actual identifier value.

    + * @param resourceId value to be set + */ + + public void setResourceId(final String resourceId); + /** * factory method * @return instance of ResourceNotFoundError @@ -76,6 +108,8 @@ public static ResourceNotFoundError of() { public static ResourceNotFoundError of(final ResourceNotFoundError template) { ResourceNotFoundErrorImpl instance = new ResourceNotFoundErrorImpl(); instance.setMessage(template.getMessage()); + instance.setResourceIdentifier(template.getResourceIdentifier()); + instance.setResourceId(template.getResourceId()); return instance; } @@ -93,6 +127,8 @@ public static ResourceNotFoundError deepCopy(@Nullable final ResourceNotFoundErr } ResourceNotFoundErrorImpl instance = new ResourceNotFoundErrorImpl(); instance.setMessage(template.getMessage()); + instance.setResourceIdentifier(template.getResourceIdentifier()); + instance.setResourceId(template.getResourceId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java index 296509cd933..cdf8b4b38f5 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorBuilder.java @@ -14,6 +14,8 @@ *
    
      *     ResourceNotFoundError resourceNotFoundError = ResourceNotFoundError.builder()
      *             .message("{message}")
    + *             .resourceIdentifier("{resourceIdentifier}")
    + *             .resourceId("{resourceId}")
      *             .build()
      * 
    * @@ -23,8 +25,12 @@ public class ResourceNotFoundErrorBuilder implements Builder"The Resource with ID $resourceId was not found."

    + *

    "The Resource with $resourceIdentifier $resourceId was not found."

    * @param message value to be set * @return Builder */ @@ -35,7 +41,29 @@ public ResourceNotFoundErrorBuilder message(final String message) { } /** - *

    "The Resource with ID $resourceId was not found."

    + *

    The identifier type used (e.g., id, key).

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

    The actual identifier value.

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

    "The Resource with $resourceIdentifier $resourceId was not found."

    * @return message */ @@ -43,13 +71,33 @@ public String getMessage() { return this.message; } + /** + *

    The identifier type used (e.g., id, key).

    + * @return resourceIdentifier + */ + + public String getResourceIdentifier() { + return this.resourceIdentifier; + } + + /** + *

    The actual identifier value.

    + * @return resourceId + */ + + public String getResourceId() { + return this.resourceId; + } + /** * builds ResourceNotFoundError with checking for non-null required values * @return ResourceNotFoundError */ public ResourceNotFoundError build() { Objects.requireNonNull(message, ResourceNotFoundError.class + ": message is missing"); - return new ResourceNotFoundErrorImpl(message); + Objects.requireNonNull(resourceIdentifier, ResourceNotFoundError.class + ": resourceIdentifier is missing"); + Objects.requireNonNull(resourceId, ResourceNotFoundError.class + ": resourceId is missing"); + return new ResourceNotFoundErrorImpl(message, resourceIdentifier, resourceId); } /** @@ -57,7 +105,7 @@ public ResourceNotFoundError build() { * @return ResourceNotFoundError */ public ResourceNotFoundError buildUnchecked() { - return new ResourceNotFoundErrorImpl(message); + return new ResourceNotFoundErrorImpl(message, resourceIdentifier, resourceId); } /** @@ -76,6 +124,8 @@ public static ResourceNotFoundErrorBuilder of() { public static ResourceNotFoundErrorBuilder of(final ResourceNotFoundError template) { ResourceNotFoundErrorBuilder builder = new ResourceNotFoundErrorBuilder(); builder.message = template.getMessage(); + builder.resourceIdentifier = template.getResourceIdentifier(); + builder.resourceId = template.getResourceId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java index c58ed347a48..6f26c82a505 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorImpl.java @@ -26,12 +26,20 @@ public class ResourceNotFoundErrorImpl implements ResourceNotFoundError, ModelBa private String message; + private String resourceIdentifier; + + private String resourceId; + /** * create instance with all properties */ @JsonCreator - ResourceNotFoundErrorImpl(@JsonProperty("message") final String message) { + ResourceNotFoundErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("resourceIdentifier") final String resourceIdentifier, + @JsonProperty("resourceId") final String resourceId) { this.message = message; + this.resourceIdentifier = resourceIdentifier; + this.resourceId = resourceId; this.code = RESOURCE_NOT_FOUND; } @@ -51,17 +59,41 @@ public String getCode() { } /** - *

    "The Resource with ID $resourceId was not found."

    + *

    "The Resource with $resourceIdentifier $resourceId was not found."

    */ public String getMessage() { return this.message; } + /** + *

    The identifier type used (e.g., id, key).

    + */ + + public String getResourceIdentifier() { + return this.resourceIdentifier; + } + + /** + *

    The actual identifier value.

    + */ + + public String getResourceId() { + return this.resourceId; + } + public void setMessage(final String message) { this.message = message; } + public void setResourceIdentifier(final String resourceIdentifier) { + this.resourceIdentifier = resourceIdentifier; + } + + public void setResourceId(final String resourceId) { + this.resourceId = resourceId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -74,20 +106,30 @@ public boolean equals(Object o) { return new EqualsBuilder().append(code, that.code) .append(message, that.message) + .append(resourceIdentifier, that.resourceIdentifier) + .append(resourceId, that.resourceId) .append(code, that.code) .append(message, that.message) + .append(resourceIdentifier, that.resourceIdentifier) + .append(resourceId, that.resourceId) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(resourceIdentifier) + .append(resourceId) + .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) .append("message", message) + .append("resourceIdentifier", resourceIdentifier) + .append("resourceId", resourceId) .build(); } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableError.java new file mode 100644 index 00000000000..75147bd3548 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when the service is unavailable, for example when the Notification Service is down.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ServiceUnavailableError serviceUnavailableError = ServiceUnavailableError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("ServiceUnavailable") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ServiceUnavailableErrorImpl.class) +public interface ServiceUnavailableError extends ErrorObject { + + /** + * discriminator value for ServiceUnavailableError + */ + String SERVICE_UNAVAILABLE = "ServiceUnavailable"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "Service is unavailable."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    "Service is unavailable."

    + * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of ServiceUnavailableError + */ + public static ServiceUnavailableError of() { + return new ServiceUnavailableErrorImpl(); + } + + /** + * factory method to create a shallow copy ServiceUnavailableError + * @param template instance to be copied + * @return copy instance + */ + public static ServiceUnavailableError of(final ServiceUnavailableError template) { + ServiceUnavailableErrorImpl instance = new ServiceUnavailableErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public ServiceUnavailableError copyDeep(); + + /** + * factory method to create a deep copy of ServiceUnavailableError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ServiceUnavailableError deepCopy(@Nullable final ServiceUnavailableError template) { + if (template == null) { + return null; + } + ServiceUnavailableErrorImpl instance = new ServiceUnavailableErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for ServiceUnavailableError + * @return builder + */ + public static ServiceUnavailableErrorBuilder builder() { + return ServiceUnavailableErrorBuilder.of(); + } + + /** + * create builder for ServiceUnavailableError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ServiceUnavailableErrorBuilder builder(final ServiceUnavailableError template) { + return ServiceUnavailableErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withServiceUnavailableError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorBuilder.java new file mode 100644 index 00000000000..17f01e3c34b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ServiceUnavailableErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ServiceUnavailableError serviceUnavailableError = ServiceUnavailableError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ServiceUnavailableErrorBuilder implements Builder { + + private String message; + + /** + *

    "Service is unavailable."

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

    "Service is unavailable."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds ServiceUnavailableError with checking for non-null required values + * @return ServiceUnavailableError + */ + public ServiceUnavailableError build() { + Objects.requireNonNull(message, ServiceUnavailableError.class + ": message is missing"); + return new ServiceUnavailableErrorImpl(message); + } + + /** + * builds ServiceUnavailableError without checking for non-null required values + * @return ServiceUnavailableError + */ + public ServiceUnavailableError buildUnchecked() { + return new ServiceUnavailableErrorImpl(message); + } + + /** + * factory method for an instance of ServiceUnavailableErrorBuilder + * @return builder + */ + public static ServiceUnavailableErrorBuilder of() { + return new ServiceUnavailableErrorBuilder(); + } + + /** + * create builder for ServiceUnavailableError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ServiceUnavailableErrorBuilder of(final ServiceUnavailableError template) { + ServiceUnavailableErrorBuilder builder = new ServiceUnavailableErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorImpl.java new file mode 100644 index 00000000000..26fe72caf3b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when the service is unavailable, for example when the Notification Service is down.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ServiceUnavailableErrorImpl implements ServiceUnavailableError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + ServiceUnavailableErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = SERVICE_UNAVAILABLE; + } + + /** + * create empty instance + */ + public ServiceUnavailableErrorImpl() { + this.code = SERVICE_UNAVAILABLE; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "Service is unavailable."

    + */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ServiceUnavailableErrorImpl that = (ServiceUnavailableErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public ServiceUnavailableError copyDeep() { + return ServiceUnavailableError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorError.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorError.java new file mode 100644 index 00000000000..bd038120878 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorError.java @@ -0,0 +1,138 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Returned when a Payment Predicate does not have the correct syntax.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SyntaxErrorError syntaxErrorError = SyntaxErrorError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SyntaxError") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SyntaxErrorErrorImpl.class) +public interface SyntaxErrorError extends ErrorObject { + + /** + * discriminator value for SyntaxErrorError + */ + String SYNTAX_ERROR = "SyntaxError"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

    "Syntax error while parsing $fieldDefinition."

    + * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

    "Syntax error while parsing $fieldDefinition."

    + * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of SyntaxErrorError + */ + public static SyntaxErrorError of() { + return new SyntaxErrorErrorImpl(); + } + + /** + * factory method to create a shallow copy SyntaxErrorError + * @param template instance to be copied + * @return copy instance + */ + public static SyntaxErrorError of(final SyntaxErrorError template) { + SyntaxErrorErrorImpl instance = new SyntaxErrorErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + public SyntaxErrorError copyDeep(); + + /** + * factory method to create a deep copy of SyntaxErrorError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SyntaxErrorError deepCopy(@Nullable final SyntaxErrorError template) { + if (template == null) { + return null; + } + SyntaxErrorErrorImpl instance = new SyntaxErrorErrorImpl(); + instance.setMessage(template.getMessage()); + return instance; + } + + /** + * builder factory method for SyntaxErrorError + * @return builder + */ + public static SyntaxErrorErrorBuilder builder() { + return SyntaxErrorErrorBuilder.of(); + } + + /** + * create builder for SyntaxErrorError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SyntaxErrorErrorBuilder builder(final SyntaxErrorError template) { + return SyntaxErrorErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSyntaxErrorError(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-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorBuilder.java new file mode 100644 index 00000000000..c68a9244762 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SyntaxErrorErrorBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SyntaxErrorError syntaxErrorError = SyntaxErrorError.builder()
    + *             .message("{message}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SyntaxErrorErrorBuilder implements Builder { + + private String message; + + /** + *

    "Syntax error while parsing $fieldDefinition."

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

    "Syntax error while parsing $fieldDefinition."

    + * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + * builds SyntaxErrorError with checking for non-null required values + * @return SyntaxErrorError + */ + public SyntaxErrorError build() { + Objects.requireNonNull(message, SyntaxErrorError.class + ": message is missing"); + return new SyntaxErrorErrorImpl(message); + } + + /** + * builds SyntaxErrorError without checking for non-null required values + * @return SyntaxErrorError + */ + public SyntaxErrorError buildUnchecked() { + return new SyntaxErrorErrorImpl(message); + } + + /** + * factory method for an instance of SyntaxErrorErrorBuilder + * @return builder + */ + public static SyntaxErrorErrorBuilder of() { + return new SyntaxErrorErrorBuilder(); + } + + /** + * create builder for SyntaxErrorError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SyntaxErrorErrorBuilder of(final SyntaxErrorError template) { + SyntaxErrorErrorBuilder builder = new SyntaxErrorErrorBuilder(); + builder.message = template.getMessage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorImpl.java new file mode 100644 index 00000000000..528caf87d5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Returned when a Payment Predicate does not have the correct syntax.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SyntaxErrorErrorImpl implements SyntaxErrorError, ModelBase { + + private String code; + + private String message; + + /** + * create instance with all properties + */ + @JsonCreator + SyntaxErrorErrorImpl(@JsonProperty("message") final String message) { + this.message = message; + this.code = SYNTAX_ERROR; + } + + /** + * create empty instance + */ + public SyntaxErrorErrorImpl() { + this.code = SYNTAX_ERROR; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

    "Syntax error while parsing $fieldDefinition."

    + */ + + public String getMessage() { + return this.message; + } + + public void setMessage(final String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SyntaxErrorErrorImpl that = (SyntaxErrorErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(code, that.code) + .append(message, that.message) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .build(); + } + + @Override + public SyntaxErrorError copyDeep() { + return SyntaxErrorError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java index ed2abbb5ac0..ddc5d1a387f 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/order/OrderResourceIdentifierImpl.java @@ -47,7 +47,7 @@ public OrderResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java index 51115fd07fd..b2daa128a12 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment/PaymentResourceIdentifierImpl.java @@ -47,7 +47,7 @@ public PaymentResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfiguration.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfiguration.java new file mode 100644 index 00000000000..aa29ac4569a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfiguration.java @@ -0,0 +1,141 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Configuration for automated reversal of payments.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AutomatedReversalConfiguration automatedReversalConfiguration = AutomatedReversalConfiguration.builder()
    + *             .status("{status}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AutomatedReversalConfigurationImpl.class) +public interface AutomatedReversalConfiguration { + + /** + *

    Indicates whether the automated reversal configuration is active or not.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public String getStatus(); + + /** + *

    Cart-based predicate in JSONata format to determine when automated reversal should be applied.

    + * @return predicate + */ + + @JsonProperty("predicate") + public String getPredicate(); + + /** + *

    Indicates whether the automated reversal configuration is active or not.

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

    Cart-based predicate in JSONata format to determine when automated reversal should be applied.

    + * @param predicate value to be set + */ + + public void setPredicate(final String predicate); + + /** + * factory method + * @return instance of AutomatedReversalConfiguration + */ + public static AutomatedReversalConfiguration of() { + return new AutomatedReversalConfigurationImpl(); + } + + /** + * factory method to create a shallow copy AutomatedReversalConfiguration + * @param template instance to be copied + * @return copy instance + */ + public static AutomatedReversalConfiguration of(final AutomatedReversalConfiguration template) { + AutomatedReversalConfigurationImpl instance = new AutomatedReversalConfigurationImpl(); + instance.setStatus(template.getStatus()); + instance.setPredicate(template.getPredicate()); + return instance; + } + + public AutomatedReversalConfiguration copyDeep(); + + /** + * factory method to create a deep copy of AutomatedReversalConfiguration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AutomatedReversalConfiguration deepCopy(@Nullable final AutomatedReversalConfiguration template) { + if (template == null) { + return null; + } + AutomatedReversalConfigurationImpl instance = new AutomatedReversalConfigurationImpl(); + instance.setStatus(template.getStatus()); + instance.setPredicate(template.getPredicate()); + return instance; + } + + /** + * builder factory method for AutomatedReversalConfiguration + * @return builder + */ + public static AutomatedReversalConfigurationBuilder builder() { + return AutomatedReversalConfigurationBuilder.of(); + } + + /** + * create builder for AutomatedReversalConfiguration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AutomatedReversalConfigurationBuilder builder(final AutomatedReversalConfiguration template) { + return AutomatedReversalConfigurationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAutomatedReversalConfiguration(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationBuilder.java new file mode 100644 index 00000000000..31c56ea5f54 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationBuilder.java @@ -0,0 +1,109 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AutomatedReversalConfigurationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     AutomatedReversalConfiguration automatedReversalConfiguration = AutomatedReversalConfiguration.builder()
    + *             .status("{status}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AutomatedReversalConfigurationBuilder implements Builder { + + private String status; + + @Nullable + private String predicate; + + /** + *

    Indicates whether the automated reversal configuration is active or not.

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

    Cart-based predicate in JSONata format to determine when automated reversal should be applied.

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

    Indicates whether the automated reversal configuration is active or not.

    + * @return status + */ + + public String getStatus() { + return this.status; + } + + /** + *

    Cart-based predicate in JSONata format to determine when automated reversal should be applied.

    + * @return predicate + */ + + @Nullable + public String getPredicate() { + return this.predicate; + } + + /** + * builds AutomatedReversalConfiguration with checking for non-null required values + * @return AutomatedReversalConfiguration + */ + public AutomatedReversalConfiguration build() { + Objects.requireNonNull(status, AutomatedReversalConfiguration.class + ": status is missing"); + return new AutomatedReversalConfigurationImpl(status, predicate); + } + + /** + * builds AutomatedReversalConfiguration without checking for non-null required values + * @return AutomatedReversalConfiguration + */ + public AutomatedReversalConfiguration buildUnchecked() { + return new AutomatedReversalConfigurationImpl(status, predicate); + } + + /** + * factory method for an instance of AutomatedReversalConfigurationBuilder + * @return builder + */ + public static AutomatedReversalConfigurationBuilder of() { + return new AutomatedReversalConfigurationBuilder(); + } + + /** + * create builder for AutomatedReversalConfiguration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AutomatedReversalConfigurationBuilder of(final AutomatedReversalConfiguration template) { + AutomatedReversalConfigurationBuilder builder = new AutomatedReversalConfigurationBuilder(); + builder.status = template.getStatus(); + builder.predicate = template.getPredicate(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationImpl.java new file mode 100644 index 00000000000..047efb42d46 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationImpl.java @@ -0,0 +1,102 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Configuration for automated reversal of payments.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AutomatedReversalConfigurationImpl implements AutomatedReversalConfiguration, ModelBase { + + private String status; + + private String predicate; + + /** + * create instance with all properties + */ + @JsonCreator + AutomatedReversalConfigurationImpl(@JsonProperty("status") final String status, + @JsonProperty("predicate") final String predicate) { + this.status = status; + this.predicate = predicate; + } + + /** + * create empty instance + */ + public AutomatedReversalConfigurationImpl() { + } + + /** + *

    Indicates whether the automated reversal configuration is active or not.

    + */ + + public String getStatus() { + return this.status; + } + + /** + *

    Cart-based predicate in JSONata format to determine when automated reversal should be applied.

    + */ + + public String getPredicate() { + return this.predicate; + } + + public void setStatus(final String status) { + this.status = status; + } + + public void setPredicate(final String predicate) { + this.predicate = predicate; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AutomatedReversalConfigurationImpl that = (AutomatedReversalConfigurationImpl) o; + + return new EqualsBuilder().append(status, that.status) + .append(predicate, that.predicate) + .append(status, that.status) + .append(predicate, that.predicate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(status).append(predicate).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("status", status) + .append("predicate", predicate) + .build(); + } + + @Override + public AutomatedReversalConfiguration copyDeep() { + return AutomatedReversalConfiguration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReference.java new file mode 100644 index 00000000000..ef73b9c6efd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReference.java @@ -0,0 +1,142 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Reference to a connector deployment for the payment integration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ConnectorDeploymentReference connectorDeploymentReference = ConnectorDeploymentReference.builder()
    + *             .id("{id}")
    + *             .typeId("{typeId}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ConnectorDeploymentReferenceImpl.class) +public interface ConnectorDeploymentReference { + + /** + *

    Unique identifier of the referenced Connect Deployment.

    + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

    Type identifier, always deployment for Connector deployment references.

    + * @return typeId + */ + @NotNull + @JsonProperty("typeId") + public String getTypeId(); + + /** + *

    Unique identifier of the referenced Connect Deployment.

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

    Type identifier, always deployment for Connector deployment references.

    + * @param typeId value to be set + */ + + public void setTypeId(final String typeId); + + /** + * factory method + * @return instance of ConnectorDeploymentReference + */ + public static ConnectorDeploymentReference of() { + return new ConnectorDeploymentReferenceImpl(); + } + + /** + * factory method to create a shallow copy ConnectorDeploymentReference + * @param template instance to be copied + * @return copy instance + */ + public static ConnectorDeploymentReference of(final ConnectorDeploymentReference template) { + ConnectorDeploymentReferenceImpl instance = new ConnectorDeploymentReferenceImpl(); + instance.setId(template.getId()); + instance.setTypeId(template.getTypeId()); + return instance; + } + + public ConnectorDeploymentReference copyDeep(); + + /** + * factory method to create a deep copy of ConnectorDeploymentReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ConnectorDeploymentReference deepCopy(@Nullable final ConnectorDeploymentReference template) { + if (template == null) { + return null; + } + ConnectorDeploymentReferenceImpl instance = new ConnectorDeploymentReferenceImpl(); + instance.setId(template.getId()); + instance.setTypeId(template.getTypeId()); + return instance; + } + + /** + * builder factory method for ConnectorDeploymentReference + * @return builder + */ + public static ConnectorDeploymentReferenceBuilder builder() { + return ConnectorDeploymentReferenceBuilder.of(); + } + + /** + * create builder for ConnectorDeploymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorDeploymentReferenceBuilder builder(final ConnectorDeploymentReference template) { + return ConnectorDeploymentReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withConnectorDeploymentReference(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceBuilder.java new file mode 100644 index 00000000000..6c183eb3e16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ConnectorDeploymentReferenceBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     ConnectorDeploymentReference connectorDeploymentReference = ConnectorDeploymentReference.builder()
    + *             .id("{id}")
    + *             .typeId("{typeId}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorDeploymentReferenceBuilder implements Builder { + + private String id; + + private String typeId; + + /** + *

    Unique identifier of the referenced Connect Deployment.

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

    Type identifier, always deployment for Connector deployment references.

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

    Unique identifier of the referenced Connect Deployment.

    + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

    Type identifier, always deployment for Connector deployment references.

    + * @return typeId + */ + + public String getTypeId() { + return this.typeId; + } + + /** + * builds ConnectorDeploymentReference with checking for non-null required values + * @return ConnectorDeploymentReference + */ + public ConnectorDeploymentReference build() { + Objects.requireNonNull(id, ConnectorDeploymentReference.class + ": id is missing"); + Objects.requireNonNull(typeId, ConnectorDeploymentReference.class + ": typeId is missing"); + return new ConnectorDeploymentReferenceImpl(id, typeId); + } + + /** + * builds ConnectorDeploymentReference without checking for non-null required values + * @return ConnectorDeploymentReference + */ + public ConnectorDeploymentReference buildUnchecked() { + return new ConnectorDeploymentReferenceImpl(id, typeId); + } + + /** + * factory method for an instance of ConnectorDeploymentReferenceBuilder + * @return builder + */ + public static ConnectorDeploymentReferenceBuilder of() { + return new ConnectorDeploymentReferenceBuilder(); + } + + /** + * create builder for ConnectorDeploymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ConnectorDeploymentReferenceBuilder of(final ConnectorDeploymentReference template) { + ConnectorDeploymentReferenceBuilder builder = new ConnectorDeploymentReferenceBuilder(); + builder.id = template.getId(); + builder.typeId = template.getTypeId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceImpl.java new file mode 100644 index 00000000000..4887603b871 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Reference to a connector deployment for the payment integration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ConnectorDeploymentReferenceImpl implements ConnectorDeploymentReference, ModelBase { + + private String id; + + private String typeId; + + /** + * create instance with all properties + */ + @JsonCreator + ConnectorDeploymentReferenceImpl(@JsonProperty("id") final String id, @JsonProperty("typeId") final String typeId) { + this.id = id; + this.typeId = typeId; + } + + /** + * create empty instance + */ + public ConnectorDeploymentReferenceImpl() { + } + + /** + *

    Unique identifier of the referenced Connect Deployment.

    + */ + + public String getId() { + return this.id; + } + + /** + *

    Type identifier, always deployment for Connector deployment references.

    + */ + + public String getTypeId() { + return this.typeId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setTypeId(final String typeId) { + this.typeId = typeId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ConnectorDeploymentReferenceImpl that = (ConnectorDeploymentReferenceImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(typeId).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("typeId", typeId) + .build(); + } + + @Override + public ConnectorDeploymentReference copyDeep() { + return ConnectorDeploymentReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedBy.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedBy.java new file mode 100644 index 00000000000..b4d4bf27178 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedBy.java @@ -0,0 +1,175 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Information regarding IDs and references that created the Payment Integration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     CreatedBy createdBy = CreatedBy.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CreatedByImpl.class) +public interface CreatedBy { + + /** + *

    ID of the API client that created the PaymentIntegration.

    + * @return clientId + */ + + @JsonProperty("clientId") + public String getClientId(); + + /** + *

    External user ID that created the PaymentIntegration.

    + * @return externalUserId + */ + + @JsonProperty("externalUserId") + public String getExternalUserId(); + + /** + *

    Customer reference if created by a customer.

    + * @return customer + */ + @Valid + @JsonProperty("customer") + public Reference getCustomer(); + + /** + *

    Anonymous ID if created by an anonymous user.

    + * @return anonymousId + */ + + @JsonProperty("anonymousId") + public String getAnonymousId(); + + /** + *

    ID of the API client that created the PaymentIntegration.

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

    External user ID that created the PaymentIntegration.

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

    Customer reference if created by a customer.

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

    Anonymous ID if created by an anonymous user.

    + * @param anonymousId value to be set + */ + + public void setAnonymousId(final String anonymousId); + + /** + * factory method + * @return instance of CreatedBy + */ + public static CreatedBy of() { + return new CreatedByImpl(); + } + + /** + * factory method to create a shallow copy CreatedBy + * @param template instance to be copied + * @return copy instance + */ + public static CreatedBy of(final CreatedBy template) { + CreatedByImpl instance = new CreatedByImpl(); + instance.setClientId(template.getClientId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setCustomer(template.getCustomer()); + instance.setAnonymousId(template.getAnonymousId()); + return instance; + } + + public CreatedBy copyDeep(); + + /** + * factory method to create a deep copy of CreatedBy + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CreatedBy deepCopy(@Nullable final CreatedBy template) { + if (template == null) { + return null; + } + CreatedByImpl instance = new CreatedByImpl(); + instance.setClientId(template.getClientId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setCustomer(com.commercetools.checkout.models.common.Reference.deepCopy(template.getCustomer())); + instance.setAnonymousId(template.getAnonymousId()); + return instance; + } + + /** + * builder factory method for CreatedBy + * @return builder + */ + public static CreatedByBuilder builder() { + return CreatedByBuilder.of(); + } + + /** + * create builder for CreatedBy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CreatedByBuilder builder(final CreatedBy template) { + return CreatedByBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCreatedBy(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByBuilder.java new file mode 100644 index 00000000000..c5af76ada38 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByBuilder.java @@ -0,0 +1,172 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CreatedByBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     CreatedBy createdBy = CreatedBy.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CreatedByBuilder implements Builder { + + @Nullable + private String clientId; + + @Nullable + private String externalUserId; + + @Nullable + private com.commercetools.checkout.models.common.Reference customer; + + @Nullable + private String anonymousId; + + /** + *

    ID of the API client that created the PaymentIntegration.

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

    External user ID that created the PaymentIntegration.

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

    Customer reference if created by a customer.

    + * @param customer value to be set + * @return Builder + */ + + public CreatedByBuilder customer(@Nullable final com.commercetools.checkout.models.common.Reference customer) { + this.customer = customer; + return this; + } + + /** + *

    Customer reference if created by a customer.

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

    Anonymous ID if created by an anonymous user.

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

    ID of the API client that created the PaymentIntegration.

    + * @return clientId + */ + + @Nullable + public String getClientId() { + return this.clientId; + } + + /** + *

    External user ID that created the PaymentIntegration.

    + * @return externalUserId + */ + + @Nullable + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

    Customer reference if created by a customer.

    + * @return customer + */ + + @Nullable + public com.commercetools.checkout.models.common.Reference getCustomer() { + return this.customer; + } + + /** + *

    Anonymous ID if created by an anonymous user.

    + * @return anonymousId + */ + + @Nullable + public String getAnonymousId() { + return this.anonymousId; + } + + /** + * builds CreatedBy with checking for non-null required values + * @return CreatedBy + */ + public CreatedBy build() { + return new CreatedByImpl(clientId, externalUserId, customer, anonymousId); + } + + /** + * builds CreatedBy without checking for non-null required values + * @return CreatedBy + */ + public CreatedBy buildUnchecked() { + return new CreatedByImpl(clientId, externalUserId, customer, anonymousId); + } + + /** + * factory method for an instance of CreatedByBuilder + * @return builder + */ + public static CreatedByBuilder of() { + return new CreatedByBuilder(); + } + + /** + * create builder for CreatedBy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CreatedByBuilder of(final CreatedBy template) { + CreatedByBuilder builder = new CreatedByBuilder(); + builder.clientId = template.getClientId(); + builder.externalUserId = template.getExternalUserId(); + builder.customer = template.getCustomer(); + builder.anonymousId = template.getAnonymousId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByImpl.java new file mode 100644 index 00000000000..4e096b7b7a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByImpl.java @@ -0,0 +1,144 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Information regarding IDs and references that created the Payment Integration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CreatedByImpl implements CreatedBy, ModelBase { + + private String clientId; + + private String externalUserId; + + private com.commercetools.checkout.models.common.Reference customer; + + private String anonymousId; + + /** + * create instance with all properties + */ + @JsonCreator + CreatedByImpl(@JsonProperty("clientId") final String clientId, + @JsonProperty("externalUserId") final String externalUserId, + @JsonProperty("customer") final com.commercetools.checkout.models.common.Reference customer, + @JsonProperty("anonymousId") final String anonymousId) { + this.clientId = clientId; + this.externalUserId = externalUserId; + this.customer = customer; + this.anonymousId = anonymousId; + } + + /** + * create empty instance + */ + public CreatedByImpl() { + } + + /** + *

    ID of the API client that created the PaymentIntegration.

    + */ + + public String getClientId() { + return this.clientId; + } + + /** + *

    External user ID that created the PaymentIntegration.

    + */ + + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

    Customer reference if created by a customer.

    + */ + + public com.commercetools.checkout.models.common.Reference getCustomer() { + return this.customer; + } + + /** + *

    Anonymous ID if created by an anonymous user.

    + */ + + public String getAnonymousId() { + return this.anonymousId; + } + + public void setClientId(final String clientId) { + this.clientId = clientId; + } + + public void setExternalUserId(final String externalUserId) { + this.externalUserId = externalUserId; + } + + public void setCustomer(final com.commercetools.checkout.models.common.Reference customer) { + this.customer = customer; + } + + public void setAnonymousId(final String anonymousId) { + this.anonymousId = anonymousId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CreatedByImpl that = (CreatedByImpl) o; + + return new EqualsBuilder().append(clientId, that.clientId) + .append(externalUserId, that.externalUserId) + .append(customer, that.customer) + .append(anonymousId, that.anonymousId) + .append(clientId, that.clientId) + .append(externalUserId, that.externalUserId) + .append(customer, that.customer) + .append(anonymousId, that.anonymousId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(clientId) + .append(externalUserId) + .append(customer) + .append(anonymousId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("clientId", clientId) + .append("externalUserId", externalUserId) + .append("customer", customer) + .append("anonymousId", anonymousId) + .build(); + } + + @Override + public CreatedBy copyDeep() { + return CreatedBy.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfo.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfo.java new file mode 100644 index 00000000000..8d9dd5665f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfo.java @@ -0,0 +1,178 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.commercetools.checkout.models.common.LocalizedUrl; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Display information for the payment integration in the UI.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DisplayInfo displayInfo = DisplayInfo.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DisplayInfoImpl.class) +public interface DisplayInfo { + + /** + *

    Label of the payment method displayed in the UI.

    + * @return label + */ + @Valid + @JsonProperty("label") + public LocalizedString getLabel(); + + /** + *

    Logo of the payment method displayed in the UI.

    + * @return logoUrl + */ + @Valid + @JsonProperty("logoUrl") + public LocalizedUrl getLogoUrl(); + + /** + *

    Description of the payment method displayed in the UI.

    + * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @return payButtonText + */ + @Valid + @JsonProperty("payButtonText") + public LocalizedString getPayButtonText(); + + /** + *

    Label of the payment method displayed in the UI.

    + * @param label value to be set + */ + + public void setLabel(final LocalizedString label); + + /** + *

    Logo of the payment method displayed in the UI.

    + * @param logoUrl value to be set + */ + + public void setLogoUrl(final LocalizedUrl logoUrl); + + /** + *

    Description of the payment method displayed in the UI.

    + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @param payButtonText value to be set + */ + + public void setPayButtonText(final LocalizedString payButtonText); + + /** + * factory method + * @return instance of DisplayInfo + */ + public static DisplayInfo of() { + return new DisplayInfoImpl(); + } + + /** + * factory method to create a shallow copy DisplayInfo + * @param template instance to be copied + * @return copy instance + */ + public static DisplayInfo of(final DisplayInfo template) { + DisplayInfoImpl instance = new DisplayInfoImpl(); + instance.setLabel(template.getLabel()); + instance.setLogoUrl(template.getLogoUrl()); + instance.setDescription(template.getDescription()); + instance.setPayButtonText(template.getPayButtonText()); + return instance; + } + + public DisplayInfo copyDeep(); + + /** + * factory method to create a deep copy of DisplayInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DisplayInfo deepCopy(@Nullable final DisplayInfo template) { + if (template == null) { + return null; + } + DisplayInfoImpl instance = new DisplayInfoImpl(); + instance.setLabel(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getLabel())); + instance.setLogoUrl(com.commercetools.checkout.models.common.LocalizedUrl.deepCopy(template.getLogoUrl())); + instance.setDescription( + com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setPayButtonText( + com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getPayButtonText())); + return instance; + } + + /** + * builder factory method for DisplayInfo + * @return builder + */ + public static DisplayInfoBuilder builder() { + return DisplayInfoBuilder.of(); + } + + /** + * create builder for DisplayInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DisplayInfoBuilder builder(final DisplayInfo template) { + return DisplayInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDisplayInfo(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoBuilder.java new file mode 100644 index 00000000000..f5b1975d6fa --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoBuilder.java @@ -0,0 +1,259 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DisplayInfoBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     DisplayInfo displayInfo = DisplayInfo.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DisplayInfoBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString label; + + @Nullable + private com.commercetools.checkout.models.common.LocalizedUrl logoUrl; + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString description; + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString payButtonText; + + /** + *

    Label of the payment method displayed in the UI.

    + * @param builder function to build the label value + * @return Builder + */ + + public DisplayInfoBuilder label( + Function builder) { + this.label = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Label of the payment method displayed in the UI.

    + * @param builder function to build the label value + * @return Builder + */ + + public DisplayInfoBuilder withLabel( + Function builder) { + this.label = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Label of the payment method displayed in the UI.

    + * @param label value to be set + * @return Builder + */ + + public DisplayInfoBuilder label(@Nullable final com.commercetools.checkout.models.common.LocalizedString label) { + this.label = label; + return this; + } + + /** + *

    Logo of the payment method displayed in the UI.

    + * @param builder function to build the logoUrl value + * @return Builder + */ + + public DisplayInfoBuilder logoUrl( + Function builder) { + this.logoUrl = builder.apply(com.commercetools.checkout.models.common.LocalizedUrlBuilder.of()).build(); + return this; + } + + /** + *

    Logo of the payment method displayed in the UI.

    + * @param builder function to build the logoUrl value + * @return Builder + */ + + public DisplayInfoBuilder withLogoUrl( + Function builder) { + this.logoUrl = builder.apply(com.commercetools.checkout.models.common.LocalizedUrlBuilder.of()); + return this; + } + + /** + *

    Logo of the payment method displayed in the UI.

    + * @param logoUrl value to be set + * @return Builder + */ + + public DisplayInfoBuilder logoUrl(@Nullable final com.commercetools.checkout.models.common.LocalizedUrl logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + /** + *

    Description of the payment method displayed in the UI.

    + * @param builder function to build the description value + * @return Builder + */ + + public DisplayInfoBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Description of the payment method displayed in the UI.

    + * @param builder function to build the description value + * @return Builder + */ + + public DisplayInfoBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Description of the payment method displayed in the UI.

    + * @param description value to be set + * @return Builder + */ + + public DisplayInfoBuilder description( + @Nullable final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @param builder function to build the payButtonText value + * @return Builder + */ + + public DisplayInfoBuilder payButtonText( + Function builder) { + this.payButtonText = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()) + .build(); + return this; + } + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @param builder function to build the payButtonText value + * @return Builder + */ + + public DisplayInfoBuilder withPayButtonText( + Function builder) { + this.payButtonText = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @param payButtonText value to be set + * @return Builder + */ + + public DisplayInfoBuilder payButtonText( + @Nullable final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.payButtonText = payButtonText; + return this; + } + + /** + *

    Label of the payment method displayed in the UI.

    + * @return label + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getLabel() { + return this.label; + } + + /** + *

    Logo of the payment method displayed in the UI.

    + * @return logoUrl + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedUrl getLogoUrl() { + return this.logoUrl; + } + + /** + *

    Description of the payment method displayed in the UI.

    + * @return description + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + * @return payButtonText + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getPayButtonText() { + return this.payButtonText; + } + + /** + * builds DisplayInfo with checking for non-null required values + * @return DisplayInfo + */ + public DisplayInfo build() { + return new DisplayInfoImpl(label, logoUrl, description, payButtonText); + } + + /** + * builds DisplayInfo without checking for non-null required values + * @return DisplayInfo + */ + public DisplayInfo buildUnchecked() { + return new DisplayInfoImpl(label, logoUrl, description, payButtonText); + } + + /** + * factory method for an instance of DisplayInfoBuilder + * @return builder + */ + public static DisplayInfoBuilder of() { + return new DisplayInfoBuilder(); + } + + /** + * create builder for DisplayInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DisplayInfoBuilder of(final DisplayInfo template) { + DisplayInfoBuilder builder = new DisplayInfoBuilder(); + builder.label = template.getLabel(); + builder.logoUrl = template.getLogoUrl(); + builder.description = template.getDescription(); + builder.payButtonText = template.getPayButtonText(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoImpl.java new file mode 100644 index 00000000000..2e34d8f01f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoImpl.java @@ -0,0 +1,144 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Display information for the payment integration in the UI.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DisplayInfoImpl implements DisplayInfo, ModelBase { + + private com.commercetools.checkout.models.common.LocalizedString label; + + private com.commercetools.checkout.models.common.LocalizedUrl logoUrl; + + private com.commercetools.checkout.models.common.LocalizedString description; + + private com.commercetools.checkout.models.common.LocalizedString payButtonText; + + /** + * create instance with all properties + */ + @JsonCreator + DisplayInfoImpl(@JsonProperty("label") final com.commercetools.checkout.models.common.LocalizedString label, + @JsonProperty("logoUrl") final com.commercetools.checkout.models.common.LocalizedUrl logoUrl, + @JsonProperty("description") final com.commercetools.checkout.models.common.LocalizedString description, + @JsonProperty("payButtonText") final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.label = label; + this.logoUrl = logoUrl; + this.description = description; + this.payButtonText = payButtonText; + } + + /** + * create empty instance + */ + public DisplayInfoImpl() { + } + + /** + *

    Label of the payment method displayed in the UI.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getLabel() { + return this.label; + } + + /** + *

    Logo of the payment method displayed in the UI.

    + */ + + public com.commercetools.checkout.models.common.LocalizedUrl getLogoUrl() { + return this.logoUrl; + } + + /** + *

    Description of the payment method displayed in the UI.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

    Text of the Pay button displayed in the UI when paying with the payment method.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getPayButtonText() { + return this.payButtonText; + } + + public void setLabel(final com.commercetools.checkout.models.common.LocalizedString label) { + this.label = label; + } + + public void setLogoUrl(final com.commercetools.checkout.models.common.LocalizedUrl logoUrl) { + this.logoUrl = logoUrl; + } + + public void setDescription(final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + } + + public void setPayButtonText(final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.payButtonText = payButtonText; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DisplayInfoImpl that = (DisplayInfoImpl) o; + + return new EqualsBuilder().append(label, that.label) + .append(logoUrl, that.logoUrl) + .append(description, that.description) + .append(payButtonText, that.payButtonText) + .append(label, that.label) + .append(logoUrl, that.logoUrl) + .append(description, that.description) + .append(payButtonText, that.payButtonText) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(label) + .append(logoUrl) + .append(description) + .append(payButtonText) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("label", label) + .append("logoUrl", logoUrl) + .append("description", description) + .append("payButtonText", payButtonText) + .build(); + } + + @Override + public DisplayInfo copyDeep() { + return DisplayInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedBy.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedBy.java new file mode 100644 index 00000000000..cb1b9097513 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedBy.java @@ -0,0 +1,243 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.Reference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Information regarding IDs and references that last modified the Payment Integration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LastModifiedBy lastModifiedBy = LastModifiedBy.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LastModifiedByImpl.class) +public interface LastModifiedBy { + + /** + *

    ID of the API client that last modified the PaymentIntegration.

    + * @return clientId + */ + + @JsonProperty("clientId") + public String getClientId(); + + /** + *

    Session ID associated with the modification of the PaymentIntegration.

    + * @return sessionId + */ + + @JsonProperty("sessionId") + public String getSessionId(); + + /** + *

    External user ID that last modified the PaymentIntegration.

    + * @return externalUserId + */ + + @JsonProperty("externalUserId") + public String getExternalUserId(); + + /** + *

    Anonymous ID if the resource was last modified by an anonymous user.

    + * @return anonymousId + */ + + @JsonProperty("anonymousId") + public String getAnonymousId(); + + /** + *

    Customer reference or customer ID if the resource was last modified by a customer.

    + * @return customer + */ + @Valid + @JsonProperty("customer") + public Reference getCustomer(); + + /** + *

    Associate (customer) reference if the resource was last modified by an associate.

    + * @return associate + */ + @Valid + @JsonProperty("associate") + public Reference getAssociate(); + + /** + *

    User reference if the resource was last modified by a platform user.

    + * @return user + */ + @Valid + @JsonProperty("user") + public Reference getUser(); + + /** + *

    Indicates whether the resource was last modified by a platform client.

    + * @return isPlatformClient + */ + + @JsonProperty("isPlatformClient") + public Boolean getIsPlatformClient(); + + /** + *

    ID of the API client that last modified the PaymentIntegration.

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

    Session ID associated with the modification of the PaymentIntegration.

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

    External user ID that last modified the PaymentIntegration.

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

    Anonymous ID if the resource was last modified by an anonymous user.

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

    Customer reference or customer ID if the resource was last modified by a customer.

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

    Associate (customer) reference if the resource was last modified by an associate.

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

    User reference if the resource was last modified by a platform user.

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

    Indicates whether the resource was last modified by a platform client.

    + * @param isPlatformClient value to be set + */ + + public void setIsPlatformClient(final Boolean isPlatformClient); + + /** + * factory method + * @return instance of LastModifiedBy + */ + public static LastModifiedBy of() { + return new LastModifiedByImpl(); + } + + /** + * factory method to create a shallow copy LastModifiedBy + * @param template instance to be copied + * @return copy instance + */ + public static LastModifiedBy of(final LastModifiedBy template) { + LastModifiedByImpl instance = new LastModifiedByImpl(); + instance.setClientId(template.getClientId()); + instance.setSessionId(template.getSessionId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setAnonymousId(template.getAnonymousId()); + instance.setCustomer(template.getCustomer()); + instance.setAssociate(template.getAssociate()); + instance.setUser(template.getUser()); + instance.setIsPlatformClient(template.getIsPlatformClient()); + return instance; + } + + public LastModifiedBy copyDeep(); + + /** + * factory method to create a deep copy of LastModifiedBy + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LastModifiedBy deepCopy(@Nullable final LastModifiedBy template) { + if (template == null) { + return null; + } + LastModifiedByImpl instance = new LastModifiedByImpl(); + instance.setClientId(template.getClientId()); + instance.setSessionId(template.getSessionId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setAnonymousId(template.getAnonymousId()); + instance.setCustomer(com.commercetools.checkout.models.common.Reference.deepCopy(template.getCustomer())); + instance.setAssociate(com.commercetools.checkout.models.common.Reference.deepCopy(template.getAssociate())); + instance.setUser(com.commercetools.checkout.models.common.Reference.deepCopy(template.getUser())); + instance.setIsPlatformClient(template.getIsPlatformClient()); + return instance; + } + + /** + * builder factory method for LastModifiedBy + * @return builder + */ + public static LastModifiedByBuilder builder() { + return LastModifiedByBuilder.of(); + } + + /** + * create builder for LastModifiedBy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LastModifiedByBuilder builder(final LastModifiedBy template) { + return LastModifiedByBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLastModifiedBy(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByBuilder.java new file mode 100644 index 00000000000..58470bb39e0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByBuilder.java @@ -0,0 +1,299 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * LastModifiedByBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     LastModifiedBy lastModifiedBy = LastModifiedBy.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LastModifiedByBuilder implements Builder { + + @Nullable + private String clientId; + + @Nullable + private String sessionId; + + @Nullable + private String externalUserId; + + @Nullable + private String anonymousId; + + @Nullable + private com.commercetools.checkout.models.common.Reference customer; + + @Nullable + private com.commercetools.checkout.models.common.Reference associate; + + @Nullable + private com.commercetools.checkout.models.common.Reference user; + + @Nullable + private Boolean isPlatformClient; + + /** + *

    ID of the API client that last modified the PaymentIntegration.

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

    Session ID associated with the modification of the PaymentIntegration.

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

    External user ID that last modified the PaymentIntegration.

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

    Anonymous ID if the resource was last modified by an anonymous user.

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

    Customer reference or customer ID if the resource was last modified by a customer.

    + * @param customer value to be set + * @return Builder + */ + + public LastModifiedByBuilder customer(@Nullable final com.commercetools.checkout.models.common.Reference customer) { + this.customer = customer; + return this; + } + + /** + *

    Customer reference or customer ID if the resource was last modified by a customer.

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

    Associate (customer) reference if the resource was last modified by an associate.

    + * @param associate value to be set + * @return Builder + */ + + public LastModifiedByBuilder associate( + @Nullable final com.commercetools.checkout.models.common.Reference associate) { + this.associate = associate; + return this; + } + + /** + *

    Associate (customer) reference if the resource was last modified by an associate.

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

    User reference if the resource was last modified by a platform user.

    + * @param user value to be set + * @return Builder + */ + + public LastModifiedByBuilder user(@Nullable final com.commercetools.checkout.models.common.Reference user) { + this.user = user; + return this; + } + + /** + *

    User reference if the resource was last modified by a platform user.

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

    Indicates whether the resource was last modified by a platform client.

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

    ID of the API client that last modified the PaymentIntegration.

    + * @return clientId + */ + + @Nullable + public String getClientId() { + return this.clientId; + } + + /** + *

    Session ID associated with the modification of the PaymentIntegration.

    + * @return sessionId + */ + + @Nullable + public String getSessionId() { + return this.sessionId; + } + + /** + *

    External user ID that last modified the PaymentIntegration.

    + * @return externalUserId + */ + + @Nullable + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

    Anonymous ID if the resource was last modified by an anonymous user.

    + * @return anonymousId + */ + + @Nullable + public String getAnonymousId() { + return this.anonymousId; + } + + /** + *

    Customer reference or customer ID if the resource was last modified by a customer.

    + * @return customer + */ + + @Nullable + public com.commercetools.checkout.models.common.Reference getCustomer() { + return this.customer; + } + + /** + *

    Associate (customer) reference if the resource was last modified by an associate.

    + * @return associate + */ + + @Nullable + public com.commercetools.checkout.models.common.Reference getAssociate() { + return this.associate; + } + + /** + *

    User reference if the resource was last modified by a platform user.

    + * @return user + */ + + @Nullable + public com.commercetools.checkout.models.common.Reference getUser() { + return this.user; + } + + /** + *

    Indicates whether the resource was last modified by a platform client.

    + * @return isPlatformClient + */ + + @Nullable + public Boolean getIsPlatformClient() { + return this.isPlatformClient; + } + + /** + * builds LastModifiedBy with checking for non-null required values + * @return LastModifiedBy + */ + public LastModifiedBy build() { + return new LastModifiedByImpl(clientId, sessionId, externalUserId, anonymousId, customer, associate, user, + isPlatformClient); + } + + /** + * builds LastModifiedBy without checking for non-null required values + * @return LastModifiedBy + */ + public LastModifiedBy buildUnchecked() { + return new LastModifiedByImpl(clientId, sessionId, externalUserId, anonymousId, customer, associate, user, + isPlatformClient); + } + + /** + * factory method for an instance of LastModifiedByBuilder + * @return builder + */ + public static LastModifiedByBuilder of() { + return new LastModifiedByBuilder(); + } + + /** + * create builder for LastModifiedBy instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LastModifiedByBuilder of(final LastModifiedBy template) { + LastModifiedByBuilder builder = new LastModifiedByBuilder(); + builder.clientId = template.getClientId(); + builder.sessionId = template.getSessionId(); + builder.externalUserId = template.getExternalUserId(); + builder.anonymousId = template.getAnonymousId(); + builder.customer = template.getCustomer(); + builder.associate = template.getAssociate(); + builder.user = template.getUser(); + builder.isPlatformClient = template.getIsPlatformClient(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByImpl.java new file mode 100644 index 00000000000..7b3dc85403c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByImpl.java @@ -0,0 +1,224 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Information regarding IDs and references that last modified the Payment Integration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LastModifiedByImpl implements LastModifiedBy, ModelBase { + + private String clientId; + + private String sessionId; + + private String externalUserId; + + private String anonymousId; + + private com.commercetools.checkout.models.common.Reference customer; + + private com.commercetools.checkout.models.common.Reference associate; + + private com.commercetools.checkout.models.common.Reference user; + + private Boolean isPlatformClient; + + /** + * create instance with all properties + */ + @JsonCreator + LastModifiedByImpl(@JsonProperty("clientId") final String clientId, + @JsonProperty("sessionId") final String sessionId, + @JsonProperty("externalUserId") final String externalUserId, + @JsonProperty("anonymousId") final String anonymousId, + @JsonProperty("customer") final com.commercetools.checkout.models.common.Reference customer, + @JsonProperty("associate") final com.commercetools.checkout.models.common.Reference associate, + @JsonProperty("user") final com.commercetools.checkout.models.common.Reference user, + @JsonProperty("isPlatformClient") final Boolean isPlatformClient) { + this.clientId = clientId; + this.sessionId = sessionId; + this.externalUserId = externalUserId; + this.anonymousId = anonymousId; + this.customer = customer; + this.associate = associate; + this.user = user; + this.isPlatformClient = isPlatformClient; + } + + /** + * create empty instance + */ + public LastModifiedByImpl() { + } + + /** + *

    ID of the API client that last modified the PaymentIntegration.

    + */ + + public String getClientId() { + return this.clientId; + } + + /** + *

    Session ID associated with the modification of the PaymentIntegration.

    + */ + + public String getSessionId() { + return this.sessionId; + } + + /** + *

    External user ID that last modified the PaymentIntegration.

    + */ + + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

    Anonymous ID if the resource was last modified by an anonymous user.

    + */ + + public String getAnonymousId() { + return this.anonymousId; + } + + /** + *

    Customer reference or customer ID if the resource was last modified by a customer.

    + */ + + public com.commercetools.checkout.models.common.Reference getCustomer() { + return this.customer; + } + + /** + *

    Associate (customer) reference if the resource was last modified by an associate.

    + */ + + public com.commercetools.checkout.models.common.Reference getAssociate() { + return this.associate; + } + + /** + *

    User reference if the resource was last modified by a platform user.

    + */ + + public com.commercetools.checkout.models.common.Reference getUser() { + return this.user; + } + + /** + *

    Indicates whether the resource was last modified by a platform client.

    + */ + + public Boolean getIsPlatformClient() { + return this.isPlatformClient; + } + + public void setClientId(final String clientId) { + this.clientId = clientId; + } + + public void setSessionId(final String sessionId) { + this.sessionId = sessionId; + } + + public void setExternalUserId(final String externalUserId) { + this.externalUserId = externalUserId; + } + + public void setAnonymousId(final String anonymousId) { + this.anonymousId = anonymousId; + } + + public void setCustomer(final com.commercetools.checkout.models.common.Reference customer) { + this.customer = customer; + } + + public void setAssociate(final com.commercetools.checkout.models.common.Reference associate) { + this.associate = associate; + } + + public void setUser(final com.commercetools.checkout.models.common.Reference user) { + this.user = user; + } + + public void setIsPlatformClient(final Boolean isPlatformClient) { + this.isPlatformClient = isPlatformClient; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LastModifiedByImpl that = (LastModifiedByImpl) o; + + return new EqualsBuilder().append(clientId, that.clientId) + .append(sessionId, that.sessionId) + .append(externalUserId, that.externalUserId) + .append(anonymousId, that.anonymousId) + .append(customer, that.customer) + .append(associate, that.associate) + .append(user, that.user) + .append(isPlatformClient, that.isPlatformClient) + .append(clientId, that.clientId) + .append(sessionId, that.sessionId) + .append(externalUserId, that.externalUserId) + .append(anonymousId, that.anonymousId) + .append(customer, that.customer) + .append(associate, that.associate) + .append(user, that.user) + .append(isPlatformClient, that.isPlatformClient) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(clientId) + .append(sessionId) + .append(externalUserId) + .append(anonymousId) + .append(customer) + .append(associate) + .append(user) + .append(isPlatformClient) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("clientId", clientId) + .append("sessionId", sessionId) + .append("externalUserId", externalUserId) + .append("anonymousId", anonymousId) + .append("customer", customer) + .append("associate", associate) + .append("user", user) + .append("isPlatformClient", isPlatformClient) + .build(); + } + + @Override + public LastModifiedBy copyDeep() { + return LastModifiedBy.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegration.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegration.java new file mode 100644 index 00000000000..ba4be23e372 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegration.java @@ -0,0 +1,211 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    Paginated result containing PaymentIntegrations.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaginatedPaymentIntegration paginatedPaymentIntegration = PaginatedPaymentIntegration.builder()
    + *             .limit(1)
    + *             .offset(1)
    + *             .count(1)
    + *             .total(1)
    + *             .plusResults(resultsBuilder -> resultsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaginatedPaymentIntegrationImpl.class) +public interface PaginatedPaymentIntegration { + + /** + *

    Number of results requested.

    + * @return limit + */ + @NotNull + @JsonProperty("limit") + public Integer getLimit(); + + /** + *

    Number of elements skipped.

    + * @return offset + */ + @NotNull + @JsonProperty("offset") + public Integer getOffset(); + + /** + *

    Actual number of results returned.

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

    Total number of results matching the query.

    + * @return total + */ + @NotNull + @JsonProperty("total") + public Integer getTotal(); + + /** + *

    PaymentIntegrations matching the query.

    + * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

    Number of results requested.

    + * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *

    Number of elements skipped.

    + * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + *

    Actual number of results returned.

    + * @param count value to be set + */ + + public void setCount(final Integer count); + + /** + *

    Total number of results matching the query.

    + * @param total value to be set + */ + + public void setTotal(final Integer total); + + /** + *

    PaymentIntegrations matching the query.

    + * @param results values to be set + */ + + @JsonIgnore + public void setResults(final PaymentIntegration... results); + + /** + *

    PaymentIntegrations matching the query.

    + * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of PaginatedPaymentIntegration + */ + public static PaginatedPaymentIntegration of() { + return new PaginatedPaymentIntegrationImpl(); + } + + /** + * factory method to create a shallow copy PaginatedPaymentIntegration + * @param template instance to be copied + * @return copy instance + */ + public static PaginatedPaymentIntegration of(final PaginatedPaymentIntegration template) { + PaginatedPaymentIntegrationImpl instance = new PaginatedPaymentIntegrationImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(template.getResults()); + return instance; + } + + public PaginatedPaymentIntegration copyDeep(); + + /** + * factory method to create a deep copy of PaginatedPaymentIntegration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaginatedPaymentIntegration deepCopy(@Nullable final PaginatedPaymentIntegration template) { + if (template == null) { + return null; + } + PaginatedPaymentIntegrationImpl instance = new PaginatedPaymentIntegrationImpl(); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setCount(template.getCount()); + instance.setTotal(template.getTotal()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.checkout.models.payment_integration.PaymentIntegration::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for PaginatedPaymentIntegration + * @return builder + */ + public static PaginatedPaymentIntegrationBuilder builder() { + return PaginatedPaymentIntegrationBuilder.of(); + } + + /** + * create builder for PaginatedPaymentIntegration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaginatedPaymentIntegrationBuilder builder(final PaginatedPaymentIntegration template) { + return PaginatedPaymentIntegrationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaginatedPaymentIntegration(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationBuilder.java new file mode 100644 index 00000000000..fd4e1da6421 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationBuilder.java @@ -0,0 +1,267 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaginatedPaymentIntegrationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaginatedPaymentIntegration paginatedPaymentIntegration = PaginatedPaymentIntegration.builder()
    + *             .limit(1)
    + *             .offset(1)
    + *             .count(1)
    + *             .total(1)
    + *             .plusResults(resultsBuilder -> resultsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaginatedPaymentIntegrationBuilder implements Builder { + + private Integer limit; + + private Integer offset; + + private Integer count; + + private Integer total; + + private java.util.List results; + + /** + *

    Number of results requested.

    + * @param limit value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder limit(final Integer limit) { + this.limit = limit; + return this; + } + + /** + *

    Number of elements skipped.

    + * @param offset value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder offset(final Integer offset) { + this.offset = offset; + return this; + } + + /** + *

    Actual number of results returned.

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

    Total number of results matching the query.

    + * @param total value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder total(final Integer total) { + this.total = total; + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder results( + final com.commercetools.checkout.models.payment_integration.PaymentIntegration... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder results( + final java.util.List results) { + this.results = results; + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param results value to be set + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder plusResults( + final com.commercetools.checkout.models.payment_integration.PaymentIntegration... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results + .add(builder.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationBuilder.of()) + .build()); + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results + .add(builder.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationBuilder.of()) + .build()); + return this; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder addResults( + Function builder) { + return plusResults( + builder.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationBuilder.of())); + } + + /** + *

    PaymentIntegrations matching the query.

    + * @param builder function to build the results value + * @return Builder + */ + + public PaginatedPaymentIntegrationBuilder setResults( + Function builder) { + return results( + builder.apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationBuilder.of())); + } + + /** + *

    Number of results requested.

    + * @return limit + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

    Number of elements skipped.

    + * @return offset + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

    Actual number of results returned.

    + * @return count + */ + + public Integer getCount() { + return this.count; + } + + /** + *

    Total number of results matching the query.

    + * @return total + */ + + public Integer getTotal() { + return this.total; + } + + /** + *

    PaymentIntegrations matching the query.

    + * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds PaginatedPaymentIntegration with checking for non-null required values + * @return PaginatedPaymentIntegration + */ + public PaginatedPaymentIntegration build() { + Objects.requireNonNull(limit, PaginatedPaymentIntegration.class + ": limit is missing"); + Objects.requireNonNull(offset, PaginatedPaymentIntegration.class + ": offset is missing"); + Objects.requireNonNull(count, PaginatedPaymentIntegration.class + ": count is missing"); + Objects.requireNonNull(total, PaginatedPaymentIntegration.class + ": total is missing"); + Objects.requireNonNull(results, PaginatedPaymentIntegration.class + ": results is missing"); + return new PaginatedPaymentIntegrationImpl(limit, offset, count, total, results); + } + + /** + * builds PaginatedPaymentIntegration without checking for non-null required values + * @return PaginatedPaymentIntegration + */ + public PaginatedPaymentIntegration buildUnchecked() { + return new PaginatedPaymentIntegrationImpl(limit, offset, count, total, results); + } + + /** + * factory method for an instance of PaginatedPaymentIntegrationBuilder + * @return builder + */ + public static PaginatedPaymentIntegrationBuilder of() { + return new PaginatedPaymentIntegrationBuilder(); + } + + /** + * create builder for PaginatedPaymentIntegration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaginatedPaymentIntegrationBuilder of(final PaginatedPaymentIntegration template) { + PaginatedPaymentIntegrationBuilder builder = new PaginatedPaymentIntegrationBuilder(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.count = template.getCount(); + builder.total = template.getTotal(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationImpl.java new file mode 100644 index 00000000000..cb0b5853230 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationImpl.java @@ -0,0 +1,168 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Paginated result containing PaymentIntegrations.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaginatedPaymentIntegrationImpl implements PaginatedPaymentIntegration, ModelBase { + + private Integer limit; + + private Integer offset; + + private Integer count; + + private Integer total; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + PaginatedPaymentIntegrationImpl(@JsonProperty("limit") final Integer limit, + @JsonProperty("offset") final Integer offset, @JsonProperty("count") final Integer count, + @JsonProperty("total") final Integer total, + @JsonProperty("results") final java.util.List results) { + this.limit = limit; + this.offset = offset; + this.count = count; + this.total = total; + this.results = results; + } + + /** + * create empty instance + */ + public PaginatedPaymentIntegrationImpl() { + } + + /** + *

    Number of results requested.

    + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

    Number of elements skipped.

    + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

    Actual number of results returned.

    + */ + + public Integer getCount() { + return this.count; + } + + /** + *

    Total number of results matching the query.

    + */ + + public Integer getTotal() { + return this.total; + } + + /** + *

    PaymentIntegrations matching the query.

    + */ + + public java.util.List getResults() { + return this.results; + } + + public void setLimit(final Integer limit) { + this.limit = limit; + } + + public void setOffset(final Integer offset) { + this.offset = offset; + } + + public void setCount(final Integer count) { + this.count = count; + } + + public void setTotal(final Integer total) { + this.total = total; + } + + public void setResults(final com.commercetools.checkout.models.payment_integration.PaymentIntegration... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + } + + public void setResults( + final java.util.List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaginatedPaymentIntegrationImpl that = (PaginatedPaymentIntegrationImpl) o; + + return new EqualsBuilder().append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .append(limit, that.limit) + .append(offset, that.offset) + .append(count, that.count) + .append(total, that.total) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(limit) + .append(offset) + .append(count) + .append(total) + .append(results) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) + .append("offset", offset) + .append("count", count) + .append("total", total) + .append("results", results) + .build(); + } + + @Override + public PaginatedPaymentIntegration copyDeep() { + return PaginatedPaymentIntegration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentComponentType.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentComponentType.java new file mode 100644 index 00000000000..bcf1dd6bdfb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentComponentType.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.payment_integration; + +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; + +/** + * PaymentComponentType + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentComponentType extends JsonEnum { + + /** +

    Each payment method component renders just a single payment method.

    */ + PaymentComponentType COMPONENT = PaymentComponentTypeEnum.COMPONENT; + /** +

    A component that renders all the payment methods.

    */ + PaymentComponentType DROP_IN = PaymentComponentTypeEnum.DROP_IN; + + /** + * possible values of PaymentComponentType + */ + enum PaymentComponentTypeEnum implements PaymentComponentType { + /** + * Component + */ + COMPONENT("Component"), + + /** + * DropIn + */ + DROP_IN("DropIn"); + private final String jsonName; + + private PaymentComponentTypeEnum(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 PaymentComponentType + * 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 PaymentComponentType findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PaymentComponentType() { + @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 PaymentComponentType[] values() { + return PaymentComponentTypeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegration.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegration.java new file mode 100644 index 00000000000..b73499457f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegration.java @@ -0,0 +1,420 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.application.ApplicationReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * PaymentIntegration + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegration paymentIntegration = PaymentIntegration.builder()
    + *             .id("{id}")
    + *             .version(0.3)
    + *             .application(applicationBuilder -> applicationBuilder)
    + *             .type("{type}")
    + *             .name("{name}")
    + *             .componentType(PaymentComponentType.COMPONENT)
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationImpl.class) +public interface PaymentIntegration { + + /** + *

    Unique identifier of the PaymentIntegration.

    + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

    Current version of the PaymentIntegration.

    + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @return application + */ + @NotNull + @Valid + @JsonProperty("application") + public ApplicationReference getApplication(); + + /** + *

    Indicates whether the Payment Integration is active or not.

    + * @return status + */ + + @JsonProperty("status") + public PaymentIntegrationStatus getStatus(); + + /** + *

    Type of the PaymentIntegration, for example, card, Paypal, or Applepay. This field must be same as used by the payment service provider (PSP) and must be supported by the Connector.

    + *

    Use drop-in for drop-in Payment Integrations.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + * @return predicate + */ + + @JsonProperty("predicate") + public String getPredicate(); + + /** + *

    Indicates the component type of Payment Integration.

    + * @return componentType + */ + @NotNull + @JsonProperty("componentType") + public PaymentComponentType getComponentType(); + + /** + *

    Connector deployment info for the Payment Integration.

    + * @return connectorDeployment + */ + @NotNull + @Valid + @JsonProperty("connectorDeployment") + public ConnectorDeploymentReference getConnectorDeployment(); + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @return displayInfo + */ + @Valid + @JsonProperty("displayInfo") + public DisplayInfo getDisplayInfo(); + + /** + *

    Sorting information of the Payment Integration.

    + * @return sortingInfo + */ + @Valid + @JsonProperty("sortingInfo") + public SortingInfo getSortingInfo(); + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @return automatedReversalConfiguration + */ + @Valid + @JsonProperty("automatedReversalConfiguration") + public AutomatedReversalConfiguration getAutomatedReversalConfiguration(); + + /** + *

    Date and time (UTC) the PaymentIntegration was initially created.

    + * @return createdAt + */ + @NotNull + @JsonProperty("createdAt") + public ZonedDateTime getCreatedAt(); + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @return createdBy + */ + @Valid + @JsonProperty("createdBy") + public CreatedBy getCreatedBy(); + + /** + *

    Date and time (UTC) the PaymentIntegration was last updated.

    + * @return lastModifiedAt + */ + @NotNull + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @return lastModifiedBy + */ + @Valid + @JsonProperty("lastModifiedBy") + public LastModifiedBy getLastModifiedBy(); + + /** + *

    Unique identifier of the PaymentIntegration.

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

    Current version of the PaymentIntegration.

    + * @param version value to be set + */ + + public void setVersion(final Long version); + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @param application value to be set + */ + + public void setApplication(final ApplicationReference application); + + /** + *

    Indicates whether the Payment Integration is active or not.

    + * @param status value to be set + */ + + public void setStatus(final PaymentIntegrationStatus status); + + /** + *

    Type of the PaymentIntegration, for example, card, Paypal, or Applepay. This field must be same as used by the payment service provider (PSP) and must be supported by the Connector.

    + *

    Use drop-in for drop-in Payment Integrations.

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

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

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

    Indicates the component type of Payment Integration.

    + * @param componentType value to be set + */ + + public void setComponentType(final PaymentComponentType componentType); + + /** + *

    Connector deployment info for the Payment Integration.

    + * @param connectorDeployment value to be set + */ + + public void setConnectorDeployment(final ConnectorDeploymentReference connectorDeployment); + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param displayInfo value to be set + */ + + public void setDisplayInfo(final DisplayInfo displayInfo); + + /** + *

    Sorting information of the Payment Integration.

    + * @param sortingInfo value to be set + */ + + public void setSortingInfo(final SortingInfo sortingInfo); + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @param automatedReversalConfiguration value to be set + */ + + public void setAutomatedReversalConfiguration(final AutomatedReversalConfiguration automatedReversalConfiguration); + + /** + *

    Date and time (UTC) the PaymentIntegration was initially created.

    + * @param createdAt value to be set + */ + + public void setCreatedAt(final ZonedDateTime createdAt); + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @param createdBy value to be set + */ + + public void setCreatedBy(final CreatedBy createdBy); + + /** + *

    Date and time (UTC) the PaymentIntegration was last updated.

    + * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @param lastModifiedBy value to be set + */ + + public void setLastModifiedBy(final LastModifiedBy lastModifiedBy); + + /** + * factory method + * @return instance of PaymentIntegration + */ + public static PaymentIntegration of() { + return new PaymentIntegrationImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegration + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegration of(final PaymentIntegration template) { + PaymentIntegrationImpl instance = new PaymentIntegrationImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setKey(template.getKey()); + instance.setApplication(template.getApplication()); + instance.setStatus(template.getStatus()); + instance.setType(template.getType()); + instance.setName(template.getName()); + instance.setPredicate(template.getPredicate()); + instance.setComponentType(template.getComponentType()); + instance.setConnectorDeployment(template.getConnectorDeployment()); + instance.setDisplayInfo(template.getDisplayInfo()); + instance.setSortingInfo(template.getSortingInfo()); + instance.setAutomatedReversalConfiguration(template.getAutomatedReversalConfiguration()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + return instance; + } + + public PaymentIntegration copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegration + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegration deepCopy(@Nullable final PaymentIntegration template) { + if (template == null) { + return null; + } + PaymentIntegrationImpl instance = new PaymentIntegrationImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setKey(template.getKey()); + instance.setApplication( + com.commercetools.checkout.models.application.ApplicationReference.deepCopy(template.getApplication())); + instance.setStatus(template.getStatus()); + instance.setType(template.getType()); + instance.setName(template.getName()); + instance.setPredicate(template.getPredicate()); + instance.setComponentType(template.getComponentType()); + instance.setConnectorDeployment( + com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference + .deepCopy(template.getConnectorDeployment())); + instance.setDisplayInfo( + com.commercetools.checkout.models.payment_integration.DisplayInfo.deepCopy(template.getDisplayInfo())); + instance.setSortingInfo( + com.commercetools.checkout.models.payment_integration.SortingInfo.deepCopy(template.getSortingInfo())); + instance.setAutomatedReversalConfiguration( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration + .deepCopy(template.getAutomatedReversalConfiguration())); + instance.setCreatedAt(template.getCreatedAt()); + instance.setCreatedBy( + com.commercetools.checkout.models.payment_integration.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(com.commercetools.checkout.models.payment_integration.LastModifiedBy + .deepCopy(template.getLastModifiedBy())); + return instance; + } + + /** + * builder factory method for PaymentIntegration + * @return builder + */ + public static PaymentIntegrationBuilder builder() { + return PaymentIntegrationBuilder.of(); + } + + /** + * create builder for PaymentIntegration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationBuilder builder(final PaymentIntegration template) { + return PaymentIntegrationBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegration(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationBuilder.java new file mode 100644 index 00000000000..3e18c27c032 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationBuilder.java @@ -0,0 +1,682 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegration paymentIntegration = PaymentIntegration.builder()
    + *             .id("{id}")
    + *             .version(0.3)
    + *             .application(applicationBuilder -> applicationBuilder)
    + *             .type("{type}")
    + *             .name("{name}")
    + *             .componentType(PaymentComponentType.COMPONENT)
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationBuilder implements Builder { + + private String id; + + private Long version; + + @Nullable + private String key; + + private com.commercetools.checkout.models.application.ApplicationReference application; + + @Nullable + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + private String type; + + private String name; + + @Nullable + private String predicate; + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType; + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + @Nullable + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + @Nullable + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + @Nullable + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + private java.time.ZonedDateTime createdAt; + + @Nullable + private com.commercetools.checkout.models.payment_integration.CreatedBy createdBy; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy; + + /** + *

    Unique identifier of the PaymentIntegration.

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

    Current version of the PaymentIntegration.

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

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @param builder function to build the application value + * @return Builder + */ + + public PaymentIntegrationBuilder application( + Function builder) { + this.application = builder.apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

    Reference to an Application associated with the PaymentIntegration.

    + * @param builder function to build the application value + * @return Builder + */ + + public PaymentIntegrationBuilder withApplication( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()); + return this; + } + + /** + *

    Reference to an Application associated with the PaymentIntegration.

    + * @param application value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder application( + final com.commercetools.checkout.models.application.ApplicationReference application) { + this.application = application; + return this; + } + + /** + *

    Indicates whether the Payment Integration is active or not.

    + * @param status value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder status( + @Nullable final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + return this; + } + + /** + *

    Type of the PaymentIntegration, for example, card, Paypal, or Applepay. This field must be same as used by the payment service provider (PSP) and must be supported by the Connector.

    + *

    Use drop-in for drop-in Payment Integrations.

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

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

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

    Indicates the component type of Payment Integration.

    + * @param componentType value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder componentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType) { + this.componentType = componentType; + return this; + } + + /** + *

    Connector deployment info for the Payment Integration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public PaymentIntegrationBuilder connectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

    Connector deployment info for the Payment Integration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public PaymentIntegrationBuilder withConnectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()); + return this; + } + + /** + *

    Connector deployment info for the Payment Integration.

    + * @param connectorDeployment value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder connectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public PaymentIntegrationBuilder displayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public PaymentIntegrationBuilder withDisplayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()); + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param displayInfo value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder displayInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + return this; + } + + /** + *

    Sorting information of the Payment Integration.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public PaymentIntegrationBuilder sortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Sorting information of the Payment Integration.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public PaymentIntegrationBuilder withSortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()); + return this; + } + + /** + *

    Sorting information of the Payment Integration.

    + * @param sortingInfo value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder sortingInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + return this; + } + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public PaymentIntegrationBuilder automatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder + .apply(com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public PaymentIntegrationBuilder withAutomatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder.apply( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()); + return this; + } + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @param automatedReversalConfiguration value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder automatedReversalConfiguration( + @Nullable final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + return this; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was initially created.

    + * @param createdAt value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @param builder function to build the createdBy value + * @return Builder + */ + + public PaymentIntegrationBuilder createdBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.checkout.models.payment_integration.CreatedByBuilder.of()) + .build(); + return this; + } + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @param builder function to build the createdBy value + * @return Builder + */ + + public PaymentIntegrationBuilder withCreatedBy( + Function builder) { + this.createdBy = builder.apply(com.commercetools.checkout.models.payment_integration.CreatedByBuilder.of()); + return this; + } + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @param createdBy value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder createdBy( + @Nullable final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was last updated.

    + * @param lastModifiedAt value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public PaymentIntegrationBuilder lastModifiedBy( + Function builder) { + this.lastModifiedBy = builder + .apply(com.commercetools.checkout.models.payment_integration.LastModifiedByBuilder.of()) + .build(); + return this; + } + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @param builder function to build the lastModifiedBy value + * @return Builder + */ + + public PaymentIntegrationBuilder withLastModifiedBy( + Function builder) { + this.lastModifiedBy = builder + .apply(com.commercetools.checkout.models.payment_integration.LastModifiedByBuilder.of()); + return this; + } + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @param lastModifiedBy value to be set + * @return Builder + */ + + public PaymentIntegrationBuilder lastModifiedBy( + @Nullable final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + return this; + } + + /** + *

    Unique identifier of the PaymentIntegration.

    + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

    Current version of the PaymentIntegration.

    + * @return version + */ + + public Long getVersion() { + return this.version; + } + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @return application + */ + + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { + return this.application; + } + + /** + *

    Indicates whether the Payment Integration is active or not.

    + * @return status + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + /** + *

    Type of the PaymentIntegration, for example, card, Paypal, or Applepay. This field must be same as used by the payment service provider (PSP) and must be supported by the Connector.

    + *

    Use drop-in for drop-in Payment Integrations.

    + * @return type + */ + + public String getType() { + return this.type; + } + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + * @return predicate + */ + + @Nullable + public String getPredicate() { + return this.predicate; + } + + /** + *

    Indicates the component type of Payment Integration.

    + * @return componentType + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getComponentType() { + return this.componentType; + } + + /** + *

    Connector deployment info for the Payment Integration.

    + * @return connectorDeployment + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @return displayInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + /** + *

    Sorting information of the Payment Integration.

    + * @return sortingInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + * @return automatedReversalConfiguration + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was initially created.

    + * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

    IDs and references that created the PaymentIntegration.

    + * @return createdBy + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was last updated.

    + * @return lastModifiedAt + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + * @return lastModifiedBy + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + /** + * builds PaymentIntegration with checking for non-null required values + * @return PaymentIntegration + */ + public PaymentIntegration build() { + Objects.requireNonNull(id, PaymentIntegration.class + ": id is missing"); + Objects.requireNonNull(version, PaymentIntegration.class + ": version is missing"); + Objects.requireNonNull(application, PaymentIntegration.class + ": application is missing"); + Objects.requireNonNull(type, PaymentIntegration.class + ": type is missing"); + Objects.requireNonNull(name, PaymentIntegration.class + ": name is missing"); + Objects.requireNonNull(componentType, PaymentIntegration.class + ": componentType is missing"); + Objects.requireNonNull(connectorDeployment, PaymentIntegration.class + ": connectorDeployment is missing"); + Objects.requireNonNull(createdAt, PaymentIntegration.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, PaymentIntegration.class + ": lastModifiedAt is missing"); + return new PaymentIntegrationImpl(id, version, key, application, status, type, name, predicate, componentType, + connectorDeployment, displayInfo, sortingInfo, automatedReversalConfiguration, createdAt, createdBy, + lastModifiedAt, lastModifiedBy); + } + + /** + * builds PaymentIntegration without checking for non-null required values + * @return PaymentIntegration + */ + public PaymentIntegration buildUnchecked() { + return new PaymentIntegrationImpl(id, version, key, application, status, type, name, predicate, componentType, + connectorDeployment, displayInfo, sortingInfo, automatedReversalConfiguration, createdAt, createdBy, + lastModifiedAt, lastModifiedBy); + } + + /** + * factory method for an instance of PaymentIntegrationBuilder + * @return builder + */ + public static PaymentIntegrationBuilder of() { + return new PaymentIntegrationBuilder(); + } + + /** + * create builder for PaymentIntegration instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationBuilder of(final PaymentIntegration template) { + PaymentIntegrationBuilder builder = new PaymentIntegrationBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.key = template.getKey(); + builder.application = template.getApplication(); + builder.status = template.getStatus(); + builder.type = template.getType(); + builder.name = template.getName(); + builder.predicate = template.getPredicate(); + builder.componentType = template.getComponentType(); + builder.connectorDeployment = template.getConnectorDeployment(); + builder.displayInfo = template.getDisplayInfo(); + builder.sortingInfo = template.getSortingInfo(); + builder.automatedReversalConfiguration = template.getAutomatedReversalConfiguration(); + builder.createdAt = template.getCreatedAt(); + builder.createdBy = template.getCreatedBy(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationImpl.java new file mode 100644 index 00000000000..f4fbd3c66a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationImpl.java @@ -0,0 +1,407 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * PaymentIntegration + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationImpl implements PaymentIntegration, ModelBase { + + private String id; + + private Long version; + + private String key; + + private com.commercetools.checkout.models.application.ApplicationReference application; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + private String type; + + private String name; + + private String predicate; + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType; + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + private java.time.ZonedDateTime createdAt; + + private com.commercetools.checkout.models.payment_integration.CreatedBy createdBy; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("key") final String key, + @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationReference application, + @JsonProperty("status") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status, + @JsonProperty("type") final String type, @JsonProperty("name") final String name, + @JsonProperty("predicate") final String predicate, + @JsonProperty("componentType") final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType, + @JsonProperty("connectorDeployment") final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment, + @JsonProperty("displayInfo") final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo, + @JsonProperty("sortingInfo") final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo, + @JsonProperty("automatedReversalConfiguration") final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("createdBy") final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.id = id; + this.version = version; + this.key = key; + this.application = application; + this.status = status; + this.type = type; + this.name = name; + this.predicate = predicate; + this.componentType = componentType; + this.connectorDeployment = connectorDeployment; + this.displayInfo = displayInfo; + this.sortingInfo = sortingInfo; + this.automatedReversalConfiguration = automatedReversalConfiguration; + this.createdAt = createdAt; + this.createdBy = createdBy; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + } + + /** + * create empty instance + */ + public PaymentIntegrationImpl() { + } + + /** + *

    Unique identifier of the PaymentIntegration.

    + */ + + public String getId() { + return this.id; + } + + /** + *

    Current version of the PaymentIntegration.

    + */ + + public Long getVersion() { + return this.version; + } + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { + return this.application; + } + + /** + *

    Indicates whether the Payment Integration is active or not.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + /** + *

    Type of the PaymentIntegration, for example, card, Paypal, or Applepay. This field must be same as used by the payment service provider (PSP) and must be supported by the Connector.

    + *

    Use drop-in for drop-in Payment Integrations.

    + */ + + public String getType() { + return this.type; + } + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + */ + + public String getPredicate() { + return this.predicate; + } + + /** + *

    Indicates the component type of Payment Integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getComponentType() { + return this.componentType; + } + + /** + *

    Connector deployment info for the Payment Integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + */ + + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + /** + *

    Sorting information of the Payment Integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + /** + *

    Configuration of the Payment Integration automatic reversal.

    + */ + + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was initially created.

    + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *

    IDs and references that created the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.payment_integration.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *

    Date and time (UTC) the PaymentIntegration was last updated.

    + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

    IDs and references that last modified the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.payment_integration.LastModifiedBy getLastModifiedBy() { + return this.lastModifiedBy; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setApplication(final com.commercetools.checkout.models.application.ApplicationReference application) { + this.application = application; + } + + public void setStatus(final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + } + + public void setType(final String type) { + this.type = type; + } + + public void setName(final String name) { + this.name = name; + } + + public void setPredicate(final String predicate) { + this.predicate = predicate; + } + + public void setComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType) { + this.componentType = componentType; + } + + public void setConnectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + } + + public void setDisplayInfo(final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + } + + public void setSortingInfo(final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + } + + public void setAutomatedReversalConfiguration( + final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setCreatedBy(final com.commercetools.checkout.models.payment_integration.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy( + final com.commercetools.checkout.models.payment_integration.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationImpl that = (PaymentIntegrationImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(key, that.key) + .append(application, that.application) + .append(status, that.status) + .append(type, that.type) + .append(name, that.name) + .append(predicate, that.predicate) + .append(componentType, that.componentType) + .append(connectorDeployment, that.connectorDeployment) + .append(displayInfo, that.displayInfo) + .append(sortingInfo, that.sortingInfo) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .append(createdAt, that.createdAt) + .append(createdBy, that.createdBy) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(id, that.id) + .append(version, that.version) + .append(key, that.key) + .append(application, that.application) + .append(status, that.status) + .append(type, that.type) + .append(name, that.name) + .append(predicate, that.predicate) + .append(componentType, that.componentType) + .append(connectorDeployment, that.connectorDeployment) + .append(displayInfo, that.displayInfo) + .append(sortingInfo, that.sortingInfo) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .append(createdAt, that.createdAt) + .append(createdBy, that.createdBy) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(key) + .append(application) + .append(status) + .append(type) + .append(name) + .append(predicate) + .append(componentType) + .append(connectorDeployment) + .append(displayInfo) + .append(sortingInfo) + .append(automatedReversalConfiguration) + .append(createdAt) + .append(createdBy) + .append(lastModifiedAt) + .append(lastModifiedBy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("key", key) + .append("application", application) + .append("status", status) + .append("type", type) + .append("name", name) + .append("predicate", predicate) + .append("componentType", componentType) + .append("connectorDeployment", connectorDeployment) + .append("displayInfo", displayInfo) + .append("sortingInfo", sortingInfo) + .append("automatedReversalConfiguration", automatedReversalConfiguration) + .append("createdAt", createdAt) + .append("createdBy", createdBy) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .build(); + } + + @Override + public PaymentIntegration copyDeep() { + return PaymentIntegration.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java index e0fd7d0f306..a33b2e51c8a 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReference.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - *

    Reference to a Payment Integration.

    + *

    Reference to a Payment Integration.

    * *
    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java index cd36d54eee7..22157dee641 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationReferenceImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Reference to a Payment Integration.

    + *

    Reference to a Payment Integration.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class PaymentIntegrationReferenceImpl implements PaymentIntegrationReference, ModelBase { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java index 0f114eed547..35469c6cbbe 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifier.java @@ -14,7 +14,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

    Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    + *

    Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    * *
    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java index 7fba8230b58..cb4a1425981 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationResourceIdentifierImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

    Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    + *

    Resource identifier to a Payment Integration. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class PaymentIntegrationResourceIdentifierImpl implements PaymentIntegrationResourceIdentifier, ModelBase { @@ -48,7 +48,7 @@ public PaymentIntegrationResourceIdentifierImpl() { } /** - *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    + *

    Type of referenced resource. If given, it must match the expected ReferenceTypeId of the referenced resource.

    */ public com.commercetools.checkout.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationStatus.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationStatus.java new file mode 100644 index 00000000000..572adcae752 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationStatus.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.payment_integration; + +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; + +/** + * PaymentIntegrationStatus + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentIntegrationStatus extends JsonEnum { + + /** +

    The Payment Integration is active and can be used for processing payments.

    */ + PaymentIntegrationStatus ACTIVE = PaymentIntegrationStatusEnum.ACTIVE; + /** +

    The Payment Integration is inactive and cannot be used for processing payments.

    */ + PaymentIntegrationStatus INACTIVE = PaymentIntegrationStatusEnum.INACTIVE; + + /** + * possible values of PaymentIntegrationStatus + */ + enum PaymentIntegrationStatusEnum implements PaymentIntegrationStatus { + /** + * Active + */ + ACTIVE("Active"), + + /** + * Inactive + */ + INACTIVE("Inactive"); + private final String jsonName; + + private PaymentIntegrationStatusEnum(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 PaymentIntegrationStatus + * 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 PaymentIntegrationStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PaymentIntegrationStatus() { + @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 PaymentIntegrationStatus[] values() { + return PaymentIntegrationStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationType.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationType.java new file mode 100644 index 00000000000..18fda944369 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationType.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.payment_integration; + +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; + +/** + * PaymentIntegrationType + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentIntegrationType extends JsonEnum { + + /** +

    The integration is with a Payment provider.

    */ + PaymentIntegrationType PSP = PaymentIntegrationTypeEnum.PSP; + /** +

    The integration is with a Gift card provider.

    */ + PaymentIntegrationType GIFT_CARD = PaymentIntegrationTypeEnum.GIFT_CARD; + + /** + * possible values of PaymentIntegrationType + */ + enum PaymentIntegrationTypeEnum implements PaymentIntegrationType { + /** + * Psp + */ + PSP("Psp"), + + /** + * GiftCard + */ + GIFT_CARD("GiftCard"); + private final String jsonName; + + private PaymentIntegrationTypeEnum(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 PaymentIntegrationType + * 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 PaymentIntegrationType findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PaymentIntegrationType() { + @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 PaymentIntegrationType[] values() { + return PaymentIntegrationTypeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateAction.java new file mode 100644 index 00000000000..5c429804641 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateAction.java @@ -0,0 +1,208 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Base type for all PaymentIntegration update actions.

    + * + *
    + * Example to create a subtype instance using the builder pattern + *
    + *
    
    + *     PaymentIntegrationUpdateAction paymentIntegrationUpdateAction = PaymentIntegrationUpdateAction.setAutomatedReversalConfigurationPredicateBuilder()
    + *             .build()
    + * 
    + *
    + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = PaymentIntegrationUpdateActionImpl.class, visible = true) +@JsonDeserialize(as = PaymentIntegrationUpdateActionImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PaymentIntegrationUpdateAction { + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + * @return action + */ + @NotNull + @JsonProperty("action") + public String getAction(); + + public PaymentIntegrationUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationUpdateAction deepCopy(@Nullable final PaymentIntegrationUpdateAction template) { + if (template == null) { + return null; + } + + if (!(template instanceof PaymentIntegrationUpdateActionImpl)) { + return template.copyDeep(); + } + PaymentIntegrationUpdateActionImpl instance = new PaymentIntegrationUpdateActionImpl(); + return instance; + } + + /** + * builder for setAutomatedReversalConfigurationPredicate subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationPredicateUpdateActionBuilder setAutomatedReversalConfigurationPredicateBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationPredicateUpdateActionBuilder + .of(); + } + + /** + * builder for setAutomatedReversalConfigurationStatus subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationStatusUpdateActionBuilder setAutomatedReversalConfigurationStatusBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationStatusUpdateActionBuilder + .of(); + } + + /** + * builder for setAutomatedReversalConfiguration subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationUpdateActionBuilder setAutomatedReversalConfigurationBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationUpdateActionBuilder + .of(); + } + + /** + * builder for setConnectorDeployment subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetConnectorDeploymentUpdateActionBuilder setConnectorDeploymentBuilder() { + return com.commercetools.checkout.models.payment_integration.SetConnectorDeploymentUpdateActionBuilder.of(); + } + + /** + * builder for setDisplayInfoDescription subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetDisplayInfoDescriptionUpdateActionBuilder setDisplayInfoDescriptionBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoDescriptionUpdateActionBuilder.of(); + } + + /** + * builder for setDisplayInfoLabel subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetDisplayInfoLabelUpdateActionBuilder setDisplayInfoLabelBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoLabelUpdateActionBuilder.of(); + } + + /** + * builder for setDisplayInfoLogoUrl subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetDisplayInfoLogoUrlUpdateActionBuilder setDisplayInfoLogoUrlBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoLogoUrlUpdateActionBuilder.of(); + } + + /** + * builder for setDisplayInfoPayButtonText subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetDisplayInfoPayButtonTextUpdateActionBuilder setDisplayInfoPayButtonTextBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoPayButtonTextUpdateActionBuilder + .of(); + } + + /** + * builder for setDisplayInfo subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetDisplayInfoUpdateActionBuilder setDisplayInfoBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoUpdateActionBuilder.of(); + } + + /** + * builder for setKey subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetKeyUpdateActionBuilder setKeyBuilder() { + return com.commercetools.checkout.models.payment_integration.SetKeyUpdateActionBuilder.of(); + } + + /** + * builder for setName subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetNameUpdateActionBuilder setNameBuilder() { + return com.commercetools.checkout.models.payment_integration.SetNameUpdateActionBuilder.of(); + } + + /** + * builder for setPredicate subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetPredicateUpdateActionBuilder setPredicateBuilder() { + return com.commercetools.checkout.models.payment_integration.SetPredicateUpdateActionBuilder.of(); + } + + /** + * builder for setSortingInfo subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetSortingInfoUpdateActionBuilder setSortingInfoBuilder() { + return com.commercetools.checkout.models.payment_integration.SetSortingInfoUpdateActionBuilder.of(); + } + + /** + * builder for setStatus subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetStatusUpdateActionBuilder setStatusBuilder() { + return com.commercetools.checkout.models.payment_integration.SetStatusUpdateActionBuilder.of(); + } + + /** + * builder for setType subtype + * @return builder + */ + public static com.commercetools.checkout.models.payment_integration.SetTypeUpdateActionBuilder setTypeBuilder() { + return com.commercetools.checkout.models.payment_integration.SetTypeUpdateActionBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionBuilder.java new file mode 100644 index 00000000000..6af32a3b2c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionBuilder.java @@ -0,0 +1,86 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationUpdateActionBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationUpdateActionBuilder { + + public com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationPredicateUpdateActionBuilder setAutomatedReversalConfigurationPredicateBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationPredicateUpdateActionBuilder + .of(); + } + + public com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationStatusUpdateActionBuilder setAutomatedReversalConfigurationStatusBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationStatusUpdateActionBuilder + .of(); + } + + public com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationUpdateActionBuilder setAutomatedReversalConfigurationBuilder() { + return com.commercetools.checkout.models.payment_integration.SetAutomatedReversalConfigurationUpdateActionBuilder + .of(); + } + + public com.commercetools.checkout.models.payment_integration.SetConnectorDeploymentUpdateActionBuilder setConnectorDeploymentBuilder() { + return com.commercetools.checkout.models.payment_integration.SetConnectorDeploymentUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetDisplayInfoDescriptionUpdateActionBuilder setDisplayInfoDescriptionBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoDescriptionUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetDisplayInfoLabelUpdateActionBuilder setDisplayInfoLabelBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoLabelUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetDisplayInfoLogoUrlUpdateActionBuilder setDisplayInfoLogoUrlBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoLogoUrlUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetDisplayInfoPayButtonTextUpdateActionBuilder setDisplayInfoPayButtonTextBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoPayButtonTextUpdateActionBuilder + .of(); + } + + public com.commercetools.checkout.models.payment_integration.SetDisplayInfoUpdateActionBuilder setDisplayInfoBuilder() { + return com.commercetools.checkout.models.payment_integration.SetDisplayInfoUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetKeyUpdateActionBuilder setKeyBuilder() { + return com.commercetools.checkout.models.payment_integration.SetKeyUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetNameUpdateActionBuilder setNameBuilder() { + return com.commercetools.checkout.models.payment_integration.SetNameUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetPredicateUpdateActionBuilder setPredicateBuilder() { + return com.commercetools.checkout.models.payment_integration.SetPredicateUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetSortingInfoUpdateActionBuilder setSortingInfoBuilder() { + return com.commercetools.checkout.models.payment_integration.SetSortingInfoUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetStatusUpdateActionBuilder setStatusBuilder() { + return com.commercetools.checkout.models.payment_integration.SetStatusUpdateActionBuilder.of(); + } + + public com.commercetools.checkout.models.payment_integration.SetTypeUpdateActionBuilder setTypeBuilder() { + return com.commercetools.checkout.models.payment_integration.SetTypeUpdateActionBuilder.of(); + } + + /** + * factory method for an instance of PaymentIntegrationUpdateActionBuilder + * @return builder + */ + public static PaymentIntegrationUpdateActionBuilder of() { + return new PaymentIntegrationUpdateActionBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionImpl.java new file mode 100644 index 00000000000..fad9f0fb8ce --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionImpl.java @@ -0,0 +1,76 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Base type for all PaymentIntegration update actions.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationUpdateActionImpl implements PaymentIntegrationUpdateAction, ModelBase { + + private String action; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationUpdateActionImpl(@JsonProperty("action") final String action) { + this.action = action; + } + + /** + * create empty instance + */ + public PaymentIntegrationUpdateActionImpl() { + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationUpdateActionImpl that = (PaymentIntegrationUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); + } + + @Override + public PaymentIntegrationUpdateAction copyDeep() { + return PaymentIntegrationUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActions.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActions.java new file mode 100644 index 00000000000..4d63dcce9ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActions.java @@ -0,0 +1,158 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    PaymentIntegrationUpdateActions

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegrationUpdateActions paymentIntegrationUpdateActions = PaymentIntegrationUpdateActions.builder()
    + *             .version(1)
    + *             .plusActions(actionsBuilder -> actionsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationUpdateActionsImpl.class) +public interface PaymentIntegrationUpdateActions { + + /** + *

    Expected version of the PaymentIntegration on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @return version + */ + @NotNull + @JsonProperty("version") + public Integer getVersion(); + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @return actions + */ + @NotNull + @Valid + @JsonProperty("actions") + public List getActions(); + + /** + *

    Expected version of the PaymentIntegration on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @param version value to be set + */ + + public void setVersion(final Integer version); + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param actions values to be set + */ + + @JsonIgnore + public void setActions(final PaymentIntegrationUpdateAction... actions); + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param actions values to be set + */ + + public void setActions(final List actions); + + /** + * factory method + * @return instance of PaymentIntegrationUpdateActions + */ + public static PaymentIntegrationUpdateActions of() { + return new PaymentIntegrationUpdateActionsImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationUpdateActions + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationUpdateActions of(final PaymentIntegrationUpdateActions template) { + PaymentIntegrationUpdateActionsImpl instance = new PaymentIntegrationUpdateActionsImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(template.getActions()); + return instance; + } + + public PaymentIntegrationUpdateActions copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationUpdateActions + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationUpdateActions deepCopy(@Nullable final PaymentIntegrationUpdateActions template) { + if (template == null) { + return null; + } + PaymentIntegrationUpdateActionsImpl instance = new PaymentIntegrationUpdateActionsImpl(); + instance.setVersion(template.getVersion()); + instance.setActions(Optional.ofNullable(template.getActions()) + .map(t -> t.stream() + .map( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateAction::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for PaymentIntegrationUpdateActions + * @return builder + */ + public static PaymentIntegrationUpdateActionsBuilder builder() { + return PaymentIntegrationUpdateActionsBuilder.of(); + } + + /** + * create builder for PaymentIntegrationUpdateActions instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationUpdateActionsBuilder builder(final PaymentIntegrationUpdateActions template) { + return PaymentIntegrationUpdateActionsBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationUpdateActions(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsBuilder.java new file mode 100644 index 00000000000..435d6a87772 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsBuilder.java @@ -0,0 +1,168 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationUpdateActionsBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegrationUpdateActions paymentIntegrationUpdateActions = PaymentIntegrationUpdateActions.builder()
    + *             .version(1)
    + *             .plusActions(actionsBuilder -> actionsBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationUpdateActionsBuilder implements Builder { + + private Integer version; + + private java.util.List actions; + + /** + *

    Expected version of the PaymentIntegration on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @param version value to be set + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder version(final Integer version) { + this.version = version; + return this; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param actions value to be set + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder actions( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + return this; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param actions value to be set + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder actions( + final java.util.List actions) { + this.actions = actions; + return this; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param actions value to be set + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder plusActions( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateAction... actions) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.addAll(Arrays.asList(actions)); + return this; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param builder function to build the actions value + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder plusActions( + Function> builder) { + if (this.actions == null) { + this.actions = new ArrayList<>(); + } + this.actions.add(builder + .apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionBuilder.of()) + .build()); + return this; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @param builder function to build the actions value + * @return Builder + */ + + public PaymentIntegrationUpdateActionsBuilder withActions( + Function> builder) { + this.actions = new ArrayList<>(); + this.actions.add(builder + .apply(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionBuilder.of()) + .build()); + return this; + } + + /** + *

    Expected version of the PaymentIntegration on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + * @return version + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + * @return actions + */ + + public java.util.List getActions() { + return this.actions; + } + + /** + * builds PaymentIntegrationUpdateActions with checking for non-null required values + * @return PaymentIntegrationUpdateActions + */ + public PaymentIntegrationUpdateActions build() { + Objects.requireNonNull(version, PaymentIntegrationUpdateActions.class + ": version is missing"); + Objects.requireNonNull(actions, PaymentIntegrationUpdateActions.class + ": actions is missing"); + return new PaymentIntegrationUpdateActionsImpl(version, actions); + } + + /** + * builds PaymentIntegrationUpdateActions without checking for non-null required values + * @return PaymentIntegrationUpdateActions + */ + public PaymentIntegrationUpdateActions buildUnchecked() { + return new PaymentIntegrationUpdateActionsImpl(version, actions); + } + + /** + * factory method for an instance of PaymentIntegrationUpdateActionsBuilder + * @return builder + */ + public static PaymentIntegrationUpdateActionsBuilder of() { + return new PaymentIntegrationUpdateActionsBuilder(); + } + + /** + * create builder for PaymentIntegrationUpdateActions instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationUpdateActionsBuilder of(final PaymentIntegrationUpdateActions template) { + PaymentIntegrationUpdateActionsBuilder builder = new PaymentIntegrationUpdateActionsBuilder(); + builder.version = template.getVersion(); + builder.actions = template.getActions(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsImpl.java new file mode 100644 index 00000000000..cb910bb7d02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsImpl.java @@ -0,0 +1,108 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    PaymentIntegrationUpdateActions

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationUpdateActionsImpl implements PaymentIntegrationUpdateActions, ModelBase { + + private Integer version; + + private java.util.List actions; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationUpdateActionsImpl(@JsonProperty("version") final Integer version, + @JsonProperty("actions") final java.util.List actions) { + this.version = version; + this.actions = actions; + } + + /** + * create empty instance + */ + public PaymentIntegrationUpdateActionsImpl() { + } + + /** + *

    Expected version of the PaymentIntegration on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.

    + */ + + public Integer getVersion() { + return this.version; + } + + /** + *

    Update actions to be performed on the PaymentIntegration.

    + */ + + public java.util.List getActions() { + return this.actions; + } + + public void setVersion(final Integer version) { + this.version = version; + } + + public void setActions( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateAction... actions) { + this.actions = new ArrayList<>(Arrays.asList(actions)); + } + + public void setActions( + final java.util.List actions) { + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationUpdateActionsImpl that = (PaymentIntegrationUpdateActionsImpl) o; + + return new EqualsBuilder().append(version, that.version) + .append(actions, that.actions) + .append(version, that.version) + .append(actions, that.actions) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(version).append(actions).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("version", version) + .append("actions", actions) + .build(); + } + + @Override + public PaymentIntegrationUpdateActions copyDeep() { + return PaymentIntegrationUpdateActions.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateAction.java new file mode 100644 index 00000000000..701ba0f697d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateAction.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

    Sets the automated reversal configuration predicate of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationPredicateUpdateAction setAutomatedReversalConfigurationPredicateUpdateAction = SetAutomatedReversalConfigurationPredicateUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAutomatedReversalConfigurationPredicate") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAutomatedReversalConfigurationPredicateUpdateActionImpl.class) +public interface SetAutomatedReversalConfigurationPredicateUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetAutomatedReversalConfigurationPredicateUpdateAction + */ + String SET_AUTOMATED_REVERSAL_CONFIGURATION_PREDICATE = "setAutomatedReversalConfigurationPredicate"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return predicate + */ + + @JsonProperty("predicate") + public String getPredicate(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param predicate value to be set + */ + + public void setPredicate(final String predicate); + + /** + * factory method + * @return instance of SetAutomatedReversalConfigurationPredicateUpdateAction + */ + public static SetAutomatedReversalConfigurationPredicateUpdateAction of() { + return new SetAutomatedReversalConfigurationPredicateUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetAutomatedReversalConfigurationPredicateUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetAutomatedReversalConfigurationPredicateUpdateAction of( + final SetAutomatedReversalConfigurationPredicateUpdateAction template) { + SetAutomatedReversalConfigurationPredicateUpdateActionImpl instance = new SetAutomatedReversalConfigurationPredicateUpdateActionImpl(); + instance.setPredicate(template.getPredicate()); + return instance; + } + + public SetAutomatedReversalConfigurationPredicateUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetAutomatedReversalConfigurationPredicateUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAutomatedReversalConfigurationPredicateUpdateAction deepCopy( + @Nullable final SetAutomatedReversalConfigurationPredicateUpdateAction template) { + if (template == null) { + return null; + } + SetAutomatedReversalConfigurationPredicateUpdateActionImpl instance = new SetAutomatedReversalConfigurationPredicateUpdateActionImpl(); + instance.setPredicate(template.getPredicate()); + return instance; + } + + /** + * builder factory method for SetAutomatedReversalConfigurationPredicateUpdateAction + * @return builder + */ + public static SetAutomatedReversalConfigurationPredicateUpdateActionBuilder builder() { + return SetAutomatedReversalConfigurationPredicateUpdateActionBuilder.of(); + } + + /** + * create builder for SetAutomatedReversalConfigurationPredicateUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationPredicateUpdateActionBuilder builder( + final SetAutomatedReversalConfigurationPredicateUpdateAction template) { + return SetAutomatedReversalConfigurationPredicateUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAutomatedReversalConfigurationPredicateUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionBuilder.java new file mode 100644 index 00000000000..fa370f47617 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionBuilder.java @@ -0,0 +1,86 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAutomatedReversalConfigurationPredicateUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationPredicateUpdateAction setAutomatedReversalConfigurationPredicateUpdateAction = SetAutomatedReversalConfigurationPredicateUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationPredicateUpdateActionBuilder + implements Builder { + + @Nullable + private String predicate; + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + * @return predicate + */ + + @Nullable + public String getPredicate() { + return this.predicate; + } + + /** + * builds SetAutomatedReversalConfigurationPredicateUpdateAction with checking for non-null required values + * @return SetAutomatedReversalConfigurationPredicateUpdateAction + */ + public SetAutomatedReversalConfigurationPredicateUpdateAction build() { + return new SetAutomatedReversalConfigurationPredicateUpdateActionImpl(predicate); + } + + /** + * builds SetAutomatedReversalConfigurationPredicateUpdateAction without checking for non-null required values + * @return SetAutomatedReversalConfigurationPredicateUpdateAction + */ + public SetAutomatedReversalConfigurationPredicateUpdateAction buildUnchecked() { + return new SetAutomatedReversalConfigurationPredicateUpdateActionImpl(predicate); + } + + /** + * factory method for an instance of SetAutomatedReversalConfigurationPredicateUpdateActionBuilder + * @return builder + */ + public static SetAutomatedReversalConfigurationPredicateUpdateActionBuilder of() { + return new SetAutomatedReversalConfigurationPredicateUpdateActionBuilder(); + } + + /** + * create builder for SetAutomatedReversalConfigurationPredicateUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationPredicateUpdateActionBuilder of( + final SetAutomatedReversalConfigurationPredicateUpdateAction template) { + SetAutomatedReversalConfigurationPredicateUpdateActionBuilder builder = new SetAutomatedReversalConfigurationPredicateUpdateActionBuilder(); + builder.predicate = template.getPredicate(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionImpl.java new file mode 100644 index 00000000000..08675044cc8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the automated reversal configuration predicate of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationPredicateUpdateActionImpl + implements SetAutomatedReversalConfigurationPredicateUpdateAction, ModelBase { + + private String action; + + private String predicate; + + /** + * create instance with all properties + */ + @JsonCreator + SetAutomatedReversalConfigurationPredicateUpdateActionImpl(@JsonProperty("predicate") final String predicate) { + this.predicate = predicate; + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION_PREDICATE; + } + + /** + * create empty instance + */ + public SetAutomatedReversalConfigurationPredicateUpdateActionImpl() { + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION_PREDICATE; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public String getPredicate() { + return this.predicate; + } + + public void setPredicate(final String predicate) { + this.predicate = predicate; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAutomatedReversalConfigurationPredicateUpdateActionImpl that = (SetAutomatedReversalConfigurationPredicateUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(predicate, that.predicate) + .append(action, that.action) + .append(predicate, that.predicate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(predicate).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("predicate", predicate) + .build(); + } + + @Override + public SetAutomatedReversalConfigurationPredicateUpdateAction copyDeep() { + return SetAutomatedReversalConfigurationPredicateUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateAction.java new file mode 100644 index 00000000000..06e0eece103 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateAction.java @@ -0,0 +1,134 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Sets the automated reversal configuration status of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationStatusUpdateAction setAutomatedReversalConfigurationStatusUpdateAction = SetAutomatedReversalConfigurationStatusUpdateAction.builder()
    + *             .status("{status}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAutomatedReversalConfigurationStatus") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAutomatedReversalConfigurationStatusUpdateActionImpl.class) +public interface SetAutomatedReversalConfigurationStatusUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetAutomatedReversalConfigurationStatusUpdateAction + */ + String SET_AUTOMATED_REVERSAL_CONFIGURATION_STATUS = "setAutomatedReversalConfigurationStatus"; + + /** + *

    Value to set as the automated reversal configuration status of the PaymentIntegration.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public String getStatus(); + + /** + *

    Value to set as the automated reversal configuration status of the PaymentIntegration.

    + * @param status value to be set + */ + + public void setStatus(final String status); + + /** + * factory method + * @return instance of SetAutomatedReversalConfigurationStatusUpdateAction + */ + public static SetAutomatedReversalConfigurationStatusUpdateAction of() { + return new SetAutomatedReversalConfigurationStatusUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetAutomatedReversalConfigurationStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetAutomatedReversalConfigurationStatusUpdateAction of( + final SetAutomatedReversalConfigurationStatusUpdateAction template) { + SetAutomatedReversalConfigurationStatusUpdateActionImpl instance = new SetAutomatedReversalConfigurationStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + public SetAutomatedReversalConfigurationStatusUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetAutomatedReversalConfigurationStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAutomatedReversalConfigurationStatusUpdateAction deepCopy( + @Nullable final SetAutomatedReversalConfigurationStatusUpdateAction template) { + if (template == null) { + return null; + } + SetAutomatedReversalConfigurationStatusUpdateActionImpl instance = new SetAutomatedReversalConfigurationStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * builder factory method for SetAutomatedReversalConfigurationStatusUpdateAction + * @return builder + */ + public static SetAutomatedReversalConfigurationStatusUpdateActionBuilder builder() { + return SetAutomatedReversalConfigurationStatusUpdateActionBuilder.of(); + } + + /** + * create builder for SetAutomatedReversalConfigurationStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationStatusUpdateActionBuilder builder( + final SetAutomatedReversalConfigurationStatusUpdateAction template) { + return SetAutomatedReversalConfigurationStatusUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAutomatedReversalConfigurationStatusUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionBuilder.java new file mode 100644 index 00000000000..71fa673d8bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionBuilder.java @@ -0,0 +1,85 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAutomatedReversalConfigurationStatusUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationStatusUpdateAction setAutomatedReversalConfigurationStatusUpdateAction = SetAutomatedReversalConfigurationStatusUpdateAction.builder()
    + *             .status("{status}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationStatusUpdateActionBuilder + implements Builder { + + private String status; + + /** + *

    Value to set as the automated reversal configuration status of the PaymentIntegration.

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

    Value to set as the automated reversal configuration status of the PaymentIntegration.

    + * @return status + */ + + public String getStatus() { + return this.status; + } + + /** + * builds SetAutomatedReversalConfigurationStatusUpdateAction with checking for non-null required values + * @return SetAutomatedReversalConfigurationStatusUpdateAction + */ + public SetAutomatedReversalConfigurationStatusUpdateAction build() { + Objects.requireNonNull(status, + SetAutomatedReversalConfigurationStatusUpdateAction.class + ": status is missing"); + return new SetAutomatedReversalConfigurationStatusUpdateActionImpl(status); + } + + /** + * builds SetAutomatedReversalConfigurationStatusUpdateAction without checking for non-null required values + * @return SetAutomatedReversalConfigurationStatusUpdateAction + */ + public SetAutomatedReversalConfigurationStatusUpdateAction buildUnchecked() { + return new SetAutomatedReversalConfigurationStatusUpdateActionImpl(status); + } + + /** + * factory method for an instance of SetAutomatedReversalConfigurationStatusUpdateActionBuilder + * @return builder + */ + public static SetAutomatedReversalConfigurationStatusUpdateActionBuilder of() { + return new SetAutomatedReversalConfigurationStatusUpdateActionBuilder(); + } + + /** + * create builder for SetAutomatedReversalConfigurationStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationStatusUpdateActionBuilder of( + final SetAutomatedReversalConfigurationStatusUpdateAction template) { + SetAutomatedReversalConfigurationStatusUpdateActionBuilder builder = new SetAutomatedReversalConfigurationStatusUpdateActionBuilder(); + builder.status = template.getStatus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionImpl.java new file mode 100644 index 00000000000..78f65a90953 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the automated reversal configuration status of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationStatusUpdateActionImpl + implements SetAutomatedReversalConfigurationStatusUpdateAction, ModelBase { + + private String action; + + private String status; + + /** + * create instance with all properties + */ + @JsonCreator + SetAutomatedReversalConfigurationStatusUpdateActionImpl(@JsonProperty("status") final String status) { + this.status = status; + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION_STATUS; + } + + /** + * create empty instance + */ + public SetAutomatedReversalConfigurationStatusUpdateActionImpl() { + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION_STATUS; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the automated reversal configuration status of the PaymentIntegration.

    + */ + + public String getStatus() { + return this.status; + } + + public void setStatus(final String status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAutomatedReversalConfigurationStatusUpdateActionImpl that = (SetAutomatedReversalConfigurationStatusUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(status, that.status) + .append(action, that.action) + .append(status, that.status) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(status).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("status", status) + .build(); + } + + @Override + public SetAutomatedReversalConfigurationStatusUpdateAction copyDeep() { + return SetAutomatedReversalConfigurationStatusUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateAction.java new file mode 100644 index 00000000000..5bcd67e7ec5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateAction.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the automated reversal configuration of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationUpdateAction setAutomatedReversalConfigurationUpdateAction = SetAutomatedReversalConfigurationUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setAutomatedReversalConfiguration") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAutomatedReversalConfigurationUpdateActionImpl.class) +public interface SetAutomatedReversalConfigurationUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetAutomatedReversalConfigurationUpdateAction + */ + String SET_AUTOMATED_REVERSAL_CONFIGURATION = "setAutomatedReversalConfiguration"; + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @return automatedReversalConfiguration + */ + @Valid + @JsonProperty("automatedReversalConfiguration") + public AutomatedReversalConfiguration getAutomatedReversalConfiguration(); + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @param automatedReversalConfiguration value to be set + */ + + public void setAutomatedReversalConfiguration(final AutomatedReversalConfiguration automatedReversalConfiguration); + + /** + * factory method + * @return instance of SetAutomatedReversalConfigurationUpdateAction + */ + public static SetAutomatedReversalConfigurationUpdateAction of() { + return new SetAutomatedReversalConfigurationUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetAutomatedReversalConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetAutomatedReversalConfigurationUpdateAction of( + final SetAutomatedReversalConfigurationUpdateAction template) { + SetAutomatedReversalConfigurationUpdateActionImpl instance = new SetAutomatedReversalConfigurationUpdateActionImpl(); + instance.setAutomatedReversalConfiguration(template.getAutomatedReversalConfiguration()); + return instance; + } + + public SetAutomatedReversalConfigurationUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetAutomatedReversalConfigurationUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAutomatedReversalConfigurationUpdateAction deepCopy( + @Nullable final SetAutomatedReversalConfigurationUpdateAction template) { + if (template == null) { + return null; + } + SetAutomatedReversalConfigurationUpdateActionImpl instance = new SetAutomatedReversalConfigurationUpdateActionImpl(); + instance.setAutomatedReversalConfiguration( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration + .deepCopy(template.getAutomatedReversalConfiguration())); + return instance; + } + + /** + * builder factory method for SetAutomatedReversalConfigurationUpdateAction + * @return builder + */ + public static SetAutomatedReversalConfigurationUpdateActionBuilder builder() { + return SetAutomatedReversalConfigurationUpdateActionBuilder.of(); + } + + /** + * create builder for SetAutomatedReversalConfigurationUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationUpdateActionBuilder builder( + final SetAutomatedReversalConfigurationUpdateAction template) { + return SetAutomatedReversalConfigurationUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAutomatedReversalConfigurationUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionBuilder.java new file mode 100644 index 00000000000..470bc50b276 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionBuilder.java @@ -0,0 +1,115 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetAutomatedReversalConfigurationUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetAutomatedReversalConfigurationUpdateAction setAutomatedReversalConfigurationUpdateAction = SetAutomatedReversalConfigurationUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationUpdateActionBuilder + implements Builder { + + @Nullable + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public SetAutomatedReversalConfigurationUpdateActionBuilder automatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder + .apply(com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public SetAutomatedReversalConfigurationUpdateActionBuilder withAutomatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder.apply( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()); + return this; + } + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @param automatedReversalConfiguration value to be set + * @return Builder + */ + + public SetAutomatedReversalConfigurationUpdateActionBuilder automatedReversalConfiguration( + @Nullable final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + return this; + } + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + * @return automatedReversalConfiguration + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + /** + * builds SetAutomatedReversalConfigurationUpdateAction with checking for non-null required values + * @return SetAutomatedReversalConfigurationUpdateAction + */ + public SetAutomatedReversalConfigurationUpdateAction build() { + return new SetAutomatedReversalConfigurationUpdateActionImpl(automatedReversalConfiguration); + } + + /** + * builds SetAutomatedReversalConfigurationUpdateAction without checking for non-null required values + * @return SetAutomatedReversalConfigurationUpdateAction + */ + public SetAutomatedReversalConfigurationUpdateAction buildUnchecked() { + return new SetAutomatedReversalConfigurationUpdateActionImpl(automatedReversalConfiguration); + } + + /** + * factory method for an instance of SetAutomatedReversalConfigurationUpdateActionBuilder + * @return builder + */ + public static SetAutomatedReversalConfigurationUpdateActionBuilder of() { + return new SetAutomatedReversalConfigurationUpdateActionBuilder(); + } + + /** + * create builder for SetAutomatedReversalConfigurationUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAutomatedReversalConfigurationUpdateActionBuilder of( + final SetAutomatedReversalConfigurationUpdateAction template) { + SetAutomatedReversalConfigurationUpdateActionBuilder builder = new SetAutomatedReversalConfigurationUpdateActionBuilder(); + builder.automatedReversalConfiguration = template.getAutomatedReversalConfiguration(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionImpl.java new file mode 100644 index 00000000000..e80b8499231 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the automated reversal configuration of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAutomatedReversalConfigurationUpdateActionImpl + implements SetAutomatedReversalConfigurationUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + /** + * create instance with all properties + */ + @JsonCreator + SetAutomatedReversalConfigurationUpdateActionImpl( + @JsonProperty("automatedReversalConfiguration") final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION; + } + + /** + * create empty instance + */ + public SetAutomatedReversalConfigurationUpdateActionImpl() { + this.action = SET_AUTOMATED_REVERSAL_CONFIGURATION; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the automated reversal configuration of the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + public void setAutomatedReversalConfiguration( + final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAutomatedReversalConfigurationUpdateActionImpl that = (SetAutomatedReversalConfigurationUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .append(action, that.action) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(automatedReversalConfiguration).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("automatedReversalConfiguration", automatedReversalConfiguration) + .build(); + } + + @Override + public SetAutomatedReversalConfigurationUpdateAction copyDeep() { + return SetAutomatedReversalConfigurationUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateAction.java new file mode 100644 index 00000000000..0ff3215f6ad --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateAction.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

    Sets the connector deployment reference of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetConnectorDeploymentUpdateAction setConnectorDeploymentUpdateAction = SetConnectorDeploymentUpdateAction.builder()
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setConnectorDeployment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetConnectorDeploymentUpdateActionImpl.class) +public interface SetConnectorDeploymentUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetConnectorDeploymentUpdateAction + */ + String SET_CONNECTOR_DEPLOYMENT = "setConnectorDeployment"; + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @return connectorDeployment + */ + @NotNull + @Valid + @JsonProperty("connectorDeployment") + public ConnectorDeploymentReference getConnectorDeployment(); + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @param connectorDeployment value to be set + */ + + public void setConnectorDeployment(final ConnectorDeploymentReference connectorDeployment); + + /** + * factory method + * @return instance of SetConnectorDeploymentUpdateAction + */ + public static SetConnectorDeploymentUpdateAction of() { + return new SetConnectorDeploymentUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetConnectorDeploymentUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetConnectorDeploymentUpdateAction of(final SetConnectorDeploymentUpdateAction template) { + SetConnectorDeploymentUpdateActionImpl instance = new SetConnectorDeploymentUpdateActionImpl(); + instance.setConnectorDeployment(template.getConnectorDeployment()); + return instance; + } + + public SetConnectorDeploymentUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetConnectorDeploymentUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetConnectorDeploymentUpdateAction deepCopy( + @Nullable final SetConnectorDeploymentUpdateAction template) { + if (template == null) { + return null; + } + SetConnectorDeploymentUpdateActionImpl instance = new SetConnectorDeploymentUpdateActionImpl(); + instance.setConnectorDeployment( + com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference + .deepCopy(template.getConnectorDeployment())); + return instance; + } + + /** + * builder factory method for SetConnectorDeploymentUpdateAction + * @return builder + */ + public static SetConnectorDeploymentUpdateActionBuilder builder() { + return SetConnectorDeploymentUpdateActionBuilder.of(); + } + + /** + * create builder for SetConnectorDeploymentUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetConnectorDeploymentUpdateActionBuilder builder(final SetConnectorDeploymentUpdateAction template) { + return SetConnectorDeploymentUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetConnectorDeploymentUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionBuilder.java new file mode 100644 index 00000000000..9d0fa20a789 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionBuilder.java @@ -0,0 +1,112 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetConnectorDeploymentUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetConnectorDeploymentUpdateAction setConnectorDeploymentUpdateAction = SetConnectorDeploymentUpdateAction.builder()
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetConnectorDeploymentUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public SetConnectorDeploymentUpdateActionBuilder connectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public SetConnectorDeploymentUpdateActionBuilder withConnectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()); + return this; + } + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @param connectorDeployment value to be set + * @return Builder + */ + + public SetConnectorDeploymentUpdateActionBuilder connectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + return this; + } + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + * @return connectorDeployment + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + /** + * builds SetConnectorDeploymentUpdateAction with checking for non-null required values + * @return SetConnectorDeploymentUpdateAction + */ + public SetConnectorDeploymentUpdateAction build() { + Objects.requireNonNull(connectorDeployment, + SetConnectorDeploymentUpdateAction.class + ": connectorDeployment is missing"); + return new SetConnectorDeploymentUpdateActionImpl(connectorDeployment); + } + + /** + * builds SetConnectorDeploymentUpdateAction without checking for non-null required values + * @return SetConnectorDeploymentUpdateAction + */ + public SetConnectorDeploymentUpdateAction buildUnchecked() { + return new SetConnectorDeploymentUpdateActionImpl(connectorDeployment); + } + + /** + * factory method for an instance of SetConnectorDeploymentUpdateActionBuilder + * @return builder + */ + public static SetConnectorDeploymentUpdateActionBuilder of() { + return new SetConnectorDeploymentUpdateActionBuilder(); + } + + /** + * create builder for SetConnectorDeploymentUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetConnectorDeploymentUpdateActionBuilder of(final SetConnectorDeploymentUpdateAction template) { + SetConnectorDeploymentUpdateActionBuilder builder = new SetConnectorDeploymentUpdateActionBuilder(); + builder.connectorDeployment = template.getConnectorDeployment(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionImpl.java new file mode 100644 index 00000000000..043dfe70cf0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionImpl.java @@ -0,0 +1,100 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the connector deployment reference of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetConnectorDeploymentUpdateActionImpl implements SetConnectorDeploymentUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + /** + * create instance with all properties + */ + @JsonCreator + SetConnectorDeploymentUpdateActionImpl( + @JsonProperty("connectorDeployment") final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + this.action = SET_CONNECTOR_DEPLOYMENT; + } + + /** + * create empty instance + */ + public SetConnectorDeploymentUpdateActionImpl() { + this.action = SET_CONNECTOR_DEPLOYMENT; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the connector deployment reference of the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + public void setConnectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetConnectorDeploymentUpdateActionImpl that = (SetConnectorDeploymentUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(connectorDeployment, that.connectorDeployment) + .append(action, that.action) + .append(connectorDeployment, that.connectorDeployment) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(connectorDeployment).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("connectorDeployment", connectorDeployment) + .build(); + } + + @Override + public SetConnectorDeploymentUpdateAction copyDeep() { + return SetConnectorDeploymentUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateAction.java new file mode 100644 index 00000000000..3047887ef87 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateAction.java @@ -0,0 +1,133 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the display info description of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoDescriptionUpdateAction setDisplayInfoDescriptionUpdateAction = SetDisplayInfoDescriptionUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDisplayInfoDescription") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDisplayInfoDescriptionUpdateActionImpl.class) +public interface SetDisplayInfoDescriptionUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetDisplayInfoDescriptionUpdateAction + */ + String SET_DISPLAY_INFO_DESCRIPTION = "setDisplayInfoDescription"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + * factory method + * @return instance of SetDisplayInfoDescriptionUpdateAction + */ + public static SetDisplayInfoDescriptionUpdateAction of() { + return new SetDisplayInfoDescriptionUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDisplayInfoDescriptionUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDisplayInfoDescriptionUpdateAction of(final SetDisplayInfoDescriptionUpdateAction template) { + SetDisplayInfoDescriptionUpdateActionImpl instance = new SetDisplayInfoDescriptionUpdateActionImpl(); + instance.setDescription(template.getDescription()); + return instance; + } + + public SetDisplayInfoDescriptionUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDisplayInfoDescriptionUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDisplayInfoDescriptionUpdateAction deepCopy( + @Nullable final SetDisplayInfoDescriptionUpdateAction template) { + if (template == null) { + return null; + } + SetDisplayInfoDescriptionUpdateActionImpl instance = new SetDisplayInfoDescriptionUpdateActionImpl(); + instance.setDescription( + com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getDescription())); + return instance; + } + + /** + * builder factory method for SetDisplayInfoDescriptionUpdateAction + * @return builder + */ + public static SetDisplayInfoDescriptionUpdateActionBuilder builder() { + return SetDisplayInfoDescriptionUpdateActionBuilder.of(); + } + + /** + * create builder for SetDisplayInfoDescriptionUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoDescriptionUpdateActionBuilder builder( + final SetDisplayInfoDescriptionUpdateAction template) { + return SetDisplayInfoDescriptionUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDisplayInfoDescriptionUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionBuilder.java new file mode 100644 index 00000000000..9dc75804e47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDisplayInfoDescriptionUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoDescriptionUpdateAction setDisplayInfoDescriptionUpdateAction = SetDisplayInfoDescriptionUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoDescriptionUpdateActionBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString description; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the description value + * @return Builder + */ + + public SetDisplayInfoDescriptionUpdateActionBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the description value + * @return Builder + */ + + public SetDisplayInfoDescriptionUpdateActionBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param description value to be set + * @return Builder + */ + + public SetDisplayInfoDescriptionUpdateActionBuilder description( + @Nullable final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return description + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + * builds SetDisplayInfoDescriptionUpdateAction with checking for non-null required values + * @return SetDisplayInfoDescriptionUpdateAction + */ + public SetDisplayInfoDescriptionUpdateAction build() { + return new SetDisplayInfoDescriptionUpdateActionImpl(description); + } + + /** + * builds SetDisplayInfoDescriptionUpdateAction without checking for non-null required values + * @return SetDisplayInfoDescriptionUpdateAction + */ + public SetDisplayInfoDescriptionUpdateAction buildUnchecked() { + return new SetDisplayInfoDescriptionUpdateActionImpl(description); + } + + /** + * factory method for an instance of SetDisplayInfoDescriptionUpdateActionBuilder + * @return builder + */ + public static SetDisplayInfoDescriptionUpdateActionBuilder of() { + return new SetDisplayInfoDescriptionUpdateActionBuilder(); + } + + /** + * create builder for SetDisplayInfoDescriptionUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoDescriptionUpdateActionBuilder of( + final SetDisplayInfoDescriptionUpdateAction template) { + SetDisplayInfoDescriptionUpdateActionBuilder builder = new SetDisplayInfoDescriptionUpdateActionBuilder(); + builder.description = template.getDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionImpl.java new file mode 100644 index 00000000000..9dbbc938cdb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the display info description of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoDescriptionUpdateActionImpl implements SetDisplayInfoDescriptionUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.common.LocalizedString description; + + /** + * create instance with all properties + */ + @JsonCreator + SetDisplayInfoDescriptionUpdateActionImpl( + @JsonProperty("description") final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + this.action = SET_DISPLAY_INFO_DESCRIPTION; + } + + /** + * create empty instance + */ + public SetDisplayInfoDescriptionUpdateActionImpl() { + this.action = SET_DISPLAY_INFO_DESCRIPTION; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getDescription() { + return this.description; + } + + public void setDescription(final com.commercetools.checkout.models.common.LocalizedString description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDisplayInfoDescriptionUpdateActionImpl that = (SetDisplayInfoDescriptionUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(description, that.description) + .append(action, that.action) + .append(description, that.description) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(description).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("description", description) + .build(); + } + + @Override + public SetDisplayInfoDescriptionUpdateAction copyDeep() { + return SetDisplayInfoDescriptionUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateAction.java new file mode 100644 index 00000000000..3dabd339a1d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the display info label of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoLabelUpdateAction setDisplayInfoLabelUpdateAction = SetDisplayInfoLabelUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDisplayInfoLabel") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDisplayInfoLabelUpdateActionImpl.class) +public interface SetDisplayInfoLabelUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetDisplayInfoLabelUpdateAction + */ + String SET_DISPLAY_INFO_LABEL = "setDisplayInfoLabel"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return label + */ + @Valid + @JsonProperty("label") + public LocalizedString getLabel(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param label value to be set + */ + + public void setLabel(final LocalizedString label); + + /** + * factory method + * @return instance of SetDisplayInfoLabelUpdateAction + */ + public static SetDisplayInfoLabelUpdateAction of() { + return new SetDisplayInfoLabelUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDisplayInfoLabelUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDisplayInfoLabelUpdateAction of(final SetDisplayInfoLabelUpdateAction template) { + SetDisplayInfoLabelUpdateActionImpl instance = new SetDisplayInfoLabelUpdateActionImpl(); + instance.setLabel(template.getLabel()); + return instance; + } + + public SetDisplayInfoLabelUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDisplayInfoLabelUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDisplayInfoLabelUpdateAction deepCopy(@Nullable final SetDisplayInfoLabelUpdateAction template) { + if (template == null) { + return null; + } + SetDisplayInfoLabelUpdateActionImpl instance = new SetDisplayInfoLabelUpdateActionImpl(); + instance.setLabel(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getLabel())); + return instance; + } + + /** + * builder factory method for SetDisplayInfoLabelUpdateAction + * @return builder + */ + public static SetDisplayInfoLabelUpdateActionBuilder builder() { + return SetDisplayInfoLabelUpdateActionBuilder.of(); + } + + /** + * create builder for SetDisplayInfoLabelUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoLabelUpdateActionBuilder builder(final SetDisplayInfoLabelUpdateAction template) { + return SetDisplayInfoLabelUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDisplayInfoLabelUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionBuilder.java new file mode 100644 index 00000000000..be31a4310b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDisplayInfoLabelUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoLabelUpdateAction setDisplayInfoLabelUpdateAction = SetDisplayInfoLabelUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoLabelUpdateActionBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString label; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the label value + * @return Builder + */ + + public SetDisplayInfoLabelUpdateActionBuilder label( + Function builder) { + this.label = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the label value + * @return Builder + */ + + public SetDisplayInfoLabelUpdateActionBuilder withLabel( + Function builder) { + this.label = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param label value to be set + * @return Builder + */ + + public SetDisplayInfoLabelUpdateActionBuilder label( + @Nullable final com.commercetools.checkout.models.common.LocalizedString label) { + this.label = label; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return label + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getLabel() { + return this.label; + } + + /** + * builds SetDisplayInfoLabelUpdateAction with checking for non-null required values + * @return SetDisplayInfoLabelUpdateAction + */ + public SetDisplayInfoLabelUpdateAction build() { + return new SetDisplayInfoLabelUpdateActionImpl(label); + } + + /** + * builds SetDisplayInfoLabelUpdateAction without checking for non-null required values + * @return SetDisplayInfoLabelUpdateAction + */ + public SetDisplayInfoLabelUpdateAction buildUnchecked() { + return new SetDisplayInfoLabelUpdateActionImpl(label); + } + + /** + * factory method for an instance of SetDisplayInfoLabelUpdateActionBuilder + * @return builder + */ + public static SetDisplayInfoLabelUpdateActionBuilder of() { + return new SetDisplayInfoLabelUpdateActionBuilder(); + } + + /** + * create builder for SetDisplayInfoLabelUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoLabelUpdateActionBuilder of(final SetDisplayInfoLabelUpdateAction template) { + SetDisplayInfoLabelUpdateActionBuilder builder = new SetDisplayInfoLabelUpdateActionBuilder(); + builder.label = template.getLabel(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionImpl.java new file mode 100644 index 00000000000..39769aab424 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the display info label of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoLabelUpdateActionImpl implements SetDisplayInfoLabelUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.common.LocalizedString label; + + /** + * create instance with all properties + */ + @JsonCreator + SetDisplayInfoLabelUpdateActionImpl( + @JsonProperty("label") final com.commercetools.checkout.models.common.LocalizedString label) { + this.label = label; + this.action = SET_DISPLAY_INFO_LABEL; + } + + /** + * create empty instance + */ + public SetDisplayInfoLabelUpdateActionImpl() { + this.action = SET_DISPLAY_INFO_LABEL; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getLabel() { + return this.label; + } + + public void setLabel(final com.commercetools.checkout.models.common.LocalizedString label) { + this.label = label; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDisplayInfoLabelUpdateActionImpl that = (SetDisplayInfoLabelUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(label, that.label) + .append(action, that.action) + .append(label, that.label) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(label).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("label", label) + .build(); + } + + @Override + public SetDisplayInfoLabelUpdateAction copyDeep() { + return SetDisplayInfoLabelUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateAction.java new file mode 100644 index 00000000000..216a060feef --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateAction.java @@ -0,0 +1,131 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the display info logo URL of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoLogoUrlUpdateAction setDisplayInfoLogoUrlUpdateAction = SetDisplayInfoLogoUrlUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDisplayInfoLogoUrl") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDisplayInfoLogoUrlUpdateActionImpl.class) +public interface SetDisplayInfoLogoUrlUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetDisplayInfoLogoUrlUpdateAction + */ + String SET_DISPLAY_INFO_LOGO_URL = "setDisplayInfoLogoUrl"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return logoUrl + */ + @Valid + @JsonProperty("logoUrl") + public LocalizedString getLogoUrl(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param logoUrl value to be set + */ + + public void setLogoUrl(final LocalizedString logoUrl); + + /** + * factory method + * @return instance of SetDisplayInfoLogoUrlUpdateAction + */ + public static SetDisplayInfoLogoUrlUpdateAction of() { + return new SetDisplayInfoLogoUrlUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDisplayInfoLogoUrlUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDisplayInfoLogoUrlUpdateAction of(final SetDisplayInfoLogoUrlUpdateAction template) { + SetDisplayInfoLogoUrlUpdateActionImpl instance = new SetDisplayInfoLogoUrlUpdateActionImpl(); + instance.setLogoUrl(template.getLogoUrl()); + return instance; + } + + public SetDisplayInfoLogoUrlUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDisplayInfoLogoUrlUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDisplayInfoLogoUrlUpdateAction deepCopy( + @Nullable final SetDisplayInfoLogoUrlUpdateAction template) { + if (template == null) { + return null; + } + SetDisplayInfoLogoUrlUpdateActionImpl instance = new SetDisplayInfoLogoUrlUpdateActionImpl(); + instance.setLogoUrl(com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getLogoUrl())); + return instance; + } + + /** + * builder factory method for SetDisplayInfoLogoUrlUpdateAction + * @return builder + */ + public static SetDisplayInfoLogoUrlUpdateActionBuilder builder() { + return SetDisplayInfoLogoUrlUpdateActionBuilder.of(); + } + + /** + * create builder for SetDisplayInfoLogoUrlUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoLogoUrlUpdateActionBuilder builder(final SetDisplayInfoLogoUrlUpdateAction template) { + return SetDisplayInfoLogoUrlUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDisplayInfoLogoUrlUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionBuilder.java new file mode 100644 index 00000000000..f0417fed850 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionBuilder.java @@ -0,0 +1,110 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDisplayInfoLogoUrlUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoLogoUrlUpdateAction setDisplayInfoLogoUrlUpdateAction = SetDisplayInfoLogoUrlUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoLogoUrlUpdateActionBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString logoUrl; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the logoUrl value + * @return Builder + */ + + public SetDisplayInfoLogoUrlUpdateActionBuilder logoUrl( + Function builder) { + this.logoUrl = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the logoUrl value + * @return Builder + */ + + public SetDisplayInfoLogoUrlUpdateActionBuilder withLogoUrl( + Function builder) { + this.logoUrl = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param logoUrl value to be set + * @return Builder + */ + + public SetDisplayInfoLogoUrlUpdateActionBuilder logoUrl( + @Nullable final com.commercetools.checkout.models.common.LocalizedString logoUrl) { + this.logoUrl = logoUrl; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return logoUrl + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getLogoUrl() { + return this.logoUrl; + } + + /** + * builds SetDisplayInfoLogoUrlUpdateAction with checking for non-null required values + * @return SetDisplayInfoLogoUrlUpdateAction + */ + public SetDisplayInfoLogoUrlUpdateAction build() { + return new SetDisplayInfoLogoUrlUpdateActionImpl(logoUrl); + } + + /** + * builds SetDisplayInfoLogoUrlUpdateAction without checking for non-null required values + * @return SetDisplayInfoLogoUrlUpdateAction + */ + public SetDisplayInfoLogoUrlUpdateAction buildUnchecked() { + return new SetDisplayInfoLogoUrlUpdateActionImpl(logoUrl); + } + + /** + * factory method for an instance of SetDisplayInfoLogoUrlUpdateActionBuilder + * @return builder + */ + public static SetDisplayInfoLogoUrlUpdateActionBuilder of() { + return new SetDisplayInfoLogoUrlUpdateActionBuilder(); + } + + /** + * create builder for SetDisplayInfoLogoUrlUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoLogoUrlUpdateActionBuilder of(final SetDisplayInfoLogoUrlUpdateAction template) { + SetDisplayInfoLogoUrlUpdateActionBuilder builder = new SetDisplayInfoLogoUrlUpdateActionBuilder(); + builder.logoUrl = template.getLogoUrl(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionImpl.java new file mode 100644 index 00000000000..731df55d094 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the display info logo URL of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoLogoUrlUpdateActionImpl implements SetDisplayInfoLogoUrlUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.common.LocalizedString logoUrl; + + /** + * create instance with all properties + */ + @JsonCreator + SetDisplayInfoLogoUrlUpdateActionImpl( + @JsonProperty("logoUrl") final com.commercetools.checkout.models.common.LocalizedString logoUrl) { + this.logoUrl = logoUrl; + this.action = SET_DISPLAY_INFO_LOGO_URL; + } + + /** + * create empty instance + */ + public SetDisplayInfoLogoUrlUpdateActionImpl() { + this.action = SET_DISPLAY_INFO_LOGO_URL; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getLogoUrl() { + return this.logoUrl; + } + + public void setLogoUrl(final com.commercetools.checkout.models.common.LocalizedString logoUrl) { + this.logoUrl = logoUrl; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDisplayInfoLogoUrlUpdateActionImpl that = (SetDisplayInfoLogoUrlUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(logoUrl, that.logoUrl) + .append(action, that.action) + .append(logoUrl, that.logoUrl) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(logoUrl).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("logoUrl", logoUrl) + .build(); + } + + @Override + public SetDisplayInfoLogoUrlUpdateAction copyDeep() { + return SetDisplayInfoLogoUrlUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateAction.java new file mode 100644 index 00000000000..126143900cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateAction.java @@ -0,0 +1,134 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the display info pay button text of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoPayButtonTextUpdateAction setDisplayInfoPayButtonTextUpdateAction = SetDisplayInfoPayButtonTextUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDisplayInfoPayButtonText") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDisplayInfoPayButtonTextUpdateActionImpl.class) +public interface SetDisplayInfoPayButtonTextUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetDisplayInfoPayButtonTextUpdateAction + */ + String SET_DISPLAY_INFO_PAY_BUTTON_TEXT = "setDisplayInfoPayButtonText"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return payButtonText + */ + @Valid + @JsonProperty("payButtonText") + public LocalizedString getPayButtonText(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param payButtonText value to be set + */ + + public void setPayButtonText(final LocalizedString payButtonText); + + /** + * factory method + * @return instance of SetDisplayInfoPayButtonTextUpdateAction + */ + public static SetDisplayInfoPayButtonTextUpdateAction of() { + return new SetDisplayInfoPayButtonTextUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDisplayInfoPayButtonTextUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDisplayInfoPayButtonTextUpdateAction of(final SetDisplayInfoPayButtonTextUpdateAction template) { + SetDisplayInfoPayButtonTextUpdateActionImpl instance = new SetDisplayInfoPayButtonTextUpdateActionImpl(); + instance.setPayButtonText(template.getPayButtonText()); + return instance; + } + + public SetDisplayInfoPayButtonTextUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDisplayInfoPayButtonTextUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDisplayInfoPayButtonTextUpdateAction deepCopy( + @Nullable final SetDisplayInfoPayButtonTextUpdateAction template) { + if (template == null) { + return null; + } + SetDisplayInfoPayButtonTextUpdateActionImpl instance = new SetDisplayInfoPayButtonTextUpdateActionImpl(); + instance.setPayButtonText( + com.commercetools.checkout.models.common.LocalizedString.deepCopy(template.getPayButtonText())); + return instance; + } + + /** + * builder factory method for SetDisplayInfoPayButtonTextUpdateAction + * @return builder + */ + public static SetDisplayInfoPayButtonTextUpdateActionBuilder builder() { + return SetDisplayInfoPayButtonTextUpdateActionBuilder.of(); + } + + /** + * create builder for SetDisplayInfoPayButtonTextUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoPayButtonTextUpdateActionBuilder builder( + final SetDisplayInfoPayButtonTextUpdateAction template) { + return SetDisplayInfoPayButtonTextUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDisplayInfoPayButtonTextUpdateAction( + 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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionBuilder.java new file mode 100644 index 00000000000..123716a946a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionBuilder.java @@ -0,0 +1,113 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDisplayInfoPayButtonTextUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoPayButtonTextUpdateAction setDisplayInfoPayButtonTextUpdateAction = SetDisplayInfoPayButtonTextUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoPayButtonTextUpdateActionBuilder + implements Builder { + + @Nullable + private com.commercetools.checkout.models.common.LocalizedString payButtonText; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the payButtonText value + * @return Builder + */ + + public SetDisplayInfoPayButtonTextUpdateActionBuilder payButtonText( + Function builder) { + this.payButtonText = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()) + .build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the payButtonText value + * @return Builder + */ + + public SetDisplayInfoPayButtonTextUpdateActionBuilder withPayButtonText( + Function builder) { + this.payButtonText = builder.apply(com.commercetools.checkout.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param payButtonText value to be set + * @return Builder + */ + + public SetDisplayInfoPayButtonTextUpdateActionBuilder payButtonText( + @Nullable final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.payButtonText = payButtonText; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return payButtonText + */ + + @Nullable + public com.commercetools.checkout.models.common.LocalizedString getPayButtonText() { + return this.payButtonText; + } + + /** + * builds SetDisplayInfoPayButtonTextUpdateAction with checking for non-null required values + * @return SetDisplayInfoPayButtonTextUpdateAction + */ + public SetDisplayInfoPayButtonTextUpdateAction build() { + return new SetDisplayInfoPayButtonTextUpdateActionImpl(payButtonText); + } + + /** + * builds SetDisplayInfoPayButtonTextUpdateAction without checking for non-null required values + * @return SetDisplayInfoPayButtonTextUpdateAction + */ + public SetDisplayInfoPayButtonTextUpdateAction buildUnchecked() { + return new SetDisplayInfoPayButtonTextUpdateActionImpl(payButtonText); + } + + /** + * factory method for an instance of SetDisplayInfoPayButtonTextUpdateActionBuilder + * @return builder + */ + public static SetDisplayInfoPayButtonTextUpdateActionBuilder of() { + return new SetDisplayInfoPayButtonTextUpdateActionBuilder(); + } + + /** + * create builder for SetDisplayInfoPayButtonTextUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoPayButtonTextUpdateActionBuilder of( + final SetDisplayInfoPayButtonTextUpdateAction template) { + SetDisplayInfoPayButtonTextUpdateActionBuilder builder = new SetDisplayInfoPayButtonTextUpdateActionBuilder(); + builder.payButtonText = template.getPayButtonText(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionImpl.java new file mode 100644 index 00000000000..2d414ccb70f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the display info pay button text of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoPayButtonTextUpdateActionImpl implements SetDisplayInfoPayButtonTextUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.common.LocalizedString payButtonText; + + /** + * create instance with all properties + */ + @JsonCreator + SetDisplayInfoPayButtonTextUpdateActionImpl( + @JsonProperty("payButtonText") final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.payButtonText = payButtonText; + this.action = SET_DISPLAY_INFO_PAY_BUTTON_TEXT; + } + + /** + * create empty instance + */ + public SetDisplayInfoPayButtonTextUpdateActionImpl() { + this.action = SET_DISPLAY_INFO_PAY_BUTTON_TEXT; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.common.LocalizedString getPayButtonText() { + return this.payButtonText; + } + + public void setPayButtonText(final com.commercetools.checkout.models.common.LocalizedString payButtonText) { + this.payButtonText = payButtonText; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDisplayInfoPayButtonTextUpdateActionImpl that = (SetDisplayInfoPayButtonTextUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(payButtonText, that.payButtonText) + .append(action, that.action) + .append(payButtonText, that.payButtonText) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(payButtonText).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("payButtonText", payButtonText) + .build(); + } + + @Override + public SetDisplayInfoPayButtonTextUpdateAction copyDeep() { + return SetDisplayInfoPayButtonTextUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateAction.java new file mode 100644 index 00000000000..63da45c7cbd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * SetDisplayInfoUpdateAction + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoUpdateAction setDisplayInfoUpdateAction = SetDisplayInfoUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setDisplayInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDisplayInfoUpdateActionImpl.class) +public interface SetDisplayInfoUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetDisplayInfoUpdateAction + */ + String SET_DISPLAY_INFO = "setDisplayInfo"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return displayInfo + */ + @Valid + @JsonProperty("displayInfo") + public DisplayInfo getDisplayInfo(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param displayInfo value to be set + */ + + public void setDisplayInfo(final DisplayInfo displayInfo); + + /** + * factory method + * @return instance of SetDisplayInfoUpdateAction + */ + public static SetDisplayInfoUpdateAction of() { + return new SetDisplayInfoUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetDisplayInfoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetDisplayInfoUpdateAction of(final SetDisplayInfoUpdateAction template) { + SetDisplayInfoUpdateActionImpl instance = new SetDisplayInfoUpdateActionImpl(); + instance.setDisplayInfo(template.getDisplayInfo()); + return instance; + } + + public SetDisplayInfoUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetDisplayInfoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDisplayInfoUpdateAction deepCopy(@Nullable final SetDisplayInfoUpdateAction template) { + if (template == null) { + return null; + } + SetDisplayInfoUpdateActionImpl instance = new SetDisplayInfoUpdateActionImpl(); + instance.setDisplayInfo( + com.commercetools.checkout.models.payment_integration.DisplayInfo.deepCopy(template.getDisplayInfo())); + return instance; + } + + /** + * builder factory method for SetDisplayInfoUpdateAction + * @return builder + */ + public static SetDisplayInfoUpdateActionBuilder builder() { + return SetDisplayInfoUpdateActionBuilder.of(); + } + + /** + * create builder for SetDisplayInfoUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoUpdateActionBuilder builder(final SetDisplayInfoUpdateAction template) { + return SetDisplayInfoUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDisplayInfoUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionBuilder.java new file mode 100644 index 00000000000..56db967092b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDisplayInfoUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetDisplayInfoUpdateAction setDisplayInfoUpdateAction = SetDisplayInfoUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoUpdateActionBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public SetDisplayInfoUpdateActionBuilder displayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public SetDisplayInfoUpdateActionBuilder withDisplayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param displayInfo value to be set + * @return Builder + */ + + public SetDisplayInfoUpdateActionBuilder displayInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return displayInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + /** + * builds SetDisplayInfoUpdateAction with checking for non-null required values + * @return SetDisplayInfoUpdateAction + */ + public SetDisplayInfoUpdateAction build() { + return new SetDisplayInfoUpdateActionImpl(displayInfo); + } + + /** + * builds SetDisplayInfoUpdateAction without checking for non-null required values + * @return SetDisplayInfoUpdateAction + */ + public SetDisplayInfoUpdateAction buildUnchecked() { + return new SetDisplayInfoUpdateActionImpl(displayInfo); + } + + /** + * factory method for an instance of SetDisplayInfoUpdateActionBuilder + * @return builder + */ + public static SetDisplayInfoUpdateActionBuilder of() { + return new SetDisplayInfoUpdateActionBuilder(); + } + + /** + * create builder for SetDisplayInfoUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDisplayInfoUpdateActionBuilder of(final SetDisplayInfoUpdateAction template) { + SetDisplayInfoUpdateActionBuilder builder = new SetDisplayInfoUpdateActionBuilder(); + builder.displayInfo = template.getDisplayInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionImpl.java new file mode 100644 index 00000000000..e392e27e2bf --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * SetDisplayInfoUpdateAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDisplayInfoUpdateActionImpl implements SetDisplayInfoUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + /** + * create instance with all properties + */ + @JsonCreator + SetDisplayInfoUpdateActionImpl( + @JsonProperty("displayInfo") final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + this.action = SET_DISPLAY_INFO; + } + + /** + * create empty instance + */ + public SetDisplayInfoUpdateActionImpl() { + this.action = SET_DISPLAY_INFO; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + public void setDisplayInfo(final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDisplayInfoUpdateActionImpl that = (SetDisplayInfoUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(displayInfo, that.displayInfo) + .append(action, that.action) + .append(displayInfo, that.displayInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(displayInfo).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("displayInfo", displayInfo) + .build(); + } + + @Override + public SetDisplayInfoUpdateAction copyDeep() { + return SetDisplayInfoUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateAction.java new file mode 100644 index 00000000000..4b70a93b8f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateAction.java @@ -0,0 +1,127 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

    Sets or unsets the key of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetKeyUpdateAction setKeyUpdateAction = SetKeyUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setKey") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetKeyUpdateActionImpl.class) +public interface SetKeyUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetKeyUpdateAction + */ + String SET_KEY = "setKey"; + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of SetKeyUpdateAction + */ + public static SetKeyUpdateAction of() { + return new SetKeyUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetKeyUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetKeyUpdateAction of(final SetKeyUpdateAction template) { + SetKeyUpdateActionImpl instance = new SetKeyUpdateActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public SetKeyUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetKeyUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetKeyUpdateAction deepCopy(@Nullable final SetKeyUpdateAction template) { + if (template == null) { + return null; + } + SetKeyUpdateActionImpl instance = new SetKeyUpdateActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for SetKeyUpdateAction + * @return builder + */ + public static SetKeyUpdateActionBuilder builder() { + return SetKeyUpdateActionBuilder.of(); + } + + /** + * create builder for SetKeyUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetKeyUpdateActionBuilder builder(final SetKeyUpdateAction template) { + return SetKeyUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetKeyUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionBuilder.java new file mode 100644 index 00000000000..7174feeab95 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetKeyUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetKeyUpdateAction setKeyUpdateAction = SetKeyUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetKeyUpdateActionBuilder implements Builder { + + @Nullable + private String key; + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds SetKeyUpdateAction with checking for non-null required values + * @return SetKeyUpdateAction + */ + public SetKeyUpdateAction build() { + return new SetKeyUpdateActionImpl(key); + } + + /** + * builds SetKeyUpdateAction without checking for non-null required values + * @return SetKeyUpdateAction + */ + public SetKeyUpdateAction buildUnchecked() { + return new SetKeyUpdateActionImpl(key); + } + + /** + * factory method for an instance of SetKeyUpdateActionBuilder + * @return builder + */ + public static SetKeyUpdateActionBuilder of() { + return new SetKeyUpdateActionBuilder(); + } + + /** + * create builder for SetKeyUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetKeyUpdateActionBuilder of(final SetKeyUpdateAction template) { + SetKeyUpdateActionBuilder builder = new SetKeyUpdateActionBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionImpl.java new file mode 100644 index 00000000000..3ae5fc6be57 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets or unsets the key of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetKeyUpdateActionImpl implements SetKeyUpdateAction, ModelBase { + + private String action; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + SetKeyUpdateActionImpl(@JsonProperty("key") final String key) { + this.key = key; + this.action = SET_KEY; + } + + /** + * create empty instance + */ + public SetKeyUpdateActionImpl() { + this.action = SET_KEY; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetKeyUpdateActionImpl that = (SetKeyUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(key, that.key) + .append(action, that.action) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("key", key) + .build(); + } + + @Override + public SetKeyUpdateAction copyDeep() { + return SetKeyUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateAction.java new file mode 100644 index 00000000000..1401030ed2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Sets the name of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetNameUpdateAction setNameUpdateAction = SetNameUpdateAction.builder()
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setName") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetNameUpdateActionImpl.class) +public interface SetNameUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetNameUpdateAction + */ + String SET_NAME = "setName"; + + /** + *

    Value to set as the name of the PaymentIntegration.

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

    Value to set as the name of the PaymentIntegration.

    + * @param name value to be set + */ + + public void setName(final String name); + + /** + * factory method + * @return instance of SetNameUpdateAction + */ + public static SetNameUpdateAction of() { + return new SetNameUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetNameUpdateAction of(final SetNameUpdateAction template) { + SetNameUpdateActionImpl instance = new SetNameUpdateActionImpl(); + instance.setName(template.getName()); + return instance; + } + + public SetNameUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetNameUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetNameUpdateAction deepCopy(@Nullable final SetNameUpdateAction template) { + if (template == null) { + return null; + } + SetNameUpdateActionImpl instance = new SetNameUpdateActionImpl(); + instance.setName(template.getName()); + return instance; + } + + /** + * builder factory method for SetNameUpdateAction + * @return builder + */ + public static SetNameUpdateActionBuilder builder() { + return SetNameUpdateActionBuilder.of(); + } + + /** + * create builder for SetNameUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetNameUpdateActionBuilder builder(final SetNameUpdateAction template) { + return SetNameUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetNameUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionBuilder.java new file mode 100644 index 00000000000..1f214f0c833 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetNameUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetNameUpdateAction setNameUpdateAction = SetNameUpdateAction.builder()
    + *             .name("{name}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetNameUpdateActionBuilder implements Builder { + + private String name; + + /** + *

    Value to set as the name of the PaymentIntegration.

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

    Value to set as the name of the PaymentIntegration.

    + * @return name + */ + + public String getName() { + return this.name; + } + + /** + * builds SetNameUpdateAction with checking for non-null required values + * @return SetNameUpdateAction + */ + public SetNameUpdateAction build() { + Objects.requireNonNull(name, SetNameUpdateAction.class + ": name is missing"); + return new SetNameUpdateActionImpl(name); + } + + /** + * builds SetNameUpdateAction without checking for non-null required values + * @return SetNameUpdateAction + */ + public SetNameUpdateAction buildUnchecked() { + return new SetNameUpdateActionImpl(name); + } + + /** + * factory method for an instance of SetNameUpdateActionBuilder + * @return builder + */ + public static SetNameUpdateActionBuilder of() { + return new SetNameUpdateActionBuilder(); + } + + /** + * create builder for SetNameUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetNameUpdateActionBuilder of(final SetNameUpdateAction template) { + SetNameUpdateActionBuilder builder = new SetNameUpdateActionBuilder(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionImpl.java new file mode 100644 index 00000000000..fdcc31d1cf6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the name of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetNameUpdateActionImpl implements SetNameUpdateAction, ModelBase { + + private String action; + + private String name; + + /** + * create instance with all properties + */ + @JsonCreator + SetNameUpdateActionImpl(@JsonProperty("name") final String name) { + this.name = name; + this.action = SET_NAME; + } + + /** + * create empty instance + */ + public SetNameUpdateActionImpl() { + this.action = SET_NAME; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the name of the PaymentIntegration.

    + */ + + public String getName() { + return this.name; + } + + 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; + + SetNameUpdateActionImpl that = (SetNameUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(action, that.action) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .build(); + } + + @Override + public SetNameUpdateAction copyDeep() { + return SetNameUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateAction.java new file mode 100644 index 00000000000..9ba068c535f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateAction.java @@ -0,0 +1,127 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

    Sets the predicate of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPredicateUpdateAction setPredicateUpdateAction = SetPredicateUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setPredicate") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPredicateUpdateActionImpl.class) +public interface SetPredicateUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetPredicateUpdateAction + */ + String SET_PREDICATE = "setPredicate"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return predicate + */ + + @JsonProperty("predicate") + public String getPredicate(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param predicate value to be set + */ + + public void setPredicate(final String predicate); + + /** + * factory method + * @return instance of SetPredicateUpdateAction + */ + public static SetPredicateUpdateAction of() { + return new SetPredicateUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetPredicateUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetPredicateUpdateAction of(final SetPredicateUpdateAction template) { + SetPredicateUpdateActionImpl instance = new SetPredicateUpdateActionImpl(); + instance.setPredicate(template.getPredicate()); + return instance; + } + + public SetPredicateUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetPredicateUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPredicateUpdateAction deepCopy(@Nullable final SetPredicateUpdateAction template) { + if (template == null) { + return null; + } + SetPredicateUpdateActionImpl instance = new SetPredicateUpdateActionImpl(); + instance.setPredicate(template.getPredicate()); + return instance; + } + + /** + * builder factory method for SetPredicateUpdateAction + * @return builder + */ + public static SetPredicateUpdateActionBuilder builder() { + return SetPredicateUpdateActionBuilder.of(); + } + + /** + * create builder for SetPredicateUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPredicateUpdateActionBuilder builder(final SetPredicateUpdateAction template) { + return SetPredicateUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPredicateUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionBuilder.java new file mode 100644 index 00000000000..7b23cf406a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionBuilder.java @@ -0,0 +1,84 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetPredicateUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetPredicateUpdateAction setPredicateUpdateAction = SetPredicateUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPredicateUpdateActionBuilder implements Builder { + + @Nullable + private String predicate; + + /** + *

    Value to set. If empty, any existing value will be removed.

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

    Value to set. If empty, any existing value will be removed.

    + * @return predicate + */ + + @Nullable + public String getPredicate() { + return this.predicate; + } + + /** + * builds SetPredicateUpdateAction with checking for non-null required values + * @return SetPredicateUpdateAction + */ + public SetPredicateUpdateAction build() { + return new SetPredicateUpdateActionImpl(predicate); + } + + /** + * builds SetPredicateUpdateAction without checking for non-null required values + * @return SetPredicateUpdateAction + */ + public SetPredicateUpdateAction buildUnchecked() { + return new SetPredicateUpdateActionImpl(predicate); + } + + /** + * factory method for an instance of SetPredicateUpdateActionBuilder + * @return builder + */ + public static SetPredicateUpdateActionBuilder of() { + return new SetPredicateUpdateActionBuilder(); + } + + /** + * create builder for SetPredicateUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPredicateUpdateActionBuilder of(final SetPredicateUpdateAction template) { + SetPredicateUpdateActionBuilder builder = new SetPredicateUpdateActionBuilder(); + builder.predicate = template.getPredicate(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionImpl.java new file mode 100644 index 00000000000..b827ec775cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the predicate of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPredicateUpdateActionImpl implements SetPredicateUpdateAction, ModelBase { + + private String action; + + private String predicate; + + /** + * create instance with all properties + */ + @JsonCreator + SetPredicateUpdateActionImpl(@JsonProperty("predicate") final String predicate) { + this.predicate = predicate; + this.action = SET_PREDICATE; + } + + /** + * create empty instance + */ + public SetPredicateUpdateActionImpl() { + this.action = SET_PREDICATE; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public String getPredicate() { + return this.predicate; + } + + public void setPredicate(final String predicate) { + this.predicate = predicate; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetPredicateUpdateActionImpl that = (SetPredicateUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(predicate, that.predicate) + .append(action, that.action) + .append(predicate, that.predicate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(predicate).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("predicate", predicate) + .build(); + } + + @Override + public SetPredicateUpdateAction copyDeep() { + return SetPredicateUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateAction.java new file mode 100644 index 00000000000..687d260ba33 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

    Sets the sorting info of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetSortingInfoUpdateAction setSortingInfoUpdateAction = SetSortingInfoUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setSortingInfo") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetSortingInfoUpdateActionImpl.class) +public interface SetSortingInfoUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetSortingInfoUpdateAction + */ + String SET_SORTING_INFO = "setSortingInfo"; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return sortingInfo + */ + @Valid + @JsonProperty("sortingInfo") + public SortingInfo getSortingInfo(); + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param sortingInfo value to be set + */ + + public void setSortingInfo(final SortingInfo sortingInfo); + + /** + * factory method + * @return instance of SetSortingInfoUpdateAction + */ + public static SetSortingInfoUpdateAction of() { + return new SetSortingInfoUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetSortingInfoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetSortingInfoUpdateAction of(final SetSortingInfoUpdateAction template) { + SetSortingInfoUpdateActionImpl instance = new SetSortingInfoUpdateActionImpl(); + instance.setSortingInfo(template.getSortingInfo()); + return instance; + } + + public SetSortingInfoUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetSortingInfoUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetSortingInfoUpdateAction deepCopy(@Nullable final SetSortingInfoUpdateAction template) { + if (template == null) { + return null; + } + SetSortingInfoUpdateActionImpl instance = new SetSortingInfoUpdateActionImpl(); + instance.setSortingInfo( + com.commercetools.checkout.models.payment_integration.SortingInfo.deepCopy(template.getSortingInfo())); + return instance; + } + + /** + * builder factory method for SetSortingInfoUpdateAction + * @return builder + */ + public static SetSortingInfoUpdateActionBuilder builder() { + return SetSortingInfoUpdateActionBuilder.of(); + } + + /** + * create builder for SetSortingInfoUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetSortingInfoUpdateActionBuilder builder(final SetSortingInfoUpdateAction template) { + return SetSortingInfoUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetSortingInfoUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionBuilder.java new file mode 100644 index 00000000000..dd75d3819bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionBuilder.java @@ -0,0 +1,111 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetSortingInfoUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetSortingInfoUpdateAction setSortingInfoUpdateAction = SetSortingInfoUpdateAction.builder()
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetSortingInfoUpdateActionBuilder implements Builder { + + @Nullable + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public SetSortingInfoUpdateActionBuilder sortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public SetSortingInfoUpdateActionBuilder withSortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()); + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @param sortingInfo value to be set + * @return Builder + */ + + public SetSortingInfoUpdateActionBuilder sortingInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + return this; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + * @return sortingInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + /** + * builds SetSortingInfoUpdateAction with checking for non-null required values + * @return SetSortingInfoUpdateAction + */ + public SetSortingInfoUpdateAction build() { + return new SetSortingInfoUpdateActionImpl(sortingInfo); + } + + /** + * builds SetSortingInfoUpdateAction without checking for non-null required values + * @return SetSortingInfoUpdateAction + */ + public SetSortingInfoUpdateAction buildUnchecked() { + return new SetSortingInfoUpdateActionImpl(sortingInfo); + } + + /** + * factory method for an instance of SetSortingInfoUpdateActionBuilder + * @return builder + */ + public static SetSortingInfoUpdateActionBuilder of() { + return new SetSortingInfoUpdateActionBuilder(); + } + + /** + * create builder for SetSortingInfoUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetSortingInfoUpdateActionBuilder of(final SetSortingInfoUpdateAction template) { + SetSortingInfoUpdateActionBuilder builder = new SetSortingInfoUpdateActionBuilder(); + builder.sortingInfo = template.getSortingInfo(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionImpl.java new file mode 100644 index 00000000000..562c72bdad7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the sorting info of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetSortingInfoUpdateActionImpl implements SetSortingInfoUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + /** + * create instance with all properties + */ + @JsonCreator + SetSortingInfoUpdateActionImpl( + @JsonProperty("sortingInfo") final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + this.action = SET_SORTING_INFO; + } + + /** + * create empty instance + */ + public SetSortingInfoUpdateActionImpl() { + this.action = SET_SORTING_INFO; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set. If empty, any existing value will be removed.

    + */ + + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + public void setSortingInfo(final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetSortingInfoUpdateActionImpl that = (SetSortingInfoUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(sortingInfo, that.sortingInfo) + .append(action, that.action) + .append(sortingInfo, that.sortingInfo) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(sortingInfo).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("sortingInfo", sortingInfo) + .build(); + } + + @Override + public SetSortingInfoUpdateAction copyDeep() { + return SetSortingInfoUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateAction.java new file mode 100644 index 00000000000..feb75b2879c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Sets the status of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetStatusUpdateAction setStatusUpdateAction = SetStatusUpdateAction.builder()
    + *             .status(PaymentIntegrationStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setStatus") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetStatusUpdateActionImpl.class) +public interface SetStatusUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetStatusUpdateAction + */ + String SET_STATUS = "setStatus"; + + /** + *

    Value to set as the status of the PaymentIntegration.

    + * @return status + */ + @NotNull + @JsonProperty("status") + public PaymentIntegrationStatus getStatus(); + + /** + *

    Value to set as the status of the PaymentIntegration.

    + * @param status value to be set + */ + + public void setStatus(final PaymentIntegrationStatus status); + + /** + * factory method + * @return instance of SetStatusUpdateAction + */ + public static SetStatusUpdateAction of() { + return new SetStatusUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetStatusUpdateAction of(final SetStatusUpdateAction template) { + SetStatusUpdateActionImpl instance = new SetStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + public SetStatusUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetStatusUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetStatusUpdateAction deepCopy(@Nullable final SetStatusUpdateAction template) { + if (template == null) { + return null; + } + SetStatusUpdateActionImpl instance = new SetStatusUpdateActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * builder factory method for SetStatusUpdateAction + * @return builder + */ + public static SetStatusUpdateActionBuilder builder() { + return SetStatusUpdateActionBuilder.of(); + } + + /** + * create builder for SetStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetStatusUpdateActionBuilder builder(final SetStatusUpdateAction template) { + return SetStatusUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetStatusUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionBuilder.java new file mode 100644 index 00000000000..9195fad319a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionBuilder.java @@ -0,0 +1,83 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetStatusUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetStatusUpdateAction setStatusUpdateAction = SetStatusUpdateAction.builder()
    + *             .status(PaymentIntegrationStatus.ACTIVE)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetStatusUpdateActionBuilder implements Builder { + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + /** + *

    Value to set as the status of the PaymentIntegration.

    + * @param status value to be set + * @return Builder + */ + + public SetStatusUpdateActionBuilder status( + final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + return this; + } + + /** + *

    Value to set as the status of the PaymentIntegration.

    + * @return status + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + /** + * builds SetStatusUpdateAction with checking for non-null required values + * @return SetStatusUpdateAction + */ + public SetStatusUpdateAction build() { + Objects.requireNonNull(status, SetStatusUpdateAction.class + ": status is missing"); + return new SetStatusUpdateActionImpl(status); + } + + /** + * builds SetStatusUpdateAction without checking for non-null required values + * @return SetStatusUpdateAction + */ + public SetStatusUpdateAction buildUnchecked() { + return new SetStatusUpdateActionImpl(status); + } + + /** + * factory method for an instance of SetStatusUpdateActionBuilder + * @return builder + */ + public static SetStatusUpdateActionBuilder of() { + return new SetStatusUpdateActionBuilder(); + } + + /** + * create builder for SetStatusUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetStatusUpdateActionBuilder of(final SetStatusUpdateAction template) { + SetStatusUpdateActionBuilder builder = new SetStatusUpdateActionBuilder(); + builder.status = template.getStatus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionImpl.java new file mode 100644 index 00000000000..93b6a226cce --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the status of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetStatusUpdateActionImpl implements SetStatusUpdateAction, ModelBase { + + private String action; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + /** + * create instance with all properties + */ + @JsonCreator + SetStatusUpdateActionImpl( + @JsonProperty("status") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + this.action = SET_STATUS; + } + + /** + * create empty instance + */ + public SetStatusUpdateActionImpl() { + this.action = SET_STATUS; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the status of the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + public void setStatus(final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetStatusUpdateActionImpl that = (SetStatusUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(status, that.status) + .append(action, that.action) + .append(status, that.status) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(status).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("status", status) + .build(); + } + + @Override + public SetStatusUpdateAction copyDeep() { + return SetStatusUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateAction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateAction.java new file mode 100644 index 00000000000..dbb69dbf6e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

    Sets the type of a PaymentIntegration.

    + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetTypeUpdateAction setTypeUpdateAction = SetTypeUpdateAction.builder()
    + *             .type("{type}")
    + *             .build()
    + * 
    + *
    + */ +@io.vrap.rmf.base.client.utils.json.SubType("setType") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetTypeUpdateActionImpl.class) +public interface SetTypeUpdateAction extends PaymentIntegrationUpdateAction { + + /** + * discriminator value for SetTypeUpdateAction + */ + String SET_TYPE = "setType"; + + /** + *

    Value to set as the type of the PaymentIntegration.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

    Value to set as the type of the PaymentIntegration.

    + * @param type value to be set + */ + + public void setType(final String type); + + /** + * factory method + * @return instance of SetTypeUpdateAction + */ + public static SetTypeUpdateAction of() { + return new SetTypeUpdateActionImpl(); + } + + /** + * factory method to create a shallow copy SetTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + public static SetTypeUpdateAction of(final SetTypeUpdateAction template) { + SetTypeUpdateActionImpl instance = new SetTypeUpdateActionImpl(); + instance.setType(template.getType()); + return instance; + } + + public SetTypeUpdateAction copyDeep(); + + /** + * factory method to create a deep copy of SetTypeUpdateAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetTypeUpdateAction deepCopy(@Nullable final SetTypeUpdateAction template) { + if (template == null) { + return null; + } + SetTypeUpdateActionImpl instance = new SetTypeUpdateActionImpl(); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for SetTypeUpdateAction + * @return builder + */ + public static SetTypeUpdateActionBuilder builder() { + return SetTypeUpdateActionBuilder.of(); + } + + /** + * create builder for SetTypeUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTypeUpdateActionBuilder builder(final SetTypeUpdateAction template) { + return SetTypeUpdateActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetTypeUpdateAction(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionBuilder.java new file mode 100644 index 00000000000..af574089e67 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetTypeUpdateActionBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SetTypeUpdateAction setTypeUpdateAction = SetTypeUpdateAction.builder()
    + *             .type("{type}")
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetTypeUpdateActionBuilder implements Builder { + + private String type; + + /** + *

    Value to set as the type of the PaymentIntegration.

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

    Value to set as the type of the PaymentIntegration.

    + * @return type + */ + + public String getType() { + return this.type; + } + + /** + * builds SetTypeUpdateAction with checking for non-null required values + * @return SetTypeUpdateAction + */ + public SetTypeUpdateAction build() { + Objects.requireNonNull(type, SetTypeUpdateAction.class + ": type is missing"); + return new SetTypeUpdateActionImpl(type); + } + + /** + * builds SetTypeUpdateAction without checking for non-null required values + * @return SetTypeUpdateAction + */ + public SetTypeUpdateAction buildUnchecked() { + return new SetTypeUpdateActionImpl(type); + } + + /** + * factory method for an instance of SetTypeUpdateActionBuilder + * @return builder + */ + public static SetTypeUpdateActionBuilder of() { + return new SetTypeUpdateActionBuilder(); + } + + /** + * create builder for SetTypeUpdateAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTypeUpdateActionBuilder of(final SetTypeUpdateAction template) { + SetTypeUpdateActionBuilder builder = new SetTypeUpdateActionBuilder(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionImpl.java new file mode 100644 index 00000000000..1afa5042ea5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

    Sets the type of a PaymentIntegration.

    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetTypeUpdateActionImpl implements SetTypeUpdateAction, ModelBase { + + private String action; + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + SetTypeUpdateActionImpl(@JsonProperty("type") final String type) { + this.type = type; + this.action = SET_TYPE; + } + + /** + * create empty instance + */ + public SetTypeUpdateActionImpl() { + this.action = SET_TYPE; + } + + /** + *

    Type of update action to be performed on the PaymentIntegration.

    + */ + + public String getAction() { + return this.action; + } + + /** + *

    Value to set as the type of the PaymentIntegration.

    + */ + + public String getType() { + return this.type; + } + + public void setType(final String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetTypeUpdateActionImpl that = (SetTypeUpdateActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(type, that.type) + .append(action, that.action) + .append(type, that.type) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("type", type) + .build(); + } + + @Override + public SetTypeUpdateAction copyDeep() { + return SetTypeUpdateAction.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfo.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfo.java new file mode 100644 index 00000000000..1e4f6ba165d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfo.java @@ -0,0 +1,124 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * SortingInfo + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SortingInfo sortingInfo = SortingInfo.builder()
    + *             .priority(1)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SortingInfoImpl.class) +public interface SortingInfo { + + /** + *

    Sorting priority of the Payment Integration.

    + * @return priority + */ + @NotNull + @JsonProperty("priority") + public Integer getPriority(); + + /** + *

    Sorting priority of the Payment Integration.

    + * @param priority value to be set + */ + + public void setPriority(final Integer priority); + + /** + * factory method + * @return instance of SortingInfo + */ + public static SortingInfo of() { + return new SortingInfoImpl(); + } + + /** + * factory method to create a shallow copy SortingInfo + * @param template instance to be copied + * @return copy instance + */ + public static SortingInfo of(final SortingInfo template) { + SortingInfoImpl instance = new SortingInfoImpl(); + instance.setPriority(template.getPriority()); + return instance; + } + + public SortingInfo copyDeep(); + + /** + * factory method to create a deep copy of SortingInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SortingInfo deepCopy(@Nullable final SortingInfo template) { + if (template == null) { + return null; + } + SortingInfoImpl instance = new SortingInfoImpl(); + instance.setPriority(template.getPriority()); + return instance; + } + + /** + * builder factory method for SortingInfo + * @return builder + */ + public static SortingInfoBuilder builder() { + return SortingInfoBuilder.of(); + } + + /** + * create builder for SortingInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SortingInfoBuilder builder(final SortingInfo template) { + return SortingInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSortingInfo(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoBuilder.java new file mode 100644 index 00000000000..d0d30a8a3ae --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SortingInfoBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     SortingInfo sortingInfo = SortingInfo.builder()
    + *             .priority(1)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SortingInfoBuilder implements Builder { + + private Integer priority; + + /** + *

    Sorting priority of the Payment Integration.

    + * @param priority value to be set + * @return Builder + */ + + public SortingInfoBuilder priority(final Integer priority) { + this.priority = priority; + return this; + } + + /** + *

    Sorting priority of the Payment Integration.

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

    Sorting priority of the Payment Integration.

    + */ + + public Integer getPriority() { + return this.priority; + } + + public void setPriority(final Integer priority) { + this.priority = priority; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SortingInfoImpl that = (SortingInfoImpl) o; + + return new EqualsBuilder().append(priority, that.priority).append(priority, that.priority).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(priority).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("priority", priority).build(); + } + + @Override + public SortingInfo copyDeep() { + return SortingInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraft.java new file mode 100644 index 00000000000..edefce5b4e0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraft.java @@ -0,0 +1,315 @@ + +package com.commercetools.checkout.models.payment_integration_draft; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.checkout.models.application.ApplicationReference; +import com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration; +import com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference; +import com.commercetools.checkout.models.payment_integration.DisplayInfo; +import com.commercetools.checkout.models.payment_integration.PaymentComponentType; +import com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus; +import com.commercetools.checkout.models.payment_integration.SortingInfo; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * PaymentIntegrationDraft + * + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegrationDraft paymentIntegrationDraft = PaymentIntegrationDraft.builder()
    + *             .application(applicationBuilder -> applicationBuilder)
    + *             .type("{type}")
    + *             .name("{name}")
    + *             .componentType(PaymentComponentType.COMPONENT)
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentIntegrationDraftImpl.class) +public interface PaymentIntegrationDraft extends io.vrap.rmf.base.client.Draft { + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @return application + */ + @NotNull + @Valid + @JsonProperty("application") + public ApplicationReference getApplication(); + + /** + *

    Indicates whether the Payment Integration is active or not. By default in Inactive.

    + * @return status + */ + + @JsonProperty("status") + public PaymentIntegrationStatus getStatus(); + + /** + *

    Type of the PaymentIntegration. ie. card, paypal, applepay.

    + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + * @return predicate + */ + + @JsonProperty("predicate") + public String getPredicate(); + + /** + *

    Indicates the component type of payment integration.

    + * @return componentType + */ + @NotNull + @JsonProperty("componentType") + public PaymentComponentType getComponentType(); + + /** + *

    Connector deployment info for the payment integration.

    + * @return connectorDeployment + */ + @NotNull + @Valid + @JsonProperty("connectorDeployment") + public ConnectorDeploymentReference getConnectorDeployment(); + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @return displayInfo + */ + @Valid + @JsonProperty("displayInfo") + public DisplayInfo getDisplayInfo(); + + /** + *

    Sorting info of the payment integration.

    + * @return sortingInfo + */ + @Valid + @JsonProperty("sortingInfo") + public SortingInfo getSortingInfo(); + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @return automatedReversalConfiguration + */ + @Valid + @JsonProperty("automatedReversalConfiguration") + public AutomatedReversalConfiguration getAutomatedReversalConfiguration(); + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @param application value to be set + */ + + public void setApplication(final ApplicationReference application); + + /** + *

    Indicates whether the Payment Integration is active or not. By default in Inactive.

    + * @param status value to be set + */ + + public void setStatus(final PaymentIntegrationStatus status); + + /** + *

    Type of the PaymentIntegration. ie. card, paypal, applepay.

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

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

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

    Indicates the component type of payment integration.

    + * @param componentType value to be set + */ + + public void setComponentType(final PaymentComponentType componentType); + + /** + *

    Connector deployment info for the payment integration.

    + * @param connectorDeployment value to be set + */ + + public void setConnectorDeployment(final ConnectorDeploymentReference connectorDeployment); + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param displayInfo value to be set + */ + + public void setDisplayInfo(final DisplayInfo displayInfo); + + /** + *

    Sorting info of the payment integration.

    + * @param sortingInfo value to be set + */ + + public void setSortingInfo(final SortingInfo sortingInfo); + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @param automatedReversalConfiguration value to be set + */ + + public void setAutomatedReversalConfiguration(final AutomatedReversalConfiguration automatedReversalConfiguration); + + /** + * factory method + * @return instance of PaymentIntegrationDraft + */ + public static PaymentIntegrationDraft of() { + return new PaymentIntegrationDraftImpl(); + } + + /** + * factory method to create a shallow copy PaymentIntegrationDraft + * @param template instance to be copied + * @return copy instance + */ + public static PaymentIntegrationDraft of(final PaymentIntegrationDraft template) { + PaymentIntegrationDraftImpl instance = new PaymentIntegrationDraftImpl(); + instance.setKey(template.getKey()); + instance.setApplication(template.getApplication()); + instance.setStatus(template.getStatus()); + instance.setType(template.getType()); + instance.setName(template.getName()); + instance.setPredicate(template.getPredicate()); + instance.setComponentType(template.getComponentType()); + instance.setConnectorDeployment(template.getConnectorDeployment()); + instance.setDisplayInfo(template.getDisplayInfo()); + instance.setSortingInfo(template.getSortingInfo()); + instance.setAutomatedReversalConfiguration(template.getAutomatedReversalConfiguration()); + return instance; + } + + public PaymentIntegrationDraft copyDeep(); + + /** + * factory method to create a deep copy of PaymentIntegrationDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentIntegrationDraft deepCopy(@Nullable final PaymentIntegrationDraft template) { + if (template == null) { + return null; + } + PaymentIntegrationDraftImpl instance = new PaymentIntegrationDraftImpl(); + instance.setKey(template.getKey()); + instance.setApplication( + com.commercetools.checkout.models.application.ApplicationReference.deepCopy(template.getApplication())); + instance.setStatus(template.getStatus()); + instance.setType(template.getType()); + instance.setName(template.getName()); + instance.setPredicate(template.getPredicate()); + instance.setComponentType(template.getComponentType()); + instance.setConnectorDeployment( + com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference + .deepCopy(template.getConnectorDeployment())); + instance.setDisplayInfo( + com.commercetools.checkout.models.payment_integration.DisplayInfo.deepCopy(template.getDisplayInfo())); + instance.setSortingInfo( + com.commercetools.checkout.models.payment_integration.SortingInfo.deepCopy(template.getSortingInfo())); + instance.setAutomatedReversalConfiguration( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration + .deepCopy(template.getAutomatedReversalConfiguration())); + return instance; + } + + /** + * builder factory method for PaymentIntegrationDraft + * @return builder + */ + public static PaymentIntegrationDraftBuilder builder() { + return PaymentIntegrationDraftBuilder.of(); + } + + /** + * create builder for PaymentIntegrationDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationDraftBuilder builder(final PaymentIntegrationDraft template) { + return PaymentIntegrationDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentIntegrationDraft(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-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftBuilder.java new file mode 100644 index 00000000000..098b30e3d14 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftBuilder.java @@ -0,0 +1,474 @@ + +package com.commercetools.checkout.models.payment_integration_draft; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentIntegrationDraftBuilder + *
    + * Example to create an instance using the builder pattern + *
    + *
    
    + *     PaymentIntegrationDraft paymentIntegrationDraft = PaymentIntegrationDraft.builder()
    + *             .application(applicationBuilder -> applicationBuilder)
    + *             .type("{type}")
    + *             .name("{name}")
    + *             .componentType(PaymentComponentType.COMPONENT)
    + *             .connectorDeployment(connectorDeploymentBuilder -> connectorDeploymentBuilder)
    + *             .build()
    + * 
    + *
    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationDraftBuilder implements Builder { + + @Nullable + private String key; + + private com.commercetools.checkout.models.application.ApplicationReference application; + + @Nullable + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + private String type; + + private String name; + + @Nullable + private String predicate; + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType; + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + @Nullable + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + @Nullable + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + @Nullable + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @param builder function to build the application value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder application( + Function builder) { + this.application = builder.apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

    Reference to an Application associated with the PaymentIntegration.

    + * @param builder function to build the application value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder withApplication( + Function builder) { + this.application = builder + .apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()); + return this; + } + + /** + *

    Reference to an Application associated with the PaymentIntegration.

    + * @param application value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder application( + final com.commercetools.checkout.models.application.ApplicationReference application) { + this.application = application; + return this; + } + + /** + *

    Indicates whether the Payment Integration is active or not. By default in Inactive.

    + * @param status value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder status( + @Nullable final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + return this; + } + + /** + *

    Type of the PaymentIntegration. ie. card, paypal, applepay.

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

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

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

    Indicates the component type of payment integration.

    + * @param componentType value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder componentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType) { + this.componentType = componentType; + return this; + } + + /** + *

    Connector deployment info for the payment integration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder connectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

    Connector deployment info for the payment integration.

    + * @param builder function to build the connectorDeployment value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder withConnectorDeployment( + Function builder) { + this.connectorDeployment = builder + .apply(com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceBuilder.of()); + return this; + } + + /** + *

    Connector deployment info for the payment integration.

    + * @param connectorDeployment value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder connectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder displayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param builder function to build the displayInfo value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder withDisplayInfo( + Function builder) { + this.displayInfo = builder.apply(com.commercetools.checkout.models.payment_integration.DisplayInfoBuilder.of()); + return this; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @param displayInfo value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder displayInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + return this; + } + + /** + *

    Sorting info of the payment integration.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder sortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()) + .build(); + return this; + } + + /** + *

    Sorting info of the payment integration.

    + * @param builder function to build the sortingInfo value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder withSortingInfo( + Function builder) { + this.sortingInfo = builder.apply(com.commercetools.checkout.models.payment_integration.SortingInfoBuilder.of()); + return this; + } + + /** + *

    Sorting info of the payment integration.

    + * @param sortingInfo value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder sortingInfo( + @Nullable final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + return this; + } + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder automatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder + .apply(com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()) + .build(); + return this; + } + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @param builder function to build the automatedReversalConfiguration value + * @return Builder + */ + + public PaymentIntegrationDraftBuilder withAutomatedReversalConfiguration( + Function builder) { + this.automatedReversalConfiguration = builder.apply( + com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationBuilder.of()); + return this; + } + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @param automatedReversalConfiguration value to be set + * @return Builder + */ + + public PaymentIntegrationDraftBuilder automatedReversalConfiguration( + @Nullable final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + return this; + } + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + * @return application + */ + + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { + return this.application; + } + + /** + *

    Indicates whether the Payment Integration is active or not. By default in Inactive.

    + * @return status + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + /** + *

    Type of the PaymentIntegration. ie. card, paypal, applepay.

    + * @return type + */ + + public String getType() { + return this.type; + } + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + * @return predicate + */ + + @Nullable + public String getPredicate() { + return this.predicate; + } + + /** + *

    Indicates the component type of payment integration.

    + * @return componentType + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getComponentType() { + return this.componentType; + } + + /** + *

    Connector deployment info for the payment integration.

    + * @return connectorDeployment + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + * @return displayInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + /** + *

    Sorting info of the payment integration.

    + * @return sortingInfo + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + /** + *

    Configuration of the payment integration automatic reversal.

    + * @return automatedReversalConfiguration + */ + + @Nullable + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + /** + * builds PaymentIntegrationDraft with checking for non-null required values + * @return PaymentIntegrationDraft + */ + public PaymentIntegrationDraft build() { + Objects.requireNonNull(application, PaymentIntegrationDraft.class + ": application is missing"); + Objects.requireNonNull(type, PaymentIntegrationDraft.class + ": type is missing"); + Objects.requireNonNull(name, PaymentIntegrationDraft.class + ": name is missing"); + Objects.requireNonNull(componentType, PaymentIntegrationDraft.class + ": componentType is missing"); + Objects.requireNonNull(connectorDeployment, PaymentIntegrationDraft.class + ": connectorDeployment is missing"); + return new PaymentIntegrationDraftImpl(key, application, status, type, name, predicate, componentType, + connectorDeployment, displayInfo, sortingInfo, automatedReversalConfiguration); + } + + /** + * builds PaymentIntegrationDraft without checking for non-null required values + * @return PaymentIntegrationDraft + */ + public PaymentIntegrationDraft buildUnchecked() { + return new PaymentIntegrationDraftImpl(key, application, status, type, name, predicate, componentType, + connectorDeployment, displayInfo, sortingInfo, automatedReversalConfiguration); + } + + /** + * factory method for an instance of PaymentIntegrationDraftBuilder + * @return builder + */ + public static PaymentIntegrationDraftBuilder of() { + return new PaymentIntegrationDraftBuilder(); + } + + /** + * create builder for PaymentIntegrationDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentIntegrationDraftBuilder of(final PaymentIntegrationDraft template) { + PaymentIntegrationDraftBuilder builder = new PaymentIntegrationDraftBuilder(); + builder.key = template.getKey(); + builder.application = template.getApplication(); + builder.status = template.getStatus(); + builder.type = template.getType(); + builder.name = template.getName(); + builder.predicate = template.getPredicate(); + builder.componentType = template.getComponentType(); + builder.connectorDeployment = template.getConnectorDeployment(); + builder.displayInfo = template.getDisplayInfo(); + builder.sortingInfo = template.getSortingInfo(); + builder.automatedReversalConfiguration = template.getAutomatedReversalConfiguration(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftImpl.java new file mode 100644 index 00000000000..6520937c811 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftImpl.java @@ -0,0 +1,286 @@ + +package com.commercetools.checkout.models.payment_integration_draft; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * PaymentIntegrationDraft + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentIntegrationDraftImpl implements PaymentIntegrationDraft, ModelBase { + + private String key; + + private com.commercetools.checkout.models.application.ApplicationReference application; + + private com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status; + + private String type; + + private String name; + + private String predicate; + + private com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType; + + private com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment; + + private com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo; + + private com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo; + + private com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentIntegrationDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationReference application, + @JsonProperty("status") final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status, + @JsonProperty("type") final String type, @JsonProperty("name") final String name, + @JsonProperty("predicate") final String predicate, + @JsonProperty("componentType") final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType, + @JsonProperty("connectorDeployment") final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment, + @JsonProperty("displayInfo") final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo, + @JsonProperty("sortingInfo") final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo, + @JsonProperty("automatedReversalConfiguration") final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.key = key; + this.application = application; + this.status = status; + this.type = type; + this.name = name; + this.predicate = predicate; + this.componentType = componentType; + this.connectorDeployment = connectorDeployment; + this.displayInfo = displayInfo; + this.sortingInfo = sortingInfo; + this.automatedReversalConfiguration = automatedReversalConfiguration; + } + + /** + * create empty instance + */ + public PaymentIntegrationDraftImpl() { + } + + /** + *

    User-defined unique identifier of the PaymentIntegration. MinLength: 2 ​MaxLength: 256 ​Pattern: ^[A-Za-z0-9_-]+$

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

    Reference to an Application associated with the PaymentIntegration.

    + */ + + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { + return this.application; + } + + /** + *

    Indicates whether the Payment Integration is active or not. By default in Inactive.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus getStatus() { + return this.status; + } + + /** + *

    Type of the PaymentIntegration. ie. card, paypal, applepay.

    + */ + + public String getType() { + return this.type; + } + + /** + *

    Name of the PaymentIntegration in the Merchant Center.

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

    Predicate in JSONata format. Applies only when componentType is Component.

    + */ + + public String getPredicate() { + return this.predicate; + } + + /** + *

    Indicates the component type of payment integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.PaymentComponentType getComponentType() { + return this.componentType; + } + + /** + *

    Connector deployment info for the payment integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference getConnectorDeployment() { + return this.connectorDeployment; + } + + /** + *

    Customization for the information that is displayed in the UI. Applies only when componentType is Component

    + */ + + public com.commercetools.checkout.models.payment_integration.DisplayInfo getDisplayInfo() { + return this.displayInfo; + } + + /** + *

    Sorting info of the payment integration.

    + */ + + public com.commercetools.checkout.models.payment_integration.SortingInfo getSortingInfo() { + return this.sortingInfo; + } + + /** + *

    Configuration of the payment integration automatic reversal.

    + */ + + public com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration getAutomatedReversalConfiguration() { + return this.automatedReversalConfiguration; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setApplication(final com.commercetools.checkout.models.application.ApplicationReference application) { + this.application = application; + } + + public void setStatus(final com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus status) { + this.status = status; + } + + public void setType(final String type) { + this.type = type; + } + + public void setName(final String name) { + this.name = name; + } + + public void setPredicate(final String predicate) { + this.predicate = predicate; + } + + public void setComponentType( + final com.commercetools.checkout.models.payment_integration.PaymentComponentType componentType) { + this.componentType = componentType; + } + + public void setConnectorDeployment( + final com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReference connectorDeployment) { + this.connectorDeployment = connectorDeployment; + } + + public void setDisplayInfo(final com.commercetools.checkout.models.payment_integration.DisplayInfo displayInfo) { + this.displayInfo = displayInfo; + } + + public void setSortingInfo(final com.commercetools.checkout.models.payment_integration.SortingInfo sortingInfo) { + this.sortingInfo = sortingInfo; + } + + public void setAutomatedReversalConfiguration( + final com.commercetools.checkout.models.payment_integration.AutomatedReversalConfiguration automatedReversalConfiguration) { + this.automatedReversalConfiguration = automatedReversalConfiguration; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentIntegrationDraftImpl that = (PaymentIntegrationDraftImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(application, that.application) + .append(status, that.status) + .append(type, that.type) + .append(name, that.name) + .append(predicate, that.predicate) + .append(componentType, that.componentType) + .append(connectorDeployment, that.connectorDeployment) + .append(displayInfo, that.displayInfo) + .append(sortingInfo, that.sortingInfo) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .append(key, that.key) + .append(application, that.application) + .append(status, that.status) + .append(type, that.type) + .append(name, that.name) + .append(predicate, that.predicate) + .append(componentType, that.componentType) + .append(connectorDeployment, that.connectorDeployment) + .append(displayInfo, that.displayInfo) + .append(sortingInfo, that.sortingInfo) + .append(automatedReversalConfiguration, that.automatedReversalConfiguration) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(application) + .append(status) + .append(type) + .append(name) + .append(predicate) + .append(componentType) + .append(connectorDeployment) + .append(displayInfo) + .append(sortingInfo) + .append(automatedReversalConfiguration) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("application", application) + .append("status", status) + .append("type", type) + .append("name", name) + .append("predicate", predicate) + .append("componentType", componentType) + .append("connectorDeployment", connectorDeployment) + .append("displayInfo", displayInfo) + .append("sortingInfo", sortingInfo) + .append("automatedReversalConfiguration", automatedReversalConfiguration) + .build(); + } + + @Override + public PaymentIntegrationDraft copyDeep() { + return PaymentIntegrationDraft.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java index 894923fcb2f..ef04589bb83 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPayment.java @@ -31,7 +31,7 @@ * * */ -@io.vrap.rmf.base.client.utils.json.SubType("cart_with_exisiting_payment") +@io.vrap.rmf.base.client.utils.json.SubType("cart_with_existing_payment") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = CartWithExistingPaymentImpl.class) public interface CartWithExistingPayment extends ResponseMessage { @@ -39,7 +39,7 @@ public interface CartWithExistingPayment extends ResponseMessage { /** * discriminator value for CartWithExistingPayment */ - String CART_WITH_EXISITING_PAYMENT = "cart_with_exisiting_payment"; + String CART_WITH_EXISTING_PAYMENT = "cart_with_existing_payment"; /** * diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java index 6538d8eb5de..c8d81c9e8bf 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/CartWithExistingPaymentImpl.java @@ -43,14 +43,14 @@ public class CartWithExistingPaymentImpl implements CartWithExistingPayment, Mod this.message = message; this.correlationId = correlationId; this.payload = payload; - this.code = CART_WITH_EXISITING_PAYMENT; + this.code = CART_WITH_EXISTING_PAYMENT; } /** * create empty instance */ public CartWithExistingPaymentImpl() { - this.code = CART_WITH_EXISITING_PAYMENT; + this.code = CART_WITH_EXISTING_PAYMENT; } /** diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java index a4a015713a5..16dc24730c1 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/Message.java @@ -160,10 +160,10 @@ public static com.commercetools.checkout.models.responses.CartNotFoundBuilder ca } /** - * builder for cartWithExisitingPayment subtype + * builder for cartWithExistingPayment subtype * @return builder */ - public static com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExisitingPaymentBuilder() { + public static com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExistingPaymentBuilder() { return com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java index 039b59fb139..a4116b21898 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/responses/MessageBuilder.java @@ -35,7 +35,7 @@ public com.commercetools.checkout.models.responses.CartNotFoundBuilder cartNotFo return com.commercetools.checkout.models.responses.CartNotFoundBuilder.of(); } - public com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExisitingPaymentBuilder() { + public com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder cartWithExistingPaymentBuilder() { return com.commercetools.checkout.models.responses.CartWithExistingPaymentBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java index 38191c188fc..e633190d11e 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/Transaction.java @@ -9,7 +9,7 @@ import javax.annotation.Nullable; -import com.commercetools.checkout.models.application.ApplicationResourceIdentifier; +import com.commercetools.checkout.models.application.ApplicationReference; import com.commercetools.checkout.models.cart.CartReference; import com.commercetools.checkout.models.cart.OrderReference; import com.fasterxml.jackson.annotation.*; @@ -68,13 +68,13 @@ public interface Transaction { public Integer getVersion(); /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @return application */ @NotNull @Valid @JsonProperty("application") - public ApplicationResourceIdentifier getApplication(); + public ApplicationReference getApplication(); /** *

    Transaction Item associated with the Transaction.

    @@ -148,11 +148,11 @@ public interface Transaction { public void setVersion(final Integer version); /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @param application value to be set */ - public void setApplication(final ApplicationResourceIdentifier application); + public void setApplication(final ApplicationReference application); /** *

    Transaction Item associated with the Transaction.

    @@ -248,8 +248,8 @@ public static Transaction deepCopy(@Nullable final Transaction template) { instance.setId(template.getId()); instance.setKey(template.getKey()); instance.setVersion(template.getVersion()); - instance.setApplication(com.commercetools.checkout.models.application.ApplicationResourceIdentifier - .deepCopy(template.getApplication())); + instance.setApplication( + com.commercetools.checkout.models.application.ApplicationReference.deepCopy(template.getApplication())); instance.setTransactionItems(Optional.ofNullable(template.getTransactionItems()) .map(t -> t.stream() .map(com.commercetools.checkout.models.transaction.TransactionItem::deepCopy) diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java index 2e191a01826..e708be80c71 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionBuilder.java @@ -37,7 +37,7 @@ public class TransactionBuilder implements Builder { private Integer version; - private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + private com.commercetools.checkout.models.application.ApplicationReference application; private java.util.List transactionItems; @@ -87,40 +87,39 @@ public TransactionBuilder version(final Integer version) { } /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @param builder function to build the application value * @return Builder */ public TransactionBuilder application( - Function builder) { - this.application = builder - .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()) + Function builder) { + this.application = builder.apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()) .build(); return this; } /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @param builder function to build the application value * @return Builder */ public TransactionBuilder withApplication( - Function builder) { + Function builder) { this.application = builder - .apply(com.commercetools.checkout.models.application.ApplicationResourceIdentifierBuilder.of()); + .apply(com.commercetools.checkout.models.application.ApplicationReferenceBuilder.of()); return this; } /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @param application value to be set * @return Builder */ public TransactionBuilder application( - final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + final com.commercetools.checkout.models.application.ApplicationReference application) { this.application = application; return this; } @@ -378,11 +377,11 @@ public Integer getVersion() { } /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    * @return application */ - public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { return this.application; } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java index 418b0cee8e7..ba77392b623 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraft.java @@ -46,7 +46,7 @@ public interface TransactionDraft extends io.vrap.rmf.base.client.DraftApplication for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @return application */ @NotNull @@ -64,7 +64,7 @@ public interface TransactionDraft extends io.vrap.rmf.base.client.Draft getTransactionItems(); /** - *

    Cart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @return cart */ @NotNull @@ -80,7 +80,7 @@ public interface TransactionDraft extends io.vrap.rmf.base.client.DraftApplication for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @param application value to be set */ @@ -102,7 +102,7 @@ public interface TransactionDraft extends io.vrap.rmf.base.client.Draft transactionItems); /** - *

    Cart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @param cart value to be set */ diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java index 6c1f7e21955..3628f23524f 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftBuilder.java @@ -47,7 +47,7 @@ public TransactionDraftBuilder key(@Nullable final String key) { } /** - *

    Application for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @param builder function to build the application value * @return Builder */ @@ -61,7 +61,7 @@ public TransactionDraftBuilder application( } /** - *

    Application for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @param builder function to build the application value * @return Builder */ @@ -74,7 +74,7 @@ public TransactionDraftBuilder withApplication( } /** - *

    Application for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @param application value to be set * @return Builder */ @@ -179,7 +179,7 @@ public TransactionDraftBuilder setTransactionItems( } /** - *

    Cart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @param builder function to build the cart value * @return Builder */ @@ -191,7 +191,7 @@ public TransactionDraftBuilder cart( } /** - *

    Cart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @param builder function to build the cart value * @return Builder */ @@ -203,7 +203,7 @@ public TransactionDraftBuilder withCart( } /** - *

    Cart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @param cart value to be set * @return Builder */ @@ -224,7 +224,7 @@ public String getKey() { } /** - *

    Application for which the payment is executed.

    + *

    Application for which the payment is executed.

    * @return application */ @@ -242,7 +242,7 @@ public java.util.ListCart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    * @return cart */ diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java index 56f8c00ffc9..a8de1aca7e4 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionDraftImpl.java @@ -59,7 +59,7 @@ public String getKey() { } /** - *

    Application for which the payment is executed.

    + *

    Application for which the payment is executed.

    */ public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { @@ -75,7 +75,7 @@ public java.util.ListCart for which the payment must be executed.

    + *

    Cart for which the payment must be executed.

    */ public com.commercetools.checkout.models.cart.CartResourceIdentifier getCart() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java index 81ed06f3348..b6fb131b890 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionImpl.java @@ -28,7 +28,7 @@ public class TransactionImpl implements Transaction, ModelBase { private Integer version; - private com.commercetools.checkout.models.application.ApplicationResourceIdentifier application; + private com.commercetools.checkout.models.application.ApplicationReference application; private java.util.List transactionItems; @@ -48,7 +48,7 @@ public class TransactionImpl implements Transaction, ModelBase { @JsonCreator TransactionImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, @JsonProperty("version") final Integer version, - @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application, + @JsonProperty("application") final com.commercetools.checkout.models.application.ApplicationReference application, @JsonProperty("transactionItems") final java.util.List transactionItems, @JsonProperty("cart") final com.commercetools.checkout.models.cart.CartReference cart, @JsonProperty("transactionStatus") final com.commercetools.checkout.models.transaction.TransactionStatus transactionStatus, @@ -98,10 +98,10 @@ public Integer getVersion() { } /** - *

    Application for which the payment must be executed.

    + *

    Application for which the payment must be executed.

    */ - public com.commercetools.checkout.models.application.ApplicationResourceIdentifier getApplication() { + public com.commercetools.checkout.models.application.ApplicationReference getApplication() { return this.application; } @@ -165,8 +165,7 @@ public void setVersion(final Integer version) { this.version = version; } - public void setApplication( - final com.commercetools.checkout.models.application.ApplicationResourceIdentifier application) { + public void setApplication(final com.commercetools.checkout.models.application.ApplicationReference application) { this.application = application; } diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java index 984746e52ef..7333b2701b7 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItem.java @@ -44,7 +44,7 @@ public interface TransactionItem { public Amount getAmount(); /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @return payment */ @Valid @@ -52,7 +52,7 @@ public interface TransactionItem { public PaymentReference getPayment(); /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @return paymentIntegration */ @NotNull @@ -68,14 +68,14 @@ public interface TransactionItem { public void setAmount(final Amount amount); /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @param payment value to be set */ public void setPayment(final PaymentReference payment); /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @param paymentIntegration value to be set */ diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java index 01f4d56106a..650117445d0 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemBuilder.java @@ -68,7 +68,7 @@ public TransactionItemBuilder amount(@Nullable final com.commercetools.checkout. } /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @param builder function to build the payment value * @return Builder */ @@ -80,7 +80,7 @@ public TransactionItemBuilder payment( } /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @param builder function to build the payment value * @return Builder */ @@ -92,7 +92,7 @@ public TransactionItemBuilder withPayment( } /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @param payment value to be set * @return Builder */ @@ -104,7 +104,7 @@ public TransactionItemBuilder payment( } /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @param builder function to build the paymentIntegration value * @return Builder */ @@ -118,7 +118,7 @@ public TransactionItemBuilder paymentIntegration( } /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @param builder function to build the paymentIntegration value * @return Builder */ @@ -131,7 +131,7 @@ public TransactionItemBuilder withPaymentIntegration( } /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @param paymentIntegration value to be set * @return Builder */ @@ -153,7 +153,7 @@ public com.commercetools.checkout.models.common.Amount getAmount() { } /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    * @return payment */ @@ -163,7 +163,7 @@ public com.commercetools.checkout.models.payment.PaymentReference getPayment() { } /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    * @return paymentIntegration */ diff --git a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java index 32fab10f2b1..b7f4d9945db 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java +++ b/commercetools/commercetools-sdk-java-checkout/src/main/java-generated/com/commercetools/checkout/models/transaction/TransactionItemImpl.java @@ -55,7 +55,7 @@ public com.commercetools.checkout.models.common.Amount getAmount() { } /** - *

    Reference to the Payment associated with the Transaction Item.

    + *

    Reference to the Payment associated with the Transaction Item.

    */ public com.commercetools.checkout.models.payment.PaymentReference getPayment() { @@ -63,7 +63,7 @@ public com.commercetools.checkout.models.payment.PaymentReference getPayment() { } /** - *

    Reference to the Payment Integration to use to execute the payment.

    + *

    Reference to the Payment Integration to use to execute the payment.

    */ public com.commercetools.checkout.models.payment_integration.PaymentIntegrationReference getPaymentIntegration() { diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsByIdTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsByIdTest.java new file mode 100644 index 00000000000..7b7c9060a3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsByIdTest.java @@ -0,0 +1,100 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsByIdTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").applications().withId("test_id").get().createHttpRequest(), + "get", "test_projectKey/applications/test_id", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .head() + .createHttpRequest(), "head", "test_projectKey/applications/test_id", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .post(com.commercetools.checkout.models.application.ApplicationUpdateActions.of()) + .createHttpRequest(), "post", "test_projectKey/applications/test_id", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .delete() + .withVersion(2) + .createHttpRequest(), "delete", "test_projectKey/applications/test_id?version=2", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .delete() + .createHttpRequest(), "delete", "test_projectKey/applications/test_id", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().withId("test_id").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().withId("test_id").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .post(com.commercetools.checkout.models.application.ApplicationUpdateActions.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withId("test_id") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().withId("test_id").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsKeyByKeyTest.java new file mode 100644 index 00000000000..09e937f20fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsKeyByKeyTest.java @@ -0,0 +1,103 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsKeyByKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").applications().withKey("test_key").get().createHttpRequest(), + "get", "test_projectKey/applications/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .post(com.commercetools.checkout.models.application.ApplicationUpdateActions.of()) + .createHttpRequest(), "post", "test_projectKey/applications/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .head() + .createHttpRequest(), "head", "test_projectKey/applications/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/applications/key=test_key?version=2", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .delete() + .createHttpRequest(), "delete", "test_projectKey/applications/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().withKey("test_key").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .post(com.commercetools.checkout.models.application.ApplicationUpdateActions.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().withKey("test_key").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .withKey("test_key") + .delete() + .withVersion(2), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").applications().withKey("test_key").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsTest.java new file mode 100644 index 00000000000..a8c16666803 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyApplicationsTest.java @@ -0,0 +1,94 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyApplicationsTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").applications().get().withSort("sort").createHttpRequest(), + "get", "test_projectKey/applications?sort=sort", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").applications().get().withLimit(7).createHttpRequest(), + "get", "test_projectKey/applications?limit=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .get() + .withOffset(3) + .createHttpRequest(), "get", "test_projectKey/applications?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/applications?withTotal=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get().createHttpRequest(), + "get", "test_projectKey/applications", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .post(com.commercetools.checkout.models.application.ApplicationDraft.of()) + .createHttpRequest(), "post", "test_projectKey/applications", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get().withOffset(3), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get().withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").applications().get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .applications() + .post(com.commercetools.checkout.models.application.ApplicationDraft.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsByIdTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsByIdTest.java new file mode 100644 index 00000000000..e730e6d5f86 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsByIdTest.java @@ -0,0 +1,110 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsByIdTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .get() + .createHttpRequest(), "get", "test_projectKey/payment-integrations/test_id", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .head() + .createHttpRequest(), "head", "test_projectKey/payment-integrations/test_id", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .post( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions.of()) + .createHttpRequest(), "post", "test_projectKey/payment-integrations/test_id", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/payment-integrations/test_id?version=2", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .delete() + .createHttpRequest(), "delete", "test_projectKey/payment-integrations/test_id", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().withId("test_id").get(), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().withId("test_id").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .post(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions + .of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withId("test_id") + .delete() + .withVersion(2), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().withId("test_id").delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsKeyByKeyTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsKeyByKeyTest.java new file mode 100644 index 00000000000..34e8e0f9a0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsKeyByKeyTest.java @@ -0,0 +1,114 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsKeyByKeyTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .get() + .createHttpRequest(), "get", "test_projectKey/payment-integrations/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .post( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions.of()) + .createHttpRequest(), "post", "test_projectKey/payment-integrations/key=test_key", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .head() + .createHttpRequest(), "head", "test_projectKey/payment-integrations/key=test_key", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .delete() + .withVersion(2) + .createHttpRequest(), + "delete", "test_projectKey/payment-integrations/key=test_key?version=2", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .delete() + .createHttpRequest(), + "delete", "test_projectKey/payment-integrations/key=test_key", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().withKey("test_key").get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .post(com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActions + .of()), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().withKey("test_key").head(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .delete() + .withVersion(2), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .withKey("test_key") + .delete(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsTest.java new file mode 100644 index 00000000000..0baa3fb7757 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/client/resource/ByProjectKeyPaymentIntegrationsTest.java @@ -0,0 +1,103 @@ + +package com.commercetools.checkout.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.checkout.client.ApiRoot; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyPaymentIntegrationsTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @ParameterizedTest + @MethodSource("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @ParameterizedTest + @MethodSource("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .get() + .withSort("sort") + .createHttpRequest(), "get", "test_projectKey/payment-integrations?sort=sort", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .get() + .withLimit(7) + .createHttpRequest(), "get", "test_projectKey/payment-integrations?limit=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .get() + .withOffset(3) + .createHttpRequest(), "get", "test_projectKey/payment-integrations?offset=3", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .get() + .withWithTotal(true) + .createHttpRequest(), "get", "test_projectKey/payment-integrations?withTotal=true", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get().createHttpRequest(), + "get", "test_projectKey/payment-integrations", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .post(com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft.of()) + .createHttpRequest(), "post", "test_projectKey/payment-integrations", } }; + } + + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get().withSort("sort"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get().withLimit(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get().withOffset(3), }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get().withWithTotal(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").paymentIntegrations().get(), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .paymentIntegrations() + .post(com.commercetools.checkout.models.payment_integration_draft.PaymentIntegrationDraft + .of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionTest.java new file mode 100644 index 00000000000..a1ac6fe0f7d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddAllowedOriginUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AddAllowedOriginUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AddAllowedOriginUpdateActionBuilder builder) { + AddAllowedOriginUpdateAction addAllowedOriginUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(addAllowedOriginUpdateAction).isInstanceOf(AddAllowedOriginUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "origin", AddAllowedOriginUpdateAction.builder().origin("origin") } }; + } + + @Test + public void origin() { + AddAllowedOriginUpdateAction value = AddAllowedOriginUpdateAction.of(); + value.setOrigin("origin"); + Assertions.assertThat(value.getOrigin()).isEqualTo("origin"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionTest.java new file mode 100644 index 00000000000..1f46447d21a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddApplicationAgreementUpdateActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AddApplicationAgreementUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AddApplicationAgreementUpdateActionBuilder builder) { + AddApplicationAgreementUpdateAction addApplicationAgreementUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(addApplicationAgreementUpdateAction) + .isInstanceOf(AddApplicationAgreementUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "agreement", AddApplicationAgreementUpdateAction.builder() + .agreement(new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl()) } }; + } + + @Test + public void agreement() { + AddApplicationAgreementUpdateAction value = AddApplicationAgreementUpdateAction.of(); + value.setAgreement(new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl()); + Assertions.assertThat(value.getAgreement()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionTest.java new file mode 100644 index 00000000000..36fa7a004bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AddCountryUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AddCountryUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AddCountryUpdateActionBuilder builder) { + AddCountryUpdateAction addCountryUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(addCountryUpdateAction).isInstanceOf(AddCountryUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "country", AddCountryUpdateAction.builder().country("country") } }; + } + + @Test + public void country() { + AddCountryUpdateAction value = AddCountryUpdateAction.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AllowedOriginsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AllowedOriginsTest.java new file mode 100644 index 00000000000..d049549cc66 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/AllowedOriginsTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AllowedOriginsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AllowedOriginsBuilder builder) { + AllowedOrigins allowedOrigins = builder.buildUnchecked(); + Assertions.assertThat(allowedOrigins).isInstanceOf(AllowedOrigins.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "allowAll", AllowedOrigins.builder().allowAll(true) }, + new Object[] { "origins", AllowedOrigins.builder().origins(Collections.singletonList("origins")) } }; + } + + @Test + public void allowAll() { + AllowedOrigins value = AllowedOrigins.of(); + value.setAllowAll(true); + Assertions.assertThat(value.getAllowAll()).isEqualTo(true); + } + + @Test + public void origins() { + AllowedOrigins value = AllowedOrigins.of(); + value.setOrigins(Collections.singletonList("origins")); + Assertions.assertThat(value.getOrigins()).isEqualTo(Collections.singletonList("origins")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftTest.java new file mode 100644 index 00000000000..5b3f2275c16 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementDraftTest.java @@ -0,0 +1,62 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationAgreementDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationAgreementDraftBuilder builder) { + ApplicationAgreementDraft applicationAgreementDraft = builder.buildUnchecked(); + Assertions.assertThat(applicationAgreementDraft).isInstanceOf(ApplicationAgreementDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", ApplicationAgreementDraft.builder().name("name") }, + new Object[] { "type", + ApplicationAgreementDraft.builder() + .type(com.commercetools.checkout.models.application.ApplicationAgreementType + .findEnum("Text")) }, + new Object[] { "status", + ApplicationAgreementDraft.builder() + .status(com.commercetools.checkout.models.application.ApplicationAgreementStatus + .findEnum("Active")) }, + new Object[] { "text", ApplicationAgreementDraft.builder() + .text(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void name() { + ApplicationAgreementDraft value = ApplicationAgreementDraft.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void type() { + ApplicationAgreementDraft value = ApplicationAgreementDraft.of(); + value.setType(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + Assertions.assertThat(value.getType()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + } + + @Test + public void status() { + ApplicationAgreementDraft value = ApplicationAgreementDraft.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + } + + @Test + public void text() { + ApplicationAgreementDraft value = ApplicationAgreementDraft.of(); + value.setText(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getText()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementTest.java new file mode 100644 index 00000000000..8fda0a6284b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationAgreementTest.java @@ -0,0 +1,70 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationAgreementTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationAgreementBuilder builder) { + ApplicationAgreement applicationAgreement = builder.buildUnchecked(); + Assertions.assertThat(applicationAgreement).isInstanceOf(ApplicationAgreement.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ApplicationAgreement.builder().id("id") }, + new Object[] { "name", ApplicationAgreement.builder().name("name") }, + new Object[] { "type", + ApplicationAgreement.builder() + .type(com.commercetools.checkout.models.application.ApplicationAgreementType + .findEnum("Text")) }, + new Object[] { "status", + ApplicationAgreement.builder() + .status(com.commercetools.checkout.models.application.ApplicationAgreementStatus + .findEnum("Active")) }, + new Object[] { "text", ApplicationAgreement.builder() + .text(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void id() { + ApplicationAgreement value = ApplicationAgreement.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void name() { + ApplicationAgreement value = ApplicationAgreement.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void type() { + ApplicationAgreement value = ApplicationAgreement.of(); + value.setType(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + Assertions.assertThat(value.getType()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + } + + @Test + public void status() { + ApplicationAgreement value = ApplicationAgreement.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + } + + @Test + public void text() { + ApplicationAgreement value = ApplicationAgreement.of(); + value.setText(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getText()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationDraftTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationDraftTest.java new file mode 100644 index 00000000000..6a95f8b506f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationDraftTest.java @@ -0,0 +1,136 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationDraftBuilder builder) { + ApplicationDraft applicationDraft = builder.buildUnchecked(); + Assertions.assertThat(applicationDraft).isInstanceOf(ApplicationDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", ApplicationDraft.builder().key("key") }, new Object[] { "status", + ApplicationDraft.builder() + .status(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")) }, + new Object[] { "name", ApplicationDraft.builder().name("name") }, + new Object[] { "description", ApplicationDraft.builder().description("description") }, + new Object[] { "logo", + ApplicationDraft.builder() + .logo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()) }, + new Object[] { "countries", + ApplicationDraft.builder().countries(Collections.singletonList("countries")) }, + new Object[] { "allowedOrigins", ApplicationDraft.builder() + .allowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()) }, + new Object[] { "mode", + ApplicationDraft.builder() + .mode(com.commercetools.checkout.models.application.ApplicationMode + .findEnum("CompleteFlow")) }, + new Object[] { "paymentsConfiguration", + ApplicationDraft.builder() + .paymentsConfiguration( + new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()) }, + new Object[] { "agreements", + ApplicationDraft.builder() + .agreements(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationAgreementImpl())) }, + new Object[] { "discountsConfiguration", + ApplicationDraft.builder() + .discountsConfiguration( + new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()) } }; + } + + @Test + public void key() { + ApplicationDraft value = ApplicationDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void status() { + ApplicationDraft value = ApplicationDraft.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + } + + @Test + public void name() { + ApplicationDraft value = ApplicationDraft.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void description() { + ApplicationDraft value = ApplicationDraft.of(); + value.setDescription("description"); + Assertions.assertThat(value.getDescription()).isEqualTo("description"); + } + + @Test + public void logo() { + ApplicationDraft value = ApplicationDraft.of(); + value.setLogo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + Assertions.assertThat(value.getLogo()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + } + + @Test + public void countries() { + ApplicationDraft value = ApplicationDraft.of(); + value.setCountries(Collections.singletonList("countries")); + Assertions.assertThat(value.getCountries()).isEqualTo(Collections.singletonList("countries")); + } + + @Test + public void allowedOrigins() { + ApplicationDraft value = ApplicationDraft.of(); + value.setAllowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + Assertions.assertThat(value.getAllowedOrigins()) + .isEqualTo(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + } + + @Test + public void mode() { + ApplicationDraft value = ApplicationDraft.of(); + value.setMode(com.commercetools.checkout.models.application.ApplicationMode.findEnum("CompleteFlow")); + Assertions.assertThat(value.getMode()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationMode.findEnum("CompleteFlow")); + } + + @Test + public void paymentsConfiguration() { + ApplicationDraft value = ApplicationDraft.of(); + value.setPaymentsConfiguration(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + Assertions.assertThat(value.getPaymentsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + } + + @Test + public void agreements() { + ApplicationDraft value = ApplicationDraft.of(); + value.setAgreements( + Collections.singletonList(new com.commercetools.checkout.models.application.ApplicationAgreementImpl())); + Assertions.assertThat(value.getAgreements()) + .isEqualTo(Collections + .singletonList(new com.commercetools.checkout.models.application.ApplicationAgreementImpl())); + } + + @Test + public void discountsConfiguration() { + ApplicationDraft value = ApplicationDraft.of(); + value.setDiscountsConfiguration(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + Assertions.assertThat(value.getDiscountsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationLogoTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationLogoTest.java new file mode 100644 index 00000000000..40558bb8525 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationLogoTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationLogoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationLogoBuilder builder) { + ApplicationLogo applicationLogo = builder.buildUnchecked(); + Assertions.assertThat(applicationLogo).isInstanceOf(ApplicationLogo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "url", ApplicationLogo.builder().url("url") } }; + } + + @Test + public void url() { + ApplicationLogo value = ApplicationLogo.of(); + value.setUrl("url"); + Assertions.assertThat(value.getUrl()).isEqualTo("url"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationTest.java new file mode 100644 index 00000000000..f9b87adf4c1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationTest.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.application; + +import java.time.ZonedDateTime; +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationBuilder builder) { + Application application = builder.buildUnchecked(); + Assertions.assertThat(application).isInstanceOf(Application.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", Application.builder().id("id") }, + new Object[] { "version", Application.builder().version(2) }, + new Object[] { "key", Application.builder().key("key") }, + new Object[] { "status", + Application.builder() + .status(com.commercetools.checkout.models.application.ApplicationStatus + .findEnum("Active")) }, + new Object[] { "name", Application.builder().name("name") }, + new Object[] { "description", Application.builder().description("description") }, + new Object[] { "logo", + Application.builder() + .logo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()) }, + new Object[] { "countries", Application.builder().countries(Collections.singletonList("countries")) }, + new Object[] { "allowedOrigins", Application.builder() + .allowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()) }, + new Object[] { "mode", + Application.builder() + .mode(com.commercetools.checkout.models.application.ApplicationMode + .findEnum("CompleteFlow")) }, + new Object[] { "paymentsConfiguration", + Application.builder() + .paymentsConfiguration( + new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()) }, + new Object[] { "agreements", + Application.builder() + .agreements(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationAgreementImpl())) }, + new Object[] { "discountsConfiguration", + Application.builder() + .discountsConfiguration( + new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()) }, + new Object[] { "createdAt", Application.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "createdBy", + Application.builder() + .createdBy(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()) }, + new Object[] { "lastModifiedAt", + Application.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedBy", + Application.builder() + .lastModifiedBy( + new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()) } }; + } + + @Test + public void id() { + Application value = Application.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + Application value = Application.of(); + value.setVersion(2); + Assertions.assertThat(value.getVersion()).isEqualTo(2); + } + + @Test + public void key() { + Application value = Application.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void status() { + Application value = Application.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + } + + @Test + public void name() { + Application value = Application.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void description() { + Application value = Application.of(); + value.setDescription("description"); + Assertions.assertThat(value.getDescription()).isEqualTo("description"); + } + + @Test + public void logo() { + Application value = Application.of(); + value.setLogo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + Assertions.assertThat(value.getLogo()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + } + + @Test + public void countries() { + Application value = Application.of(); + value.setCountries(Collections.singletonList("countries")); + Assertions.assertThat(value.getCountries()).isEqualTo(Collections.singletonList("countries")); + } + + @Test + public void allowedOrigins() { + Application value = Application.of(); + value.setAllowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + Assertions.assertThat(value.getAllowedOrigins()) + .isEqualTo(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + } + + @Test + public void mode() { + Application value = Application.of(); + value.setMode(com.commercetools.checkout.models.application.ApplicationMode.findEnum("CompleteFlow")); + Assertions.assertThat(value.getMode()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationMode.findEnum("CompleteFlow")); + } + + @Test + public void paymentsConfiguration() { + Application value = Application.of(); + value.setPaymentsConfiguration(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + Assertions.assertThat(value.getPaymentsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + } + + @Test + public void agreements() { + Application value = Application.of(); + value.setAgreements( + Collections.singletonList(new com.commercetools.checkout.models.application.ApplicationAgreementImpl())); + Assertions.assertThat(value.getAgreements()) + .isEqualTo(Collections + .singletonList(new com.commercetools.checkout.models.application.ApplicationAgreementImpl())); + } + + @Test + public void discountsConfiguration() { + Application value = Application.of(); + value.setDiscountsConfiguration(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + Assertions.assertThat(value.getDiscountsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + } + + @Test + public void createdAt() { + Application value = Application.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void createdBy() { + Application value = Application.of(); + value.setCreatedBy(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()); + Assertions.assertThat(value.getCreatedBy()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()); + } + + @Test + public void lastModifiedAt() { + Application value = Application.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + Application value = Application.of(); + value.setLastModifiedBy(new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()); + Assertions.assertThat(value.getLastModifiedBy()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsTest.java new file mode 100644 index 00000000000..c51fe9c0741 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ApplicationUpdateActionsTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ApplicationUpdateActionsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ApplicationUpdateActionsBuilder builder) { + ApplicationUpdateActions applicationUpdateActions = builder.buildUnchecked(); + Assertions.assertThat(applicationUpdateActions).isInstanceOf(ApplicationUpdateActions.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "version", ApplicationUpdateActions.builder().version(2) }, + new Object[] { "actions", ApplicationUpdateActions.builder() + .actions(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationUpdateActionImpl())) } }; + } + + @Test + public void version() { + ApplicationUpdateActions value = ApplicationUpdateActions.of(); + value.setVersion(2); + Assertions.assertThat(value.getVersion()).isEqualTo(2); + } + + @Test + public void actions() { + ApplicationUpdateActions value = ApplicationUpdateActions.of(); + value.setActions( + Collections.singletonList(new com.commercetools.checkout.models.application.ApplicationUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationUpdateActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationTest.java new file mode 100644 index 00000000000..1bc564e598d --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/DiscountsConfigurationTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountsConfigurationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountsConfigurationBuilder builder) { + DiscountsConfiguration discountsConfiguration = builder.buildUnchecked(); + Assertions.assertThat(discountsConfiguration).isInstanceOf(DiscountsConfiguration.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "allowDiscounts", DiscountsConfiguration.builder().allowDiscounts(true) } }; + } + + @Test + public void allowDiscounts() { + DiscountsConfiguration value = DiscountsConfiguration.of(); + value.setAllowDiscounts(true); + Assertions.assertThat(value.getAllowDiscounts()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationTest.java new file mode 100644 index 00000000000..4305a6c4884 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaginatedApplicationTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaginatedApplicationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaginatedApplicationBuilder builder) { + PaginatedApplication paginatedApplication = builder.buildUnchecked(); + Assertions.assertThat(paginatedApplication).isInstanceOf(PaginatedApplication.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "limit", PaginatedApplication.builder().limit(7) }, + new Object[] { "offset", PaginatedApplication.builder().offset(3) }, + new Object[] { "count", PaginatedApplication.builder().count(2) }, + new Object[] { "total", PaginatedApplication.builder().total(1) }, + new Object[] { "results", + PaginatedApplication.builder() + .results(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationImpl())) } }; + } + + @Test + public void limit() { + PaginatedApplication value = PaginatedApplication.of(); + value.setLimit(7); + Assertions.assertThat(value.getLimit()).isEqualTo(7); + } + + @Test + public void offset() { + PaginatedApplication value = PaginatedApplication.of(); + value.setOffset(3); + Assertions.assertThat(value.getOffset()).isEqualTo(3); + } + + @Test + public void count() { + PaginatedApplication value = PaginatedApplication.of(); + value.setCount(2); + Assertions.assertThat(value.getCount()).isEqualTo(2); + } + + @Test + public void total() { + PaginatedApplication value = PaginatedApplication.of(); + value.setTotal(1); + Assertions.assertThat(value.getTotal()).isEqualTo(1); + } + + @Test + public void results() { + PaginatedApplication value = PaginatedApplication.of(); + value.setResults( + Collections.singletonList(new com.commercetools.checkout.models.application.ApplicationImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo( + Collections.singletonList(new com.commercetools.checkout.models.application.ApplicationImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationTest.java new file mode 100644 index 00000000000..77144a357af --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/PaymentsConfigurationTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentsConfigurationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentsConfigurationBuilder builder) { + PaymentsConfiguration paymentsConfiguration = builder.buildUnchecked(); + Assertions.assertThat(paymentsConfiguration).isInstanceOf(PaymentsConfiguration.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "paymentReturnUrl", + PaymentsConfiguration.builder().paymentReturnUrl("paymentReturnUrl") }, + new Object[] { "activePaymentComponentType", + PaymentsConfiguration.builder() + .activePaymentComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType + .findEnum("Component")) } }; + } + + @Test + public void paymentReturnUrl() { + PaymentsConfiguration value = PaymentsConfiguration.of(); + value.setPaymentReturnUrl("paymentReturnUrl"); + Assertions.assertThat(value.getPaymentReturnUrl()).isEqualTo("paymentReturnUrl"); + } + + @Test + public void activePaymentComponentType() { + PaymentsConfiguration value = PaymentsConfiguration.of(); + value.setActivePaymentComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + Assertions.assertThat(value.getActivePaymentComponentType()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionTest.java new file mode 100644 index 00000000000..0b6d93f8c57 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveAllowedOriginUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RemoveAllowedOriginUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveAllowedOriginUpdateActionBuilder builder) { + RemoveAllowedOriginUpdateAction removeAllowedOriginUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(removeAllowedOriginUpdateAction).isInstanceOf(RemoveAllowedOriginUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "origin", RemoveAllowedOriginUpdateAction.builder().origin("origin") } }; + } + + @Test + public void origin() { + RemoveAllowedOriginUpdateAction value = RemoveAllowedOriginUpdateAction.of(); + value.setOrigin("origin"); + Assertions.assertThat(value.getOrigin()).isEqualTo("origin"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionTest.java new file mode 100644 index 00000000000..ba29e48e7b9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveApplicationAgreementUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RemoveApplicationAgreementUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveApplicationAgreementUpdateActionBuilder builder) { + RemoveApplicationAgreementUpdateAction removeApplicationAgreementUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(removeApplicationAgreementUpdateAction) + .isInstanceOf(RemoveApplicationAgreementUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "agreementId", + RemoveApplicationAgreementUpdateAction.builder().agreementId("agreementId") } }; + } + + @Test + public void agreementId() { + RemoveApplicationAgreementUpdateAction value = RemoveApplicationAgreementUpdateAction.of(); + value.setAgreementId("agreementId"); + Assertions.assertThat(value.getAgreementId()).isEqualTo("agreementId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionTest.java new file mode 100644 index 00000000000..bcf808a15a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/RemoveCountryUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RemoveCountryUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveCountryUpdateActionBuilder builder) { + RemoveCountryUpdateAction removeCountryUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(removeCountryUpdateAction).isInstanceOf(RemoveCountryUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "country", RemoveCountryUpdateAction.builder().country("country") } }; + } + + @Test + public void country() { + RemoveCountryUpdateAction value = RemoveCountryUpdateAction.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionTest.java new file mode 100644 index 00000000000..edfb859ec2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/ReorderApplicationAgreementUpdateActionTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ReorderApplicationAgreementUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ReorderApplicationAgreementUpdateActionBuilder builder) { + ReorderApplicationAgreementUpdateAction reorderApplicationAgreementUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(reorderApplicationAgreementUpdateAction) + .isInstanceOf(ReorderApplicationAgreementUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "agreementIds", ReorderApplicationAgreementUpdateAction.builder() + .agreementIds(Collections.singletonList("agreementIds")) } }; + } + + @Test + public void agreementIds() { + ReorderApplicationAgreementUpdateAction value = ReorderApplicationAgreementUpdateAction.of(); + value.setAgreementIds(Collections.singletonList("agreementIds")); + Assertions.assertThat(value.getAgreementIds()).isEqualTo(Collections.singletonList("agreementIds")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionTest.java new file mode 100644 index 00000000000..4658652ff42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetActivePaymentComponentTypeUpdateActionTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetActivePaymentComponentTypeUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetActivePaymentComponentTypeUpdateActionBuilder builder) { + SetActivePaymentComponentTypeUpdateAction setActivePaymentComponentTypeUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setActivePaymentComponentTypeUpdateAction) + .isInstanceOf(SetActivePaymentComponentTypeUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "activePaymentComponentType", + SetActivePaymentComponentTypeUpdateAction.builder() + .activePaymentComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType + .findEnum("Component")) } }; + } + + @Test + public void activePaymentComponentType() { + SetActivePaymentComponentTypeUpdateAction value = SetActivePaymentComponentTypeUpdateAction.of(); + value.setActivePaymentComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + Assertions.assertThat(value.getActivePaymentComponentType()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionTest.java new file mode 100644 index 00000000000..5b9cc070e72 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowAllOriginsUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAllowAllOriginsUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAllowAllOriginsUpdateActionBuilder builder) { + SetAllowAllOriginsUpdateAction setAllowAllOriginsUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setAllowAllOriginsUpdateAction).isInstanceOf(SetAllowAllOriginsUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "allowAll", SetAllowAllOriginsUpdateAction.builder().allowAll(true) } }; + } + + @Test + public void allowAll() { + SetAllowAllOriginsUpdateAction value = SetAllowAllOriginsUpdateAction.of(); + value.setAllowAll(true); + Assertions.assertThat(value.getAllowAll()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionTest.java new file mode 100644 index 00000000000..b5d591a47af --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetAllowedOriginsUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAllowedOriginsUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAllowedOriginsUpdateActionBuilder builder) { + SetAllowedOriginsUpdateAction setAllowedOriginsUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setAllowedOriginsUpdateAction).isInstanceOf(SetAllowedOriginsUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "allowedOrigins", SetAllowedOriginsUpdateAction.builder() + .allowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()) } }; + } + + @Test + public void allowedOrigins() { + SetAllowedOriginsUpdateAction value = SetAllowedOriginsUpdateAction.of(); + value.setAllowedOrigins(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + Assertions.assertThat(value.getAllowedOrigins()) + .isEqualTo(new com.commercetools.checkout.models.application.AllowedOriginsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionTest.java new file mode 100644 index 00000000000..81b8d85fae7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementNameUpdateActionTest.java @@ -0,0 +1,39 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationAgreementNameUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationAgreementNameUpdateActionBuilder builder) { + SetApplicationAgreementNameUpdateAction setApplicationAgreementNameUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationAgreementNameUpdateAction) + .isInstanceOf(SetApplicationAgreementNameUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "agreementId", + SetApplicationAgreementNameUpdateAction.builder().agreementId("agreementId") }, + new Object[] { "name", SetApplicationAgreementNameUpdateAction.builder().name("name") } }; + } + + @Test + public void agreementId() { + SetApplicationAgreementNameUpdateAction value = SetApplicationAgreementNameUpdateAction.of(); + value.setAgreementId("agreementId"); + Assertions.assertThat(value.getAgreementId()).isEqualTo("agreementId"); + } + + @Test + public void name() { + SetApplicationAgreementNameUpdateAction value = SetApplicationAgreementNameUpdateAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionTest.java new file mode 100644 index 00000000000..8ad66b587d7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementStatusUpdateActionTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationAgreementStatusUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationAgreementStatusUpdateActionBuilder builder) { + SetApplicationAgreementStatusUpdateAction setApplicationAgreementStatusUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationAgreementStatusUpdateAction) + .isInstanceOf(SetApplicationAgreementStatusUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "agreementId", + SetApplicationAgreementStatusUpdateAction.builder().agreementId("agreementId") }, + new Object[] { "status", + SetApplicationAgreementStatusUpdateAction.builder() + .status(com.commercetools.checkout.models.application.ApplicationAgreementStatus + .findEnum("Active")) } }; + } + + @Test + public void agreementId() { + SetApplicationAgreementStatusUpdateAction value = SetApplicationAgreementStatusUpdateAction.of(); + value.setAgreementId("agreementId"); + Assertions.assertThat(value.getAgreementId()).isEqualTo("agreementId"); + } + + @Test + public void status() { + SetApplicationAgreementStatusUpdateAction value = SetApplicationAgreementStatusUpdateAction.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementStatus.findEnum("Active")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionTest.java new file mode 100644 index 00000000000..08f68ef14e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTextUpdateActionTest.java @@ -0,0 +1,41 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationAgreementTextUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationAgreementTextUpdateActionBuilder builder) { + SetApplicationAgreementTextUpdateAction setApplicationAgreementTextUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationAgreementTextUpdateAction) + .isInstanceOf(SetApplicationAgreementTextUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "agreementId", + SetApplicationAgreementTextUpdateAction.builder().agreementId("agreementId") }, + new Object[] { "text", SetApplicationAgreementTextUpdateAction.builder() + .text(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void agreementId() { + SetApplicationAgreementTextUpdateAction value = SetApplicationAgreementTextUpdateAction.of(); + value.setAgreementId("agreementId"); + Assertions.assertThat(value.getAgreementId()).isEqualTo("agreementId"); + } + + @Test + public void text() { + SetApplicationAgreementTextUpdateAction value = SetApplicationAgreementTextUpdateAction.of(); + value.setText(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getText()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionTest.java new file mode 100644 index 00000000000..9972421433c --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementTypeUpdateActionTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationAgreementTypeUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationAgreementTypeUpdateActionBuilder builder) { + SetApplicationAgreementTypeUpdateAction setApplicationAgreementTypeUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationAgreementTypeUpdateAction) + .isInstanceOf(SetApplicationAgreementTypeUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "agreementId", + SetApplicationAgreementTypeUpdateAction.builder().agreementId("agreementId") }, + new Object[] { "type", + SetApplicationAgreementTypeUpdateAction.builder() + .type(com.commercetools.checkout.models.application.ApplicationAgreementType + .findEnum("Text")) } }; + } + + @Test + public void agreementId() { + SetApplicationAgreementTypeUpdateAction value = SetApplicationAgreementTypeUpdateAction.of(); + value.setAgreementId("agreementId"); + Assertions.assertThat(value.getAgreementId()).isEqualTo("agreementId"); + } + + @Test + public void type() { + SetApplicationAgreementTypeUpdateAction value = SetApplicationAgreementTypeUpdateAction.of(); + value.setType(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + Assertions.assertThat(value.getType()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationAgreementType.findEnum("Text")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionTest.java new file mode 100644 index 00000000000..cd0bff03a55 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationAgreementsUpdateActionTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationAgreementsUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationAgreementsUpdateActionBuilder builder) { + SetApplicationAgreementsUpdateAction setApplicationAgreementsUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationAgreementsUpdateAction) + .isInstanceOf(SetApplicationAgreementsUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "agreements", + SetApplicationAgreementsUpdateAction.builder() + .agreements(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl())) } }; + } + + @Test + public void agreements() { + SetApplicationAgreementsUpdateAction value = SetApplicationAgreementsUpdateAction.of(); + value.setAgreements(Collections + .singletonList(new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl())); + Assertions.assertThat(value.getAgreements()) + .isEqualTo(Collections.singletonList( + new com.commercetools.checkout.models.application.ApplicationAgreementDraftImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionTest.java new file mode 100644 index 00000000000..23960dad6b1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationLogoUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationLogoUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationLogoUpdateActionBuilder builder) { + SetApplicationLogoUpdateAction setApplicationLogoUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationLogoUpdateAction).isInstanceOf(SetApplicationLogoUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "logo", SetApplicationLogoUpdateAction.builder() + .logo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()) } }; + } + + @Test + public void logo() { + SetApplicationLogoUpdateAction value = SetApplicationLogoUpdateAction.of(); + value.setLogo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + Assertions.assertThat(value.getLogo()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationLogoImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionTest.java new file mode 100644 index 00000000000..09be35852ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationNameUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationNameUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationNameUpdateActionBuilder builder) { + SetApplicationNameUpdateAction setApplicationNameUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationNameUpdateAction).isInstanceOf(SetApplicationNameUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", SetApplicationNameUpdateAction.builder().name("name") } }; + } + + @Test + public void name() { + SetApplicationNameUpdateAction value = SetApplicationNameUpdateAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionTest.java new file mode 100644 index 00000000000..5675ede2c90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetApplicationStatusUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetApplicationStatusUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetApplicationStatusUpdateActionBuilder builder) { + SetApplicationStatusUpdateAction setApplicationStatusUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setApplicationStatusUpdateAction).isInstanceOf(SetApplicationStatusUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "status", SetApplicationStatusUpdateAction.builder() + .status(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")) } }; + } + + @Test + public void status() { + SetApplicationStatusUpdateAction value = SetApplicationStatusUpdateAction.of(); + value.setStatus(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.checkout.models.application.ApplicationStatus.findEnum("Active")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionTest.java new file mode 100644 index 00000000000..ae0fa10e3b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetCountriesUpdateActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.checkout.models.application; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetCountriesUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetCountriesUpdateActionBuilder builder) { + SetCountriesUpdateAction setCountriesUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setCountriesUpdateAction).isInstanceOf(SetCountriesUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "countries", + SetCountriesUpdateAction.builder().countries(Collections.singletonList("countries")) } }; + } + + @Test + public void countries() { + SetCountriesUpdateAction value = SetCountriesUpdateAction.of(); + value.setCountries(Collections.singletonList("countries")); + Assertions.assertThat(value.getCountries()).isEqualTo(Collections.singletonList("countries")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionTest.java new file mode 100644 index 00000000000..fcc51dda9cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDescriptionUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDescriptionUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDescriptionUpdateActionBuilder builder) { + SetDescriptionUpdateAction setDescriptionUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDescriptionUpdateAction).isInstanceOf(SetDescriptionUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "description", SetDescriptionUpdateAction.builder() + .description(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void description() { + SetDescriptionUpdateAction value = SetDescriptionUpdateAction.of(); + value.setDescription(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionTest.java new file mode 100644 index 00000000000..b56ec437e72 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetDiscountsConfigurationUpdateActionTest.java @@ -0,0 +1,33 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDiscountsConfigurationUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDiscountsConfigurationUpdateActionBuilder builder) { + SetDiscountsConfigurationUpdateAction setDiscountsConfigurationUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDiscountsConfigurationUpdateAction) + .isInstanceOf(SetDiscountsConfigurationUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "discountsConfiguration", + SetDiscountsConfigurationUpdateAction.builder() + .discountsConfiguration( + new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()) } }; + } + + @Test + public void discountsConfiguration() { + SetDiscountsConfigurationUpdateAction value = SetDiscountsConfigurationUpdateAction.of(); + value.setDiscountsConfiguration(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + Assertions.assertThat(value.getDiscountsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.DiscountsConfigurationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionTest.java new file mode 100644 index 00000000000..b08a42965a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentReturnUrlUpdateActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPaymentReturnUrlUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPaymentReturnUrlUpdateActionBuilder builder) { + SetPaymentReturnUrlUpdateAction setPaymentReturnUrlUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setPaymentReturnUrlUpdateAction).isInstanceOf(SetPaymentReturnUrlUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "paymentReturnUrl", + SetPaymentReturnUrlUpdateAction.builder().paymentReturnUrl("paymentReturnUrl") } }; + } + + @Test + public void paymentReturnUrl() { + SetPaymentReturnUrlUpdateAction value = SetPaymentReturnUrlUpdateAction.of(); + value.setPaymentReturnUrl("paymentReturnUrl"); + Assertions.assertThat(value.getPaymentReturnUrl()).isEqualTo("paymentReturnUrl"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionTest.java new file mode 100644 index 00000000000..d29ab505a28 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/application/SetPaymentsConfigurationUpdateActionTest.java @@ -0,0 +1,33 @@ + +package com.commercetools.checkout.models.application; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPaymentsConfigurationUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPaymentsConfigurationUpdateActionBuilder builder) { + SetPaymentsConfigurationUpdateAction setPaymentsConfigurationUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setPaymentsConfigurationUpdateAction) + .isInstanceOf(SetPaymentsConfigurationUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "paymentsConfiguration", + SetPaymentsConfigurationUpdateAction.builder() + .paymentsConfiguration( + new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()) } }; + } + + @Test + public void paymentsConfiguration() { + SetPaymentsConfigurationUpdateAction value = SetPaymentsConfigurationUpdateAction.of(); + value.setPaymentsConfiguration(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + Assertions.assertThat(value.getPaymentsConfiguration()) + .isEqualTo(new com.commercetools.checkout.models.application.PaymentsConfigurationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedStringTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedStringTest.java new file mode 100644 index 00000000000..a8e21fe3f01 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedStringTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.checkout.models.common; + +public class LocalizedStringTest { + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedUrlTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedUrlTest.java new file mode 100644 index 00000000000..f39fbe0a348 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/common/LocalizedUrlTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.checkout.models.common; + +public class LocalizedUrlTest { + +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorTest.java new file mode 100644 index 00000000000..12848b1db9f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ConcurrentModificationErrorTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ConcurrentModificationErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ConcurrentModificationErrorBuilder builder) { + ConcurrentModificationError concurrentModificationError = builder.buildUnchecked(); + Assertions.assertThat(concurrentModificationError).isInstanceOf(ConcurrentModificationError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ConcurrentModificationError.builder().message("message") }, + new Object[] { "resourceId", ConcurrentModificationError.builder().resourceId("resourceId") }, + new Object[] { "expectedVersion", ConcurrentModificationError.builder().expectedVersion(5L) }, + new Object[] { "currentVersion", ConcurrentModificationError.builder().currentVersion(4L) } }; + } + + @Test + public void message() { + ConcurrentModificationError value = ConcurrentModificationError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void resourceId() { + ConcurrentModificationError value = ConcurrentModificationError.of(); + value.setResourceId("resourceId"); + Assertions.assertThat(value.getResourceId()).isEqualTo("resourceId"); + } + + @Test + public void expectedVersion() { + ConcurrentModificationError value = ConcurrentModificationError.of(); + value.setExpectedVersion(5L); + Assertions.assertThat(value.getExpectedVersion()).isEqualTo(5L); + } + + @Test + public void currentVersion() { + ConcurrentModificationError value = ConcurrentModificationError.of(); + value.setCurrentVersion(4L); + Assertions.assertThat(value.getCurrentVersion()).isEqualTo(4L); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorTest.java new file mode 100644 index 00000000000..c3f96162a84 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/DuplicateFieldWithConflictingResourceErrorTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DuplicateFieldWithConflictingResourceErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DuplicateFieldWithConflictingResourceErrorBuilder builder) { + DuplicateFieldWithConflictingResourceError duplicateFieldWithConflictingResourceError = builder + .buildUnchecked(); + Assertions.assertThat(duplicateFieldWithConflictingResourceError) + .isInstanceOf(DuplicateFieldWithConflictingResourceError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "message", DuplicateFieldWithConflictingResourceError.builder().message("message") } }; + } + + @Test + public void message() { + DuplicateFieldWithConflictingResourceError value = DuplicateFieldWithConflictingResourceError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ErrorResponseTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ErrorResponseTest.java new file mode 100644 index 00000000000..6d66f2a3da0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ErrorResponseTest.java @@ -0,0 +1,50 @@ + +package com.commercetools.checkout.models.error; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ErrorResponseTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ErrorResponseBuilder builder) { + ErrorResponse errorResponse = builder.buildUnchecked(); + Assertions.assertThat(errorResponse).isInstanceOf(ErrorResponse.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "statusCode", ErrorResponse.builder().statusCode(8) }, + new Object[] { "message", ErrorResponse.builder().message("message") }, + new Object[] { "errors", + ErrorResponse.builder() + .errors(Collections.singletonList( + new com.commercetools.checkout.models.error.ErrorObjectImpl())) } }; + } + + @Test + public void statusCode() { + ErrorResponse value = ErrorResponse.of(); + value.setStatusCode(8); + Assertions.assertThat(value.getStatusCode()).isEqualTo(8); + } + + @Test + public void message() { + ErrorResponse value = ErrorResponse.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void errors() { + ErrorResponse value = ErrorResponse.of(); + value.setErrors(Collections.singletonList(new com.commercetools.checkout.models.error.ErrorObjectImpl())); + Assertions.assertThat(value.getErrors()) + .isEqualTo(Collections.singletonList(new com.commercetools.checkout.models.error.ErrorObjectImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorTest.java new file mode 100644 index 00000000000..b8539aaf992 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidFieldErrorTest.java @@ -0,0 +1,55 @@ + +package com.commercetools.checkout.models.error; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidFieldErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidFieldErrorBuilder builder) { + InvalidFieldError invalidFieldError = builder.buildUnchecked(); + Assertions.assertThat(invalidFieldError).isInstanceOf(InvalidFieldError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", InvalidFieldError.builder().message("message") }, + new Object[] { "field", InvalidFieldError.builder().field("field") }, + new Object[] { "invalidValue", InvalidFieldError.builder().invalidValue("invalidValue") }, + new Object[] { "allowedValues", + InvalidFieldError.builder().allowedValues(Collections.singletonList("allowedValues")) } }; + } + + @Test + public void message() { + InvalidFieldError value = InvalidFieldError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void field() { + InvalidFieldError value = InvalidFieldError.of(); + value.setField("field"); + Assertions.assertThat(value.getField()).isEqualTo("field"); + } + + @Test + public void invalidValue() { + InvalidFieldError value = InvalidFieldError.of(); + value.setInvalidValue("invalidValue"); + Assertions.assertThat(value.getInvalidValue()).isEqualTo("invalidValue"); + } + + @Test + public void allowedValues() { + InvalidFieldError value = InvalidFieldError.of(); + value.setAllowedValues(Collections.singletonList("allowedValues")); + Assertions.assertThat(value.getAllowedValues()).isEqualTo(Collections.singletonList("allowedValues")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorTest.java new file mode 100644 index 00000000000..845eed96372 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/InvalidOperationErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class InvalidOperationErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, InvalidOperationErrorBuilder builder) { + InvalidOperationError invalidOperationError = builder.buildUnchecked(); + Assertions.assertThat(invalidOperationError).isInstanceOf(InvalidOperationError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", InvalidOperationError.builder().message("message") } }; + } + + @Test + public void message() { + InvalidOperationError value = InvalidOperationError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorTest.java new file mode 100644 index 00000000000..678af7b8988 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MaxResourceLimitExceededErrorTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MaxResourceLimitExceededErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MaxResourceLimitExceededErrorBuilder builder) { + MaxResourceLimitExceededError maxResourceLimitExceededError = builder.buildUnchecked(); + Assertions.assertThat(maxResourceLimitExceededError).isInstanceOf(MaxResourceLimitExceededError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", MaxResourceLimitExceededError.builder().message("message") }, + new Object[] { "limit", MaxResourceLimitExceededError.builder().limit(0.26748633) }, new Object[] { + "resourceTypeId", MaxResourceLimitExceededError.builder().resourceTypeId("resourceTypeId") } }; + } + + @Test + public void message() { + MaxResourceLimitExceededError value = MaxResourceLimitExceededError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void limit() { + MaxResourceLimitExceededError value = MaxResourceLimitExceededError.of(); + value.setLimit(0.26748633); + Assertions.assertThat(value.getLimit()).isEqualTo(0.26748633); + } + + @Test + public void resourceTypeId() { + MaxResourceLimitExceededError value = MaxResourceLimitExceededError.of(); + value.setResourceTypeId("resourceTypeId"); + Assertions.assertThat(value.getResourceTypeId()).isEqualTo("resourceTypeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorTest.java new file mode 100644 index 00000000000..eabfc8a95f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/MissingProjectKeyErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MissingProjectKeyErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MissingProjectKeyErrorBuilder builder) { + MissingProjectKeyError missingProjectKeyError = builder.buildUnchecked(); + Assertions.assertThat(missingProjectKeyError).isInstanceOf(MissingProjectKeyError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", MissingProjectKeyError.builder().message("message") } }; + } + + @Test + public void message() { + MissingProjectKeyError value = MissingProjectKeyError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorTest.java new file mode 100644 index 00000000000..6a37a34617e --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ReferencedResourceNotFoundErrorTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ReferencedResourceNotFoundErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ReferencedResourceNotFoundErrorBuilder builder) { + ReferencedResourceNotFoundError referencedResourceNotFoundError = builder.buildUnchecked(); + Assertions.assertThat(referencedResourceNotFoundError).isInstanceOf(ReferencedResourceNotFoundError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "message", ReferencedResourceNotFoundError.builder().message("message") }, + new Object[] { "typeId", ReferencedResourceNotFoundError.builder().typeId("typeId") }, + new Object[] { "id", ReferencedResourceNotFoundError.builder().id("id") }, + new Object[] { "key", ReferencedResourceNotFoundError.builder().key("key") } }; + } + + @Test + public void message() { + ReferencedResourceNotFoundError value = ReferencedResourceNotFoundError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void typeId() { + ReferencedResourceNotFoundError value = ReferencedResourceNotFoundError.of(); + value.setTypeId("typeId"); + Assertions.assertThat(value.getTypeId()).isEqualTo("typeId"); + } + + @Test + public void id() { + ReferencedResourceNotFoundError value = ReferencedResourceNotFoundError.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + ReferencedResourceNotFoundError value = ReferencedResourceNotFoundError.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java index be4feebd0a1..ecd39c1d30c 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ResourceNotFoundErrorTest.java @@ -16,7 +16,10 @@ public void buildUnchecked(String name, ResourceNotFoundErrorBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "message", ResourceNotFoundError.builder().message("message") } }; + return new Object[][] { new Object[] { "message", ResourceNotFoundError.builder().message("message") }, + new Object[] { "resourceIdentifier", + ResourceNotFoundError.builder().resourceIdentifier("resourceIdentifier") }, + new Object[] { "resourceId", ResourceNotFoundError.builder().resourceId("resourceId") } }; } @Test @@ -25,4 +28,18 @@ public void message() { value.setMessage("message"); Assertions.assertThat(value.getMessage()).isEqualTo("message"); } + + @Test + public void resourceIdentifier() { + ResourceNotFoundError value = ResourceNotFoundError.of(); + value.setResourceIdentifier("resourceIdentifier"); + Assertions.assertThat(value.getResourceIdentifier()).isEqualTo("resourceIdentifier"); + } + + @Test + public void resourceId() { + ResourceNotFoundError value = ResourceNotFoundError.of(); + value.setResourceId("resourceId"); + Assertions.assertThat(value.getResourceId()).isEqualTo("resourceId"); + } } diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorTest.java new file mode 100644 index 00000000000..7dcf01e0504 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/ServiceUnavailableErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ServiceUnavailableErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ServiceUnavailableErrorBuilder builder) { + ServiceUnavailableError serviceUnavailableError = builder.buildUnchecked(); + Assertions.assertThat(serviceUnavailableError).isInstanceOf(ServiceUnavailableError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ServiceUnavailableError.builder().message("message") } }; + } + + @Test + public void message() { + ServiceUnavailableError value = ServiceUnavailableError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorTest.java new file mode 100644 index 00000000000..219cb2b15dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/error/SyntaxErrorErrorTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SyntaxErrorErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SyntaxErrorErrorBuilder builder) { + SyntaxErrorError syntaxErrorError = builder.buildUnchecked(); + Assertions.assertThat(syntaxErrorError).isInstanceOf(SyntaxErrorError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", SyntaxErrorError.builder().message("message") } }; + } + + @Test + public void message() { + SyntaxErrorError value = SyntaxErrorError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationTest.java new file mode 100644 index 00000000000..bcbc47bb843 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/AutomatedReversalConfigurationTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AutomatedReversalConfigurationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AutomatedReversalConfigurationBuilder builder) { + AutomatedReversalConfiguration automatedReversalConfiguration = builder.buildUnchecked(); + Assertions.assertThat(automatedReversalConfiguration).isInstanceOf(AutomatedReversalConfiguration.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "status", AutomatedReversalConfiguration.builder().status("status") }, + new Object[] { "predicate", AutomatedReversalConfiguration.builder().predicate("predicate") } }; + } + + @Test + public void status() { + AutomatedReversalConfiguration value = AutomatedReversalConfiguration.of(); + value.setStatus("status"); + Assertions.assertThat(value.getStatus()).isEqualTo("status"); + } + + @Test + public void predicate() { + AutomatedReversalConfiguration value = AutomatedReversalConfiguration.of(); + value.setPredicate("predicate"); + Assertions.assertThat(value.getPredicate()).isEqualTo("predicate"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceTest.java new file mode 100644 index 00000000000..607ea515971 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/ConnectorDeploymentReferenceTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ConnectorDeploymentReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ConnectorDeploymentReferenceBuilder builder) { + ConnectorDeploymentReference connectorDeploymentReference = builder.buildUnchecked(); + Assertions.assertThat(connectorDeploymentReference).isInstanceOf(ConnectorDeploymentReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ConnectorDeploymentReference.builder().id("id") }, + new Object[] { "typeId", ConnectorDeploymentReference.builder().typeId("typeId") } }; + } + + @Test + public void id() { + ConnectorDeploymentReference value = ConnectorDeploymentReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void typeId() { + ConnectorDeploymentReference value = ConnectorDeploymentReference.of(); + value.setTypeId("typeId"); + Assertions.assertThat(value.getTypeId()).isEqualTo("typeId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByTest.java new file mode 100644 index 00000000000..0b3cee38b1a --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/CreatedByTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CreatedByTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CreatedByBuilder builder) { + CreatedBy createdBy = builder.buildUnchecked(); + Assertions.assertThat(createdBy).isInstanceOf(CreatedBy.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "clientId", CreatedBy.builder().clientId("clientId") }, + new Object[] { "externalUserId", CreatedBy.builder().externalUserId("externalUserId") }, + new Object[] { "customer", + CreatedBy.builder().customer(new com.commercetools.checkout.models.common.ReferenceImpl()) }, + new Object[] { "anonymousId", CreatedBy.builder().anonymousId("anonymousId") } }; + } + + @Test + public void clientId() { + CreatedBy value = CreatedBy.of(); + value.setClientId("clientId"); + Assertions.assertThat(value.getClientId()).isEqualTo("clientId"); + } + + @Test + public void externalUserId() { + CreatedBy value = CreatedBy.of(); + value.setExternalUserId("externalUserId"); + Assertions.assertThat(value.getExternalUserId()).isEqualTo("externalUserId"); + } + + @Test + public void customer() { + CreatedBy value = CreatedBy.of(); + value.setCustomer(new com.commercetools.checkout.models.common.ReferenceImpl()); + Assertions.assertThat(value.getCustomer()) + .isEqualTo(new com.commercetools.checkout.models.common.ReferenceImpl()); + } + + @Test + public void anonymousId() { + CreatedBy value = CreatedBy.of(); + value.setAnonymousId("anonymousId"); + Assertions.assertThat(value.getAnonymousId()).isEqualTo("anonymousId"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoTest.java new file mode 100644 index 00000000000..7044c1ae587 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/DisplayInfoTest.java @@ -0,0 +1,64 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DisplayInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DisplayInfoBuilder builder) { + DisplayInfo displayInfo = builder.buildUnchecked(); + Assertions.assertThat(displayInfo).isInstanceOf(DisplayInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "label", + DisplayInfo.builder() + .label(new com.commercetools.checkout.models.common.LocalizedStringImpl()) }, + new Object[] { "logoUrl", + DisplayInfo.builder() + .logoUrl(new com.commercetools.checkout.models.common.LocalizedUrlImpl()) }, + new Object[] { "description", + DisplayInfo.builder() + .description(new com.commercetools.checkout.models.common.LocalizedStringImpl()) }, + new Object[] { "payButtonText", DisplayInfo.builder() + .payButtonText(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void label() { + DisplayInfo value = DisplayInfo.of(); + value.setLabel(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLabel()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } + + @Test + public void logoUrl() { + DisplayInfo value = DisplayInfo.of(); + value.setLogoUrl(new com.commercetools.checkout.models.common.LocalizedUrlImpl()); + Assertions.assertThat(value.getLogoUrl()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedUrlImpl()); + } + + @Test + public void description() { + DisplayInfo value = DisplayInfo.of(); + value.setDescription(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } + + @Test + public void payButtonText() { + DisplayInfo value = DisplayInfo.of(); + value.setPayButtonText(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getPayButtonText()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByTest.java new file mode 100644 index 00000000000..d90bc9cd649 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/LastModifiedByTest.java @@ -0,0 +1,91 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class LastModifiedByTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, LastModifiedByBuilder builder) { + LastModifiedBy lastModifiedBy = builder.buildUnchecked(); + Assertions.assertThat(lastModifiedBy).isInstanceOf(LastModifiedBy.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "clientId", LastModifiedBy.builder().clientId("clientId") }, + new Object[] { "sessionId", LastModifiedBy.builder().sessionId("sessionId") }, + new Object[] { "externalUserId", LastModifiedBy.builder().externalUserId("externalUserId") }, + new Object[] { "anonymousId", LastModifiedBy.builder().anonymousId("anonymousId") }, + new Object[] { "customer", + LastModifiedBy.builder() + .customer(new com.commercetools.checkout.models.common.ReferenceImpl()) }, + new Object[] { "associate", + LastModifiedBy.builder() + .associate(new com.commercetools.checkout.models.common.ReferenceImpl()) }, + new Object[] { "user", + LastModifiedBy.builder().user(new com.commercetools.checkout.models.common.ReferenceImpl()) }, + new Object[] { "isPlatformClient", LastModifiedBy.builder().isPlatformClient(true) } }; + } + + @Test + public void clientId() { + LastModifiedBy value = LastModifiedBy.of(); + value.setClientId("clientId"); + Assertions.assertThat(value.getClientId()).isEqualTo("clientId"); + } + + @Test + public void sessionId() { + LastModifiedBy value = LastModifiedBy.of(); + value.setSessionId("sessionId"); + Assertions.assertThat(value.getSessionId()).isEqualTo("sessionId"); + } + + @Test + public void externalUserId() { + LastModifiedBy value = LastModifiedBy.of(); + value.setExternalUserId("externalUserId"); + Assertions.assertThat(value.getExternalUserId()).isEqualTo("externalUserId"); + } + + @Test + public void anonymousId() { + LastModifiedBy value = LastModifiedBy.of(); + value.setAnonymousId("anonymousId"); + Assertions.assertThat(value.getAnonymousId()).isEqualTo("anonymousId"); + } + + @Test + public void customer() { + LastModifiedBy value = LastModifiedBy.of(); + value.setCustomer(new com.commercetools.checkout.models.common.ReferenceImpl()); + Assertions.assertThat(value.getCustomer()) + .isEqualTo(new com.commercetools.checkout.models.common.ReferenceImpl()); + } + + @Test + public void associate() { + LastModifiedBy value = LastModifiedBy.of(); + value.setAssociate(new com.commercetools.checkout.models.common.ReferenceImpl()); + Assertions.assertThat(value.getAssociate()) + .isEqualTo(new com.commercetools.checkout.models.common.ReferenceImpl()); + } + + @Test + public void user() { + LastModifiedBy value = LastModifiedBy.of(); + value.setUser(new com.commercetools.checkout.models.common.ReferenceImpl()); + Assertions.assertThat(value.getUser()).isEqualTo(new com.commercetools.checkout.models.common.ReferenceImpl()); + } + + @Test + public void isPlatformClient() { + LastModifiedBy value = LastModifiedBy.of(); + value.setIsPlatformClient(true); + Assertions.assertThat(value.getIsPlatformClient()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationTest.java new file mode 100644 index 00000000000..391a4607293 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaginatedPaymentIntegrationTest.java @@ -0,0 +1,67 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaginatedPaymentIntegrationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaginatedPaymentIntegrationBuilder builder) { + PaginatedPaymentIntegration paginatedPaymentIntegration = builder.buildUnchecked(); + Assertions.assertThat(paginatedPaymentIntegration).isInstanceOf(PaginatedPaymentIntegration.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "limit", PaginatedPaymentIntegration.builder().limit(7) }, + new Object[] { "offset", PaginatedPaymentIntegration.builder().offset(3) }, + new Object[] { "count", PaginatedPaymentIntegration.builder().count(2) }, + new Object[] { "total", PaginatedPaymentIntegration.builder().total(1) }, + new Object[] { "results", PaginatedPaymentIntegration.builder() + .results(Collections.singletonList( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationImpl())) } }; + } + + @Test + public void limit() { + PaginatedPaymentIntegration value = PaginatedPaymentIntegration.of(); + value.setLimit(7); + Assertions.assertThat(value.getLimit()).isEqualTo(7); + } + + @Test + public void offset() { + PaginatedPaymentIntegration value = PaginatedPaymentIntegration.of(); + value.setOffset(3); + Assertions.assertThat(value.getOffset()).isEqualTo(3); + } + + @Test + public void count() { + PaginatedPaymentIntegration value = PaginatedPaymentIntegration.of(); + value.setCount(2); + Assertions.assertThat(value.getCount()).isEqualTo(2); + } + + @Test + public void total() { + PaginatedPaymentIntegration value = PaginatedPaymentIntegration.of(); + value.setTotal(1); + Assertions.assertThat(value.getTotal()).isEqualTo(1); + } + + @Test + public void results() { + PaginatedPaymentIntegration value = PaginatedPaymentIntegration.of(); + value.setResults(Collections + .singletonList(new com.commercetools.checkout.models.payment_integration.PaymentIntegrationImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo(Collections.singletonList( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationTest.java new file mode 100644 index 00000000000..2e9fc719c22 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationTest.java @@ -0,0 +1,194 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationBuilder builder) { + PaymentIntegration paymentIntegration = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegration).isInstanceOf(PaymentIntegration.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentIntegration.builder().id("id") }, + new Object[] { "version", PaymentIntegration.builder().version(2L) }, + new Object[] { "key", PaymentIntegration.builder().key("key") }, + new Object[] { "application", PaymentIntegration.builder() + .application(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()) }, + new Object[] { "status", + PaymentIntegration.builder() + .status(com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus + .findEnum("Active")) }, + new Object[] { "type", PaymentIntegration.builder().type("type") }, + new Object[] { "name", PaymentIntegration.builder().name("name") }, + new Object[] { "predicate", PaymentIntegration.builder().predicate("predicate") }, + new Object[] { "componentType", PaymentIntegration.builder() + .componentType(com.commercetools.checkout.models.payment_integration.PaymentComponentType + .findEnum("Component")) }, + new Object[] { "connectorDeployment", PaymentIntegration.builder() + .connectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()) }, + new Object[] { "displayInfo", PaymentIntegration.builder() + .displayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()) }, + new Object[] { "sortingInfo", PaymentIntegration.builder() + .sortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()) }, + new Object[] { "automatedReversalConfiguration", PaymentIntegration.builder() + .automatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()) }, + new Object[] { "createdAt", + PaymentIntegration.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "createdBy", + PaymentIntegration.builder() + .createdBy(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()) }, + new Object[] { "lastModifiedAt", + PaymentIntegration.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedBy", + PaymentIntegration.builder() + .lastModifiedBy( + new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()) } }; + } + + @Test + public void id() { + PaymentIntegration value = PaymentIntegration.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + PaymentIntegration value = PaymentIntegration.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); + } + + @Test + public void key() { + PaymentIntegration value = PaymentIntegration.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void application() { + PaymentIntegration value = PaymentIntegration.of(); + value.setApplication(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); + Assertions.assertThat(value.getApplication()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); + } + + @Test + public void status() { + PaymentIntegration value = PaymentIntegration.of(); + value.setStatus( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + } + + @Test + public void type() { + PaymentIntegration value = PaymentIntegration.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } + + @Test + public void name() { + PaymentIntegration value = PaymentIntegration.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void predicate() { + PaymentIntegration value = PaymentIntegration.of(); + value.setPredicate("predicate"); + Assertions.assertThat(value.getPredicate()).isEqualTo("predicate"); + } + + @Test + public void componentType() { + PaymentIntegration value = PaymentIntegration.of(); + value.setComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + Assertions.assertThat(value.getComponentType()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + } + + @Test + public void connectorDeployment() { + PaymentIntegration value = PaymentIntegration.of(); + value.setConnectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + Assertions.assertThat(value.getConnectorDeployment()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + } + + @Test + public void displayInfo() { + PaymentIntegration value = PaymentIntegration.of(); + value.setDisplayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + Assertions.assertThat(value.getDisplayInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + } + + @Test + public void sortingInfo() { + PaymentIntegration value = PaymentIntegration.of(); + value.setSortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + Assertions.assertThat(value.getSortingInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + } + + @Test + public void automatedReversalConfiguration() { + PaymentIntegration value = PaymentIntegration.of(); + value.setAutomatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + Assertions.assertThat(value.getAutomatedReversalConfiguration()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + } + + @Test + public void createdAt() { + PaymentIntegration value = PaymentIntegration.of(); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void createdBy() { + PaymentIntegration value = PaymentIntegration.of(); + value.setCreatedBy(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()); + Assertions.assertThat(value.getCreatedBy()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.CreatedByImpl()); + } + + @Test + public void lastModifiedAt() { + PaymentIntegration value = PaymentIntegration.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedBy() { + PaymentIntegration value = PaymentIntegration.of(); + value.setLastModifiedBy(new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()); + Assertions.assertThat(value.getLastModifiedBy()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.LastModifiedByImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsTest.java new file mode 100644 index 00000000000..9b6037aef0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/PaymentIntegrationUpdateActionsTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.checkout.models.payment_integration; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationUpdateActionsTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationUpdateActionsBuilder builder) { + PaymentIntegrationUpdateActions paymentIntegrationUpdateActions = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationUpdateActions).isInstanceOf(PaymentIntegrationUpdateActions.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "version", PaymentIntegrationUpdateActions.builder().version(2) }, + new Object[] { "actions", PaymentIntegrationUpdateActions.builder() + .actions(Collections.singletonList( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionImpl())) } }; + } + + @Test + public void version() { + PaymentIntegrationUpdateActions value = PaymentIntegrationUpdateActions.of(); + value.setVersion(2); + Assertions.assertThat(value.getVersion()).isEqualTo(2); + } + + @Test + public void actions() { + PaymentIntegrationUpdateActions value = PaymentIntegrationUpdateActions.of(); + value.setActions(Collections.singletonList( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionImpl())); + Assertions.assertThat(value.getActions()) + .isEqualTo(Collections.singletonList( + new com.commercetools.checkout.models.payment_integration.PaymentIntegrationUpdateActionImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionTest.java new file mode 100644 index 00000000000..bc0098bea5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationPredicateUpdateActionTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAutomatedReversalConfigurationPredicateUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAutomatedReversalConfigurationPredicateUpdateActionBuilder builder) { + SetAutomatedReversalConfigurationPredicateUpdateAction setAutomatedReversalConfigurationPredicateUpdateAction = builder + .buildUnchecked(); + Assertions.assertThat(setAutomatedReversalConfigurationPredicateUpdateAction) + .isInstanceOf(SetAutomatedReversalConfigurationPredicateUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "predicate", + SetAutomatedReversalConfigurationPredicateUpdateAction.builder().predicate("predicate") } }; + } + + @Test + public void predicate() { + SetAutomatedReversalConfigurationPredicateUpdateAction value = SetAutomatedReversalConfigurationPredicateUpdateAction + .of(); + value.setPredicate("predicate"); + Assertions.assertThat(value.getPredicate()).isEqualTo("predicate"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionTest.java new file mode 100644 index 00000000000..05902307666 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationStatusUpdateActionTest.java @@ -0,0 +1,32 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAutomatedReversalConfigurationStatusUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAutomatedReversalConfigurationStatusUpdateActionBuilder builder) { + SetAutomatedReversalConfigurationStatusUpdateAction setAutomatedReversalConfigurationStatusUpdateAction = builder + .buildUnchecked(); + Assertions.assertThat(setAutomatedReversalConfigurationStatusUpdateAction) + .isInstanceOf(SetAutomatedReversalConfigurationStatusUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "status", + SetAutomatedReversalConfigurationStatusUpdateAction.builder().status("status") } }; + } + + @Test + public void status() { + SetAutomatedReversalConfigurationStatusUpdateAction value = SetAutomatedReversalConfigurationStatusUpdateAction + .of(); + value.setStatus("status"); + Assertions.assertThat(value.getStatus()).isEqualTo("status"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionTest.java new file mode 100644 index 00000000000..bf21175273f --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetAutomatedReversalConfigurationUpdateActionTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAutomatedReversalConfigurationUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAutomatedReversalConfigurationUpdateActionBuilder builder) { + SetAutomatedReversalConfigurationUpdateAction setAutomatedReversalConfigurationUpdateAction = builder + .buildUnchecked(); + Assertions.assertThat(setAutomatedReversalConfigurationUpdateAction) + .isInstanceOf(SetAutomatedReversalConfigurationUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "automatedReversalConfiguration", + SetAutomatedReversalConfigurationUpdateAction.builder() + .automatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()) } }; + } + + @Test + public void automatedReversalConfiguration() { + SetAutomatedReversalConfigurationUpdateAction value = SetAutomatedReversalConfigurationUpdateAction.of(); + value.setAutomatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + Assertions.assertThat(value.getAutomatedReversalConfiguration()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionTest.java new file mode 100644 index 00000000000..c99ce5b12d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetConnectorDeploymentUpdateActionTest.java @@ -0,0 +1,34 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetConnectorDeploymentUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetConnectorDeploymentUpdateActionBuilder builder) { + SetConnectorDeploymentUpdateAction setConnectorDeploymentUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setConnectorDeploymentUpdateAction) + .isInstanceOf(SetConnectorDeploymentUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "connectorDeployment", SetConnectorDeploymentUpdateAction.builder() + .connectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()) } }; + } + + @Test + public void connectorDeployment() { + SetConnectorDeploymentUpdateAction value = SetConnectorDeploymentUpdateAction.of(); + value.setConnectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + Assertions.assertThat(value.getConnectorDeployment()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionTest.java new file mode 100644 index 00000000000..109142cbf89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoDescriptionUpdateActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDisplayInfoDescriptionUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDisplayInfoDescriptionUpdateActionBuilder builder) { + SetDisplayInfoDescriptionUpdateAction setDisplayInfoDescriptionUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDisplayInfoDescriptionUpdateAction) + .isInstanceOf(SetDisplayInfoDescriptionUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "description", SetDisplayInfoDescriptionUpdateAction.builder() + .description(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void description() { + SetDisplayInfoDescriptionUpdateAction value = SetDisplayInfoDescriptionUpdateAction.of(); + value.setDescription(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionTest.java new file mode 100644 index 00000000000..eca62c75be2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLabelUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDisplayInfoLabelUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDisplayInfoLabelUpdateActionBuilder builder) { + SetDisplayInfoLabelUpdateAction setDisplayInfoLabelUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDisplayInfoLabelUpdateAction).isInstanceOf(SetDisplayInfoLabelUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "label", SetDisplayInfoLabelUpdateAction.builder() + .label(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void label() { + SetDisplayInfoLabelUpdateAction value = SetDisplayInfoLabelUpdateAction.of(); + value.setLabel(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLabel()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionTest.java new file mode 100644 index 00000000000..c5127c7f9e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoLogoUrlUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDisplayInfoLogoUrlUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDisplayInfoLogoUrlUpdateActionBuilder builder) { + SetDisplayInfoLogoUrlUpdateAction setDisplayInfoLogoUrlUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDisplayInfoLogoUrlUpdateAction).isInstanceOf(SetDisplayInfoLogoUrlUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "logoUrl", SetDisplayInfoLogoUrlUpdateAction.builder() + .logoUrl(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void logoUrl() { + SetDisplayInfoLogoUrlUpdateAction value = SetDisplayInfoLogoUrlUpdateAction.of(); + value.setLogoUrl(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLogoUrl()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionTest.java new file mode 100644 index 00000000000..812993527b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoPayButtonTextUpdateActionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDisplayInfoPayButtonTextUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDisplayInfoPayButtonTextUpdateActionBuilder builder) { + SetDisplayInfoPayButtonTextUpdateAction setDisplayInfoPayButtonTextUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDisplayInfoPayButtonTextUpdateAction) + .isInstanceOf(SetDisplayInfoPayButtonTextUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "payButtonText", SetDisplayInfoPayButtonTextUpdateAction.builder() + .payButtonText(new com.commercetools.checkout.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void payButtonText() { + SetDisplayInfoPayButtonTextUpdateAction value = SetDisplayInfoPayButtonTextUpdateAction.of(); + value.setPayButtonText(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getPayButtonText()) + .isEqualTo(new com.commercetools.checkout.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionTest.java new file mode 100644 index 00000000000..1a12478aee7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetDisplayInfoUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDisplayInfoUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDisplayInfoUpdateActionBuilder builder) { + SetDisplayInfoUpdateAction setDisplayInfoUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setDisplayInfoUpdateAction).isInstanceOf(SetDisplayInfoUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "displayInfo", SetDisplayInfoUpdateAction.builder() + .displayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()) } }; + } + + @Test + public void displayInfo() { + SetDisplayInfoUpdateAction value = SetDisplayInfoUpdateAction.of(); + value.setDisplayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + Assertions.assertThat(value.getDisplayInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionTest.java new file mode 100644 index 00000000000..9b3d8af0c93 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetKeyUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetKeyUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetKeyUpdateActionBuilder builder) { + SetKeyUpdateAction setKeyUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setKeyUpdateAction).isInstanceOf(SetKeyUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", SetKeyUpdateAction.builder().key("key") } }; + } + + @Test + public void key() { + SetKeyUpdateAction value = SetKeyUpdateAction.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionTest.java new file mode 100644 index 00000000000..8cc1994eff8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetNameUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetNameUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetNameUpdateActionBuilder builder) { + SetNameUpdateAction setNameUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setNameUpdateAction).isInstanceOf(SetNameUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", SetNameUpdateAction.builder().name("name") } }; + } + + @Test + public void name() { + SetNameUpdateAction value = SetNameUpdateAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionTest.java new file mode 100644 index 00000000000..35940619763 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetPredicateUpdateActionTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPredicateUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPredicateUpdateActionBuilder builder) { + SetPredicateUpdateAction setPredicateUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setPredicateUpdateAction).isInstanceOf(SetPredicateUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "predicate", SetPredicateUpdateAction.builder().predicate("predicate") } }; + } + + @Test + public void predicate() { + SetPredicateUpdateAction value = SetPredicateUpdateAction.of(); + value.setPredicate("predicate"); + Assertions.assertThat(value.getPredicate()).isEqualTo("predicate"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionTest.java new file mode 100644 index 00000000000..9c2f60db499 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetSortingInfoUpdateActionTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetSortingInfoUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetSortingInfoUpdateActionBuilder builder) { + SetSortingInfoUpdateAction setSortingInfoUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setSortingInfoUpdateAction).isInstanceOf(SetSortingInfoUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "sortingInfo", SetSortingInfoUpdateAction.builder() + .sortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()) } }; + } + + @Test + public void sortingInfo() { + SetSortingInfoUpdateAction value = SetSortingInfoUpdateAction.of(); + value.setSortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + Assertions.assertThat(value.getSortingInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionTest.java new file mode 100644 index 00000000000..7514341bf83 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetStatusUpdateActionTest.java @@ -0,0 +1,34 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetStatusUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetStatusUpdateActionBuilder builder) { + SetStatusUpdateAction setStatusUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setStatusUpdateAction).isInstanceOf(SetStatusUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "status", + SetStatusUpdateAction.builder() + .status(com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus + .findEnum("Active")) } }; + } + + @Test + public void status() { + SetStatusUpdateAction value = SetStatusUpdateAction.of(); + value.setStatus( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionTest.java new file mode 100644 index 00000000000..70659fc63cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SetTypeUpdateActionTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetTypeUpdateActionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetTypeUpdateActionBuilder builder) { + SetTypeUpdateAction setTypeUpdateAction = builder.buildUnchecked(); + Assertions.assertThat(setTypeUpdateAction).isInstanceOf(SetTypeUpdateAction.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", SetTypeUpdateAction.builder().type("type") } }; + } + + @Test + public void type() { + SetTypeUpdateAction value = SetTypeUpdateAction.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoTest.java new file mode 100644 index 00000000000..9647ffc8942 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration/SortingInfoTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.checkout.models.payment_integration; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SortingInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SortingInfoBuilder builder) { + SortingInfo sortingInfo = builder.buildUnchecked(); + Assertions.assertThat(sortingInfo).isInstanceOf(SortingInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "priority", SortingInfo.builder().priority(6) } }; + } + + @Test + public void priority() { + SortingInfo value = SortingInfo.of(); + value.setPriority(6); + Assertions.assertThat(value.getPriority()).isEqualTo(6); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftTest.java new file mode 100644 index 00000000000..c7383944240 --- /dev/null +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/payment_integration_draft/PaymentIntegrationDraftTest.java @@ -0,0 +1,135 @@ + +package com.commercetools.checkout.models.payment_integration_draft; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentIntegrationDraftTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentIntegrationDraftBuilder builder) { + PaymentIntegrationDraft paymentIntegrationDraft = builder.buildUnchecked(); + Assertions.assertThat(paymentIntegrationDraft).isInstanceOf(PaymentIntegrationDraft.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", PaymentIntegrationDraft.builder().key("key") }, + new Object[] { "application", PaymentIntegrationDraft.builder() + .application(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()) }, + new Object[] { "status", + PaymentIntegrationDraft.builder() + .status(com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus + .findEnum("Active")) }, + new Object[] { "type", PaymentIntegrationDraft.builder().type("type") }, + new Object[] { "name", PaymentIntegrationDraft.builder().name("name") }, + new Object[] { "predicate", PaymentIntegrationDraft.builder().predicate("predicate") }, + new Object[] { "componentType", PaymentIntegrationDraft.builder() + .componentType(com.commercetools.checkout.models.payment_integration.PaymentComponentType + .findEnum("Component")) }, + new Object[] { "connectorDeployment", PaymentIntegrationDraft.builder() + .connectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()) }, + new Object[] { "displayInfo", PaymentIntegrationDraft.builder() + .displayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()) }, + new Object[] { "sortingInfo", PaymentIntegrationDraft.builder() + .sortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()) }, + new Object[] { "automatedReversalConfiguration", PaymentIntegrationDraft.builder() + .automatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()) } }; + } + + @Test + public void key() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void application() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setApplication(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); + Assertions.assertThat(value.getApplication()) + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); + } + + @Test + public void status() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setStatus( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + Assertions.assertThat(value.getStatus()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentIntegrationStatus.findEnum("Active")); + } + + @Test + public void type() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } + + @Test + public void name() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void predicate() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setPredicate("predicate"); + Assertions.assertThat(value.getPredicate()).isEqualTo("predicate"); + } + + @Test + public void componentType() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setComponentType( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + Assertions.assertThat(value.getComponentType()) + .isEqualTo( + com.commercetools.checkout.models.payment_integration.PaymentComponentType.findEnum("Component")); + } + + @Test + public void connectorDeployment() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setConnectorDeployment( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + Assertions.assertThat(value.getConnectorDeployment()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.ConnectorDeploymentReferenceImpl()); + } + + @Test + public void displayInfo() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setDisplayInfo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + Assertions.assertThat(value.getDisplayInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.DisplayInfoImpl()); + } + + @Test + public void sortingInfo() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setSortingInfo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + Assertions.assertThat(value.getSortingInfo()) + .isEqualTo(new com.commercetools.checkout.models.payment_integration.SortingInfoImpl()); + } + + @Test + public void automatedReversalConfiguration() { + PaymentIntegrationDraft value = PaymentIntegrationDraft.of(); + value.setAutomatedReversalConfiguration( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + Assertions.assertThat(value.getAutomatedReversalConfiguration()) + .isEqualTo( + new com.commercetools.checkout.models.payment_integration.AutomatedReversalConfigurationImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java index ee14c20a123..c107f307634 100644 --- a/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java +++ b/commercetools/commercetools-sdk-java-checkout/src/test/java-generated/com/commercetools/checkout/models/transaction/TransactionTest.java @@ -23,8 +23,7 @@ public static Object[][] objectBuilder() { new Object[] { "key", Transaction.builder().key("key") }, new Object[] { "version", Transaction.builder().version(2) }, new Object[] { "application", Transaction.builder() - .application( - new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()) }, + .application(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()) }, new Object[] { "transactionItems", Transaction.builder() .transactionItems(Collections.singletonList( @@ -64,9 +63,9 @@ public void version() { @Test public void application() { Transaction value = Transaction.of(); - value.setApplication(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + value.setApplication(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); Assertions.assertThat(value.getApplication()) - .isEqualTo(new com.commercetools.checkout.models.application.ApplicationResourceIdentifierImpl()); + .isEqualTo(new com.commercetools.checkout.models.application.ApplicationReferenceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChange.java index dc0a13a7780..228399f721d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChange.java @@ -31,6 +31,8 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -79,6 +81,27 @@ public interface AddAssetChange extends Change { @JsonProperty("nextValue") public Asset getNextValue(); + /** + *

    Product data that was updated.

    + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

    Identifier of the updated Product Variant.

    + *

    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

    + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -100,6 +123,25 @@ public interface AddAssetChange extends Change { public void setNextValue(final Asset nextValue); + /** + *

    Product data that was updated.

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

    Identifier of the updated Product Variant.

    + *

    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

    + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of AddAssetChange @@ -118,6 +160,8 @@ public static AddAssetChange of(final AddAssetChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -137,6 +181,8 @@ public static AddAssetChange deepCopy(@Nullable final AddAssetChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(com.commercetools.history.models.common.Asset.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.Asset.deepCopy(template.getNextValue())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeBuilder.java index 669f2f58cf9..45bbc75a606 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -30,6 +32,10 @@ public class AddAssetChangeBuilder implements Builder { private com.commercetools.history.models.common.Asset nextValue; + private String catalogData; + + private String variant; + /** * set the value to the change * @param change value to be set @@ -111,6 +117,33 @@ public AddAssetChangeBuilder nextValue(final com.commercetools.history.models.co return this; } + /** + *

    Product data that was updated.

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

    Identifier of the updated Product Variant.

    + *

    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

    + * @param variant value to be set + * @return Builder + */ + + public AddAssetChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -138,6 +171,29 @@ public com.commercetools.history.models.common.Asset getNextValue() { return this.nextValue; } + /** + *

    Product data that was updated.

    + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

    Identifier of the updated Product Variant.

    + *

    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

    + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds AddAssetChange with checking for non-null required values * @return AddAssetChange @@ -146,7 +202,9 @@ public AddAssetChange build() { Objects.requireNonNull(change, AddAssetChange.class + ": change is missing"); Objects.requireNonNull(previousValue, AddAssetChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, AddAssetChange.class + ": nextValue is missing"); - return new AddAssetChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, AddAssetChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, AddAssetChange.class + ": variant is missing"); + return new AddAssetChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -154,7 +212,7 @@ public AddAssetChange build() { * @return AddAssetChange */ public AddAssetChange buildUnchecked() { - return new AddAssetChangeImpl(change, previousValue, nextValue); + return new AddAssetChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -175,6 +233,8 @@ public static AddAssetChangeBuilder of(final AddAssetChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeImpl.java index 0ae07b11291..5cec66cd010 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddAssetChangeImpl.java @@ -34,16 +34,23 @@ public class AddAssetChangeImpl implements AddAssetChange, ModelBase { private com.commercetools.history.models.common.Asset nextValue; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @JsonCreator AddAssetChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Asset previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Asset nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.Asset nextValue, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; + this.variant = variant; this.type = ADD_ASSET_CHANGE; } @@ -86,6 +93,27 @@ public com.commercetools.history.models.common.Asset getNextValue() { return this.nextValue; } + /** + *

    Product data that was updated.

    + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

    Identifier of the updated Product Variant.

    + *

    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

    + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -98,6 +126,14 @@ public void setNextValue(final com.commercetools.history.models.common.Asset nex this.nextValue = nextValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -112,10 +148,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -125,6 +165,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -134,6 +176,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } 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 index bbd3dc7f3bf..b1397d56470 100644 --- 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 @@ -33,6 +33,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("AddAssociateChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AddAssociateChangeImpl.class) +@Deprecated public interface AddAssociateChange extends Change { /** 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 index 5cdb6d4601e..d7a754711fc 100644 --- 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 @@ -21,6 +21,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddAssociateChangeBuilder implements Builder { private String change; 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 index 67b0b69009d..32b3a27defb 100644 --- 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 @@ -20,6 +20,7 @@ *

    Change triggered by the Add Associate update action.

    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddAssociateChangeImpl implements AddAssociateChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChange.java index 6a7b2b7ea97..9315c2e0b51 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.EnumValue; +import com.commercetools.history.models.common.CustomFieldEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -27,6 +27,7 @@ * .change("{change}") * .nextValue(nextValueBuilder -> nextValueBuilder) * .fieldName("{fieldName}") + * .attributeName("{attributeName}") * .build() * * @@ -64,7 +65,7 @@ public interface AddEnumValueChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public EnumValue getNextValue(); + public CustomFieldEnumValue getNextValue(); /** *

    Name of the updated FieldDefinition.

    @@ -74,6 +75,14 @@ public interface AddEnumValueChange extends Change { @JsonProperty("fieldName") public String getFieldName(); + /** + *

    Name of the updated AttributeDefinition.

    + * @return attributeName + */ + @NotNull + @JsonProperty("attributeName") + public String getAttributeName(); + /** * set change * @param change value to be set @@ -86,7 +95,7 @@ public interface AddEnumValueChange extends Change { * @param nextValue value to be set */ - public void setNextValue(final EnumValue nextValue); + public void setNextValue(final CustomFieldEnumValue nextValue); /** *

    Name of the updated FieldDefinition.

    @@ -95,6 +104,13 @@ public interface AddEnumValueChange extends Change { public void setFieldName(final String fieldName); + /** + *

    Name of the updated AttributeDefinition.

    + * @param attributeName value to be set + */ + + public void setAttributeName(final String attributeName); + /** * factory method * @return instance of AddEnumValueChange @@ -113,6 +129,7 @@ public static AddEnumValueChange of(final AddEnumValueChange template) { instance.setChange(template.getChange()); instance.setNextValue(template.getNextValue()); instance.setFieldName(template.getFieldName()); + instance.setAttributeName(template.getAttributeName()); return instance; } @@ -131,8 +148,9 @@ public static AddEnumValueChange deepCopy(@Nullable final AddEnumValueChange tem AddEnumValueChangeImpl instance = new AddEnumValueChangeImpl(); instance.setChange(template.getChange()); instance.setNextValue( - com.commercetools.history.models.change_value.EnumValue.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.CustomFieldEnumValue.deepCopy(template.getNextValue())); instance.setFieldName(template.getFieldName()); + instance.setAttributeName(template.getAttributeName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeBuilder.java index 40aa9296916..56608820f49 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeBuilder.java @@ -17,6 +17,7 @@ * .change("{change}") * .nextValue(nextValueBuilder -> nextValueBuilder) * .fieldName("{fieldName}") + * .attributeName("{attributeName}") * .build() * * @@ -26,10 +27,12 @@ public class AddEnumValueChangeBuilder implements Builder { private String change; - private com.commercetools.history.models.change_value.EnumValue nextValue; + private com.commercetools.history.models.common.CustomFieldEnumValue nextValue; private String fieldName; + private String attributeName; + /** * set the value to the change * @param change value to be set @@ -48,8 +51,9 @@ public AddEnumValueChangeBuilder change(final String change) { */ public AddEnumValueChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()) + .build(); return this; } @@ -60,8 +64,8 @@ public AddEnumValueChangeBuilder nextValue( */ public AddEnumValueChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()); return this; } @@ -72,7 +76,7 @@ public AddEnumValueChangeBuilder withNextValue( */ public AddEnumValueChangeBuilder nextValue( - final com.commercetools.history.models.change_value.EnumValue nextValue) { + final com.commercetools.history.models.common.CustomFieldEnumValue nextValue) { this.nextValue = nextValue; return this; } @@ -88,6 +92,17 @@ public AddEnumValueChangeBuilder fieldName(final String fieldName) { return this; } + /** + *

    Name of the updated AttributeDefinition.

    + * @param attributeName value to be set + * @return Builder + */ + + public AddEnumValueChangeBuilder attributeName(final String attributeName) { + this.attributeName = attributeName; + return this; + } + /** * value of change} * @return change @@ -102,7 +117,7 @@ public String getChange() { * @return nextValue */ - public com.commercetools.history.models.change_value.EnumValue getNextValue() { + public com.commercetools.history.models.common.CustomFieldEnumValue getNextValue() { return this.nextValue; } @@ -115,6 +130,15 @@ public String getFieldName() { return this.fieldName; } + /** + *

    Name of the updated AttributeDefinition.

    + * @return attributeName + */ + + public String getAttributeName() { + return this.attributeName; + } + /** * builds AddEnumValueChange with checking for non-null required values * @return AddEnumValueChange @@ -123,7 +147,8 @@ public AddEnumValueChange build() { Objects.requireNonNull(change, AddEnumValueChange.class + ": change is missing"); Objects.requireNonNull(nextValue, AddEnumValueChange.class + ": nextValue is missing"); Objects.requireNonNull(fieldName, AddEnumValueChange.class + ": fieldName is missing"); - return new AddEnumValueChangeImpl(change, nextValue, fieldName); + Objects.requireNonNull(attributeName, AddEnumValueChange.class + ": attributeName is missing"); + return new AddEnumValueChangeImpl(change, nextValue, fieldName, attributeName); } /** @@ -131,7 +156,7 @@ public AddEnumValueChange build() { * @return AddEnumValueChange */ public AddEnumValueChange buildUnchecked() { - return new AddEnumValueChangeImpl(change, nextValue, fieldName); + return new AddEnumValueChangeImpl(change, nextValue, fieldName, attributeName); } /** @@ -152,6 +177,7 @@ public static AddEnumValueChangeBuilder of(final AddEnumValueChange template) { builder.change = template.getChange(); builder.nextValue = template.getNextValue(); builder.fieldName = template.getFieldName(); + builder.attributeName = template.getAttributeName(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeImpl.java index 7f9bf3b2819..dd12bbeb534 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddEnumValueChangeImpl.java @@ -26,20 +26,24 @@ public class AddEnumValueChangeImpl implements AddEnumValueChange, ModelBase { private String change; - private com.commercetools.history.models.change_value.EnumValue nextValue; + private com.commercetools.history.models.common.CustomFieldEnumValue nextValue; private String fieldName; + private String attributeName; + /** * create instance with all properties */ @JsonCreator AddEnumValueChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("nextValue") final com.commercetools.history.models.change_value.EnumValue nextValue, - @JsonProperty("fieldName") final String fieldName) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFieldEnumValue nextValue, + @JsonProperty("fieldName") final String fieldName, + @JsonProperty("attributeName") final String attributeName) { this.change = change; this.nextValue = nextValue; this.fieldName = fieldName; + this.attributeName = attributeName; this.type = ADD_ENUM_VALUE_CHANGE; } @@ -70,7 +74,7 @@ public String getChange() { *

    Value after the change.

    */ - public com.commercetools.history.models.change_value.EnumValue getNextValue() { + public com.commercetools.history.models.common.CustomFieldEnumValue getNextValue() { return this.nextValue; } @@ -82,11 +86,19 @@ public String getFieldName() { return this.fieldName; } + /** + *

    Name of the updated AttributeDefinition.

    + */ + + public String getAttributeName() { + return this.attributeName; + } + public void setChange(final String change) { this.change = change; } - public void setNextValue(final com.commercetools.history.models.change_value.EnumValue nextValue) { + public void setNextValue(final com.commercetools.history.models.common.CustomFieldEnumValue nextValue) { this.nextValue = nextValue; } @@ -94,6 +106,10 @@ public void setFieldName(final String fieldName) { this.fieldName = fieldName; } + public void setAttributeName(final String attributeName) { + this.attributeName = attributeName; + } + @Override public boolean equals(Object o) { if (this == o) @@ -108,16 +124,23 @@ public boolean equals(Object o) { .append(change, that.change) .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) + .append(attributeName, that.attributeName) .append(type, that.type) .append(change, that.change) .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) + .append(attributeName, that.attributeName) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(change).append(nextValue).append(fieldName).toHashCode(); + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(nextValue) + .append(fieldName) + .append(attributeName) + .toHashCode(); } @Override @@ -126,6 +149,7 @@ public String toString() { .append("change", change) .append("nextValue", nextValue) .append("fieldName", fieldName) + .append("attributeName", attributeName) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChange.java index c5f9fcce2c1..c818b79870a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChange.java @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -78,6 +79,7 @@ public interface AddExternalImageChange extends Change { public List getNextValue(); /** + *

    Product data that was updated.

    *
      *
    • staged, if the staged ProductCatalogData was updated.
    • *
    • current, if the current ProductCatalogData was updated.
    • @@ -88,6 +90,15 @@ public interface AddExternalImageChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

      Identifier of the updated Product Variant.

      + *

      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

      + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -126,6 +137,7 @@ public interface AddExternalImageChange extends Change { public void setNextValue(final List nextValue); /** + *

      Product data that was updated.

      *
        *
      • staged, if the staged ProductCatalogData was updated.
      • *
      • current, if the current ProductCatalogData was updated.
      • @@ -135,6 +147,14 @@ public interface AddExternalImageChange extends Change { public void setCatalogData(final String catalogData); + /** + *

        Identifier of the updated Product Variant.

        + *

        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

        + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of AddExternalImageChange @@ -154,6 +174,7 @@ public static AddExternalImageChange of(final AddExternalImageChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -182,6 +203,7 @@ public static AddExternalImageChange deepCopy(@Nullable final AddExternalImageCh .collect(Collectors.toList())) .orElse(null)); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeBuilder.java index 6dabed30afc..0e0e81766f1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +34,8 @@ public class AddExternalImageChangeBuilder implements BuilderProduct data that was updated.

        *
          *
        • staged, if the staged ProductCatalogData was updated.
        • *
        • current, if the current ProductCatalogData was updated.
        • @@ -235,6 +239,18 @@ public AddExternalImageChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

          Identifier of the updated Product Variant.

          + *

          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

          + * @param variant value to be set + * @return Builder + */ + + public AddExternalImageChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -263,6 +279,7 @@ public java.util.List getNextValu } /** + *

          Product data that was updated.

          *
            *
          • staged, if the staged ProductCatalogData was updated.
          • *
          • current, if the current ProductCatalogData was updated.
          • @@ -274,6 +291,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

            Identifier of the updated Product Variant.

            + *

            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

            + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds AddExternalImageChange with checking for non-null required values * @return AddExternalImageChange @@ -283,7 +310,8 @@ public AddExternalImageChange build() { Objects.requireNonNull(previousValue, AddExternalImageChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, AddExternalImageChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, AddExternalImageChange.class + ": catalogData is missing"); - return new AddExternalImageChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, AddExternalImageChange.class + ": variant is missing"); + return new AddExternalImageChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -291,7 +319,7 @@ public AddExternalImageChange build() { * @return AddExternalImageChange */ public AddExternalImageChange buildUnchecked() { - return new AddExternalImageChangeImpl(change, previousValue, nextValue, catalogData); + return new AddExternalImageChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -313,6 +341,7 @@ public static AddExternalImageChangeBuilder of(final AddExternalImageChange temp builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeImpl.java index 87cc3732c7f..0d6d76a639c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddExternalImageChangeImpl.java @@ -32,6 +32,8 @@ public class AddExternalImageChangeImpl implements AddExternalImageChange, Model private String catalogData; + private String variant; + /** * create instance with all properties */ @@ -39,11 +41,12 @@ public class AddExternalImageChangeImpl implements AddExternalImageChange, Model AddExternalImageChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = ADD_EXTERNAL_IMAGE_CHANGE; } @@ -87,6 +90,7 @@ public java.util.List getNextValu } /** + *

            Product data that was updated.

            *
              *
            • staged, if the staged ProductCatalogData was updated.
            • *
            • current, if the current ProductCatalogData was updated.
            • @@ -97,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

              Identifier of the updated Product Variant.

              + *

              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

              + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -121,6 +134,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -136,11 +153,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -151,6 +170,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -161,6 +181,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChange.java index a96d2e0eca3..367b60f0c75 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - *

              Change triggered by the Add Associate update action on a parent of a Business Unit in cases where inheritance applies.

              + *

              This change is initiated by background processes after the Add Associate update action is performed (if Associates are inherited).

              * *
              * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChangeImpl.java index 0553693de5f..bb8e8d727f6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInheritedAssociateChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

              Change triggered by the Add Associate update action on a parent of a Business Unit in cases where inheritance applies.

              + *

              This change is initiated by background processes after the Add Associate update action is performed (if Associates are inherited).

              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AddInheritedAssociateChangeImpl implements AddInheritedAssociateChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChange.java index ed46a035238..0c875f4fff3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.CustomFieldExpandedValue; +import com.commercetools.history.models.common.CustomFields; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -63,7 +63,7 @@ public interface AddInterfaceInteractionChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public CustomFieldExpandedValue getNextValue(); + public CustomFields getNextValue(); /** * set change @@ -77,7 +77,7 @@ public interface AddInterfaceInteractionChange extends Change { * @param nextValue value to be set */ - public void setNextValue(final CustomFieldExpandedValue nextValue); + public void setNextValue(final CustomFields nextValue); /** * factory method @@ -113,8 +113,7 @@ public static AddInterfaceInteractionChange deepCopy(@Nullable final AddInterfac } AddInterfaceInteractionChangeImpl instance = new AddInterfaceInteractionChangeImpl(); instance.setChange(template.getChange()); - instance.setNextValue( - com.commercetools.history.models.change_value.CustomFieldExpandedValue.deepCopy(template.getNextValue())); + instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeBuilder.java index f63ad49dcdc..3a1ca918bef 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeBuilder.java @@ -25,7 +25,7 @@ public class AddInterfaceInteractionChangeBuilder implements Builder builder) { - this.nextValue = builder - .apply(com.commercetools.history.models.change_value.CustomFieldExpandedValueBuilder.of()) - .build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); return this; } @@ -59,9 +57,8 @@ public AddInterfaceInteractionChangeBuilder nextValue( */ public AddInterfaceInteractionChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder - .apply(com.commercetools.history.models.change_value.CustomFieldExpandedValueBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); return this; } @@ -72,7 +69,7 @@ public AddInterfaceInteractionChangeBuilder withNextValue( */ public AddInterfaceInteractionChangeBuilder nextValue( - final com.commercetools.history.models.change_value.CustomFieldExpandedValue nextValue) { + final com.commercetools.history.models.common.CustomFields nextValue) { this.nextValue = nextValue; return this; } @@ -91,7 +88,7 @@ public String getChange() { * @return nextValue */ - public com.commercetools.history.models.change_value.CustomFieldExpandedValue getNextValue() { + public com.commercetools.history.models.common.CustomFields getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeImpl.java index b2a73fc6d64..2a59ce1d173 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeImpl.java @@ -26,14 +26,14 @@ public class AddInterfaceInteractionChangeImpl implements AddInterfaceInteractio private String change; - private com.commercetools.history.models.change_value.CustomFieldExpandedValue nextValue; + private com.commercetools.history.models.common.CustomFields nextValue; /** * create instance with all properties */ @JsonCreator AddInterfaceInteractionChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("nextValue") final com.commercetools.history.models.change_value.CustomFieldExpandedValue nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue) { this.change = change; this.nextValue = nextValue; this.type = ADD_INTERFACE_INTERACTION_CHANGE; @@ -66,7 +66,7 @@ public String getChange() { *

              Value after the change.

              */ - public com.commercetools.history.models.change_value.CustomFieldExpandedValue getNextValue() { + public com.commercetools.history.models.common.CustomFields getNextValue() { return this.nextValue; } @@ -74,7 +74,7 @@ public void setChange(final String change) { this.change = change; } - public void setNextValue(final com.commercetools.history.models.change_value.CustomFieldExpandedValue nextValue) { + public void setNextValue(final com.commercetools.history.models.common.CustomFields nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChange.java index 46019001812..c82a556f942 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.AttributeLocalizedEnumValue; +import com.commercetools.history.models.common.CustomFieldLocalizedEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -69,7 +69,7 @@ public interface AddLocalizedEnumValueChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public AttributeLocalizedEnumValue getNextValue(); + public CustomFieldLocalizedEnumValue getNextValue(); /** *

              Name of the updated FieldDefinition; only present on changes to Types.

              @@ -99,7 +99,7 @@ public interface AddLocalizedEnumValueChange extends Change { * @param nextValue value to be set */ - public void setNextValue(final AttributeLocalizedEnumValue nextValue); + public void setNextValue(final CustomFieldLocalizedEnumValue nextValue); /** *

              Name of the updated FieldDefinition; only present on changes to Types.

              @@ -152,7 +152,7 @@ public static AddLocalizedEnumValueChange deepCopy(@Nullable final AddLocalizedE AddLocalizedEnumValueChangeImpl instance = new AddLocalizedEnumValueChangeImpl(); instance.setChange(template.getChange()); instance.setNextValue( - com.commercetools.history.models.common.AttributeLocalizedEnumValue.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.CustomFieldLocalizedEnumValue.deepCopy(template.getNextValue())); instance.setFieldName(template.getFieldName()); instance.setAttributeName(template.getAttributeName()); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeBuilder.java index 0101c4fbbef..7fc50a9133c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeBuilder.java @@ -27,7 +27,7 @@ public class AddLocalizedEnumValueChangeBuilder implements Builder builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()) + Function builder) { + this.nextValue = builder + .apply(com.commercetools.history.models.common.CustomFieldLocalizedEnumValueBuilder.of()) .build(); return this; } @@ -64,8 +65,9 @@ public AddLocalizedEnumValueChangeBuilder nextValue( */ public AddLocalizedEnumValueChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()); + Function builder) { + this.nextValue = builder + .apply(com.commercetools.history.models.common.CustomFieldLocalizedEnumValueBuilder.of()); return this; } @@ -76,7 +78,7 @@ public AddLocalizedEnumValueChangeBuilder withNextValue( */ public AddLocalizedEnumValueChangeBuilder nextValue( - final com.commercetools.history.models.common.AttributeLocalizedEnumValue nextValue) { + final com.commercetools.history.models.common.CustomFieldLocalizedEnumValue nextValue) { this.nextValue = nextValue; return this; } @@ -117,7 +119,7 @@ public String getChange() { * @return nextValue */ - public com.commercetools.history.models.common.AttributeLocalizedEnumValue getNextValue() { + public com.commercetools.history.models.common.CustomFieldLocalizedEnumValue getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeImpl.java index 5e3474c5312..95abb3f80c1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeImpl.java @@ -30,7 +30,7 @@ public class AddLocalizedEnumValueChangeImpl implements AddLocalizedEnumValueCha private String change; - private com.commercetools.history.models.common.AttributeLocalizedEnumValue nextValue; + private com.commercetools.history.models.common.CustomFieldLocalizedEnumValue nextValue; private String fieldName; @@ -41,7 +41,7 @@ public class AddLocalizedEnumValueChangeImpl implements AddLocalizedEnumValueCha */ @JsonCreator AddLocalizedEnumValueChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("nextValue") final com.commercetools.history.models.common.AttributeLocalizedEnumValue nextValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFieldLocalizedEnumValue nextValue, @JsonProperty("fieldName") final String fieldName, @JsonProperty("attributeName") final String attributeName) { this.change = change; @@ -78,7 +78,7 @@ public String getChange() { *

              Value after the change.

              */ - public com.commercetools.history.models.common.AttributeLocalizedEnumValue getNextValue() { + public com.commercetools.history.models.common.CustomFieldLocalizedEnumValue getNextValue() { return this.nextValue; } @@ -102,7 +102,7 @@ public void setChange(final String change) { this.change = change; } - public void setNextValue(final com.commercetools.history.models.common.AttributeLocalizedEnumValue nextValue) { + public void setNextValue(final com.commercetools.history.models.common.CustomFieldLocalizedEnumValue nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChange.java index 675cbeca74d..5c1de057d56 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChange.java @@ -28,6 +28,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() * * @@ -35,6 +36,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("AddPriceChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AddPriceChangeImpl.class) +@Deprecated public interface AddPriceChange extends Change { /** @@ -68,6 +70,7 @@ public interface AddPriceChange extends Change { public Price getNextValue(); /** + *

              Product data that was updated.

              *
                *
              • staged, if the staged ProductCatalogData was updated.
              • *
              • current, if the current ProductCatalogData was updated.
              • @@ -86,6 +89,15 @@ public interface AddPriceChange extends Change { @JsonProperty("priceId") public String getPriceId(); + /** + *

                Identifier of the updated Product Variant.

                + *

                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -101,6 +113,7 @@ public interface AddPriceChange extends Change { public void setNextValue(final Price nextValue); /** + *

                Product data that was updated.

                *
                  *
                • staged, if the staged ProductCatalogData was updated.
                • *
                • current, if the current ProductCatalogData was updated.
                • @@ -117,6 +130,14 @@ public interface AddPriceChange extends Change { public void setPriceId(final String priceId); + /** + *

                  Identifier of the updated Product Variant.

                  + *

                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                  + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of AddPriceChange @@ -136,6 +157,7 @@ public static AddPriceChange of(final AddPriceChange template) { instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } @@ -156,6 +178,7 @@ public static AddPriceChange deepCopy(@Nullable final AddPriceChange template) { instance.setNextValue(com.commercetools.history.models.common.Price.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeBuilder.java index 25637db4365..f9dc35476aa 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeBuilder.java @@ -18,11 +18,13 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() * * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddPriceChangeBuilder implements Builder { private String change; @@ -33,6 +35,8 @@ public class AddPriceChangeBuilder implements Builder { private String priceId; + private String variant; + /** * set the value to the change * @param change value to be set @@ -80,6 +84,7 @@ public AddPriceChangeBuilder nextValue(final com.commercetools.history.models.co } /** + *

                  Product data that was updated.

                  *
                    *
                  • staged, if the staged ProductCatalogData was updated.
                  • *
                  • current, if the current ProductCatalogData was updated.
                  • @@ -104,6 +109,18 @@ public AddPriceChangeBuilder priceId(final String priceId) { return this; } + /** + *

                    Identifier of the updated Product Variant.

                    + *

                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                    + * @param variant value to be set + * @return Builder + */ + + public AddPriceChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -123,6 +140,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                    Product data that was updated.

                    *
                      *
                    • staged, if the staged ProductCatalogData was updated.
                    • *
                    • current, if the current ProductCatalogData was updated.
                    • @@ -143,6 +161,16 @@ public String getPriceId() { return this.priceId; } + /** + *

                      Identifier of the updated Product Variant.

                      + *

                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                      + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds AddPriceChange with checking for non-null required values * @return AddPriceChange @@ -152,7 +180,8 @@ public AddPriceChange build() { Objects.requireNonNull(nextValue, AddPriceChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, AddPriceChange.class + ": catalogData is missing"); Objects.requireNonNull(priceId, AddPriceChange.class + ": priceId is missing"); - return new AddPriceChangeImpl(change, nextValue, catalogData, priceId); + Objects.requireNonNull(variant, AddPriceChange.class + ": variant is missing"); + return new AddPriceChangeImpl(change, nextValue, catalogData, priceId, variant); } /** @@ -160,7 +189,7 @@ public AddPriceChange build() { * @return AddPriceChange */ public AddPriceChange buildUnchecked() { - return new AddPriceChangeImpl(change, nextValue, catalogData, priceId); + return new AddPriceChangeImpl(change, nextValue, catalogData, priceId, variant); } /** @@ -182,6 +211,7 @@ public static AddPriceChangeBuilder of(final AddPriceChange template) { builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); builder.priceId = template.getPriceId(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeImpl.java index 908a11934dd..22be3e07895 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddPriceChangeImpl.java @@ -20,6 +20,7 @@ *

                      Change triggered by the Add Price update action.

                      */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddPriceChangeImpl implements AddPriceChange, ModelBase { private String type; @@ -32,17 +33,21 @@ public class AddPriceChangeImpl implements AddPriceChange, ModelBase { private String priceId; + private String variant; + /** * create instance with all properties */ @JsonCreator AddPriceChangeImpl(@JsonProperty("change") final String change, @JsonProperty("nextValue") final com.commercetools.history.models.common.Price nextValue, - @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId, + @JsonProperty("variant") final String variant) { this.change = change; this.nextValue = nextValue; this.catalogData = catalogData; this.priceId = priceId; + this.variant = variant; this.type = ADD_PRICE_CHANGE; } @@ -78,6 +83,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                      Product data that was updated.

                      *
                        *
                      • staged, if the staged ProductCatalogData was updated.
                      • *
                      • current, if the current ProductCatalogData was updated.
                      • @@ -96,6 +102,15 @@ public String getPriceId() { return this.priceId; } + /** + *

                        Identifier of the updated Product Variant.

                        + *

                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -112,6 +127,10 @@ public void setPriceId(final String priceId) { this.priceId = priceId; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -127,11 +146,13 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .isEquals(); } @@ -142,6 +163,7 @@ public int hashCode() { .append(nextValue) .append(catalogData) .append(priceId) + .append(variant) .toHashCode(); } @@ -152,6 +174,7 @@ public String toString() { .append("nextValue", nextValue) .append("catalogData", catalogData) .append("priceId", priceId) + .append("variant", variant) .build(); } 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 bbab1a89e29..0142a49f085 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 @@ -43,13 +43,12 @@ public AddProductChangeBuilder change(final String change) { /** *

                        Value after the change.

                        - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public AddProductChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public AddProductChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -59,20 +58,9 @@ public AddProductChangeBuilder nextValue( * @return Builder */ - public AddProductChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                        Value after the change.

                        - * @param nextValue value to be set - * @return Builder - */ - - public AddProductChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public AddProductChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } 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 index a5eb76549eb..62e96e709c0 100644 --- 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 @@ -34,6 +34,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("AddProductSelectionChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AddProductSelectionChangeImpl.class) +@Deprecated public interface AddProductSelectionChange extends Change { /** 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 index 611d176e508..cecd5242de0 100644 --- 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 @@ -22,6 +22,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddProductSelectionChangeBuilder implements Builder { private String change; 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 index 6958aa34248..959bfc31770 100644 --- 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 @@ -20,6 +20,7 @@ *

                        Change triggered by the Add Product Selection update action.

                        */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddProductSelectionChangeImpl implements AddProductSelectionChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChange.java new file mode 100644 index 00000000000..f095359444a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChange.java @@ -0,0 +1,159 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.Shipping; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * AddShippingChange + * + *
                        + * Example to create an instance using the builder pattern + *
                        + *
                        
                        + *     AddShippingChange addShippingChange = AddShippingChange.builder()
                        + *             .change("{change}")
                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                        + *             .build()
                        + * 
                        + *
                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("AddShippingChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AddShippingChangeImpl.class) +public interface AddShippingChange extends Change { + + /** + * discriminator value for AddShippingChange + */ + String ADD_SHIPPING_CHANGE = "AddShippingChange"; + + /** + * + * @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 Shipping 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 Shipping nextValue); + + /** + * factory method + * @return instance of AddShippingChange + */ + public static AddShippingChange of() { + return new AddShippingChangeImpl(); + } + + /** + * factory method to create a shallow copy AddShippingChange + * @param template instance to be copied + * @return copy instance + */ + public static AddShippingChange of(final AddShippingChange template) { + AddShippingChangeImpl instance = new AddShippingChangeImpl(); + instance.setChange(template.getChange()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public AddShippingChange copyDeep(); + + /** + * factory method to create a deep copy of AddShippingChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AddShippingChange deepCopy(@Nullable final AddShippingChange template) { + if (template == null) { + return null; + } + AddShippingChangeImpl instance = new AddShippingChangeImpl(); + instance.setChange(template.getChange()); + instance.setNextValue(com.commercetools.history.models.common.Shipping.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for AddShippingChange + * @return builder + */ + public static AddShippingChangeBuilder builder() { + return AddShippingChangeBuilder.of(); + } + + /** + * create builder for AddShippingChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddShippingChangeBuilder builder(final AddShippingChange template) { + return AddShippingChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAddShippingChange(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/AddShippingChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChangeBuilder.java new file mode 100644 index 00000000000..e2f3aed73de --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChangeBuilder.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; + +/** + * AddShippingChangeBuilder + *
                        + * Example to create an instance using the builder pattern + *
                        + *
                        
                        + *     AddShippingChange addShippingChange = AddShippingChange.builder()
                        + *             .change("{change}")
                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                        + *             .build()
                        + * 
                        + *
                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddShippingChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Shipping nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public AddShippingChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                        Value after the change.

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

                        Value after the change.

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

                        Value after the change.

                        + * @param nextValue value to be set + * @return Builder + */ + + public AddShippingChangeBuilder nextValue(final com.commercetools.history.models.common.Shipping 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.Shipping getNextValue() { + return this.nextValue; + } + + /** + * builds AddShippingChange with checking for non-null required values + * @return AddShippingChange + */ + public AddShippingChange build() { + Objects.requireNonNull(change, AddShippingChange.class + ": change is missing"); + Objects.requireNonNull(nextValue, AddShippingChange.class + ": nextValue is missing"); + return new AddShippingChangeImpl(change, nextValue); + } + + /** + * builds AddShippingChange without checking for non-null required values + * @return AddShippingChange + */ + public AddShippingChange buildUnchecked() { + return new AddShippingChangeImpl(change, nextValue); + } + + /** + * factory method for an instance of AddShippingChangeBuilder + * @return builder + */ + public static AddShippingChangeBuilder of() { + return new AddShippingChangeBuilder(); + } + + /** + * create builder for AddShippingChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AddShippingChangeBuilder of(final AddShippingChange template) { + AddShippingChangeBuilder builder = new AddShippingChangeBuilder(); + 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/AddShippingChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChangeImpl.java new file mode 100644 index 00000000000..46bdd08c7f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShippingChangeImpl.java @@ -0,0 +1,117 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * AddShippingChange + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AddShippingChangeImpl implements AddShippingChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Shipping nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + AddShippingChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("nextValue") final com.commercetools.history.models.common.Shipping nextValue) { + this.change = change; + this.nextValue = nextValue; + this.type = ADD_SHIPPING_CHANGE; + } + + /** + * create empty instance + */ + public AddShippingChangeImpl() { + this.type = ADD_SHIPPING_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                        Value after the change.

                        + */ + + public com.commercetools.history.models.common.Shipping getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setNextValue(final com.commercetools.history.models.common.Shipping nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AddShippingChangeImpl that = (AddShippingChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("nextValue", nextValue) + .build(); + } + + @Override + public AddShippingChange copyDeep() { + return AddShippingChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChange.java index 5d5d18b5901..8dfee01b2d3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.LineItem; +import com.commercetools.history.models.common.ShoppingListLineItem; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface AddShoppingListLineItemChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public LineItem getPreviousValue(); + public ShoppingListLineItem getPreviousValue(); /** *

                        Value after the change.

                        @@ -73,7 +73,7 @@ public interface AddShoppingListLineItemChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public LineItem getNextValue(); + public ShoppingListLineItem getNextValue(); /** * set change @@ -87,14 +87,14 @@ public interface AddShoppingListLineItemChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final LineItem previousValue); + public void setPreviousValue(final ShoppingListLineItem previousValue); /** *

                        Value after the change.

                        * @param nextValue value to be set */ - public void setNextValue(final LineItem nextValue); + public void setNextValue(final ShoppingListLineItem nextValue); /** * factory method @@ -132,8 +132,9 @@ public static AddShoppingListLineItemChange deepCopy(@Nullable final AddShopping AddShoppingListLineItemChangeImpl instance = new AddShoppingListLineItemChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.LineItem.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.LineItem.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.ShoppingListLineItem.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.ShoppingListLineItem.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeBuilder.java index 0423ff62893..3696c5f6916 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeBuilder.java @@ -26,9 +26,9 @@ public class AddShoppingListLineItemChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()) + .build(); return this; } @@ -60,8 +61,8 @@ public AddShoppingListLineItemChangeBuilder previousValue( */ public AddShoppingListLineItemChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()); return this; } @@ -72,7 +73,7 @@ public AddShoppingListLineItemChangeBuilder withPreviousValue( */ public AddShoppingListLineItemChangeBuilder previousValue( - final com.commercetools.history.models.common.LineItem previousValue) { + final com.commercetools.history.models.common.ShoppingListLineItem previousValue) { this.previousValue = previousValue; return this; } @@ -84,8 +85,9 @@ public AddShoppingListLineItemChangeBuilder previousValue( */ public AddShoppingListLineItemChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()) + .build(); return this; } @@ -96,8 +98,8 @@ public AddShoppingListLineItemChangeBuilder nextValue( */ public AddShoppingListLineItemChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()); return this; } @@ -108,7 +110,7 @@ public AddShoppingListLineItemChangeBuilder withNextValue( */ public AddShoppingListLineItemChangeBuilder nextValue( - final com.commercetools.history.models.common.LineItem nextValue) { + final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.nextValue = nextValue; return this; } @@ -127,7 +129,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.LineItem getPreviousValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getPreviousValue() { return this.previousValue; } @@ -136,7 +138,7 @@ public com.commercetools.history.models.common.LineItem getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.LineItem getNextValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeImpl.java index ce3c9d3e028..da9d6dc9d1f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeImpl.java @@ -26,17 +26,17 @@ public class AddShoppingListLineItemChangeImpl implements AddShoppingListLineIte private String change; - private com.commercetools.history.models.common.LineItem previousValue; + private com.commercetools.history.models.common.ShoppingListLineItem previousValue; - private com.commercetools.history.models.common.LineItem nextValue; + private com.commercetools.history.models.common.ShoppingListLineItem nextValue; /** * create instance with all properties */ @JsonCreator AddShoppingListLineItemChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.LineItem previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LineItem nextValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.ShoppingListLineItem previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; @@ -70,7 +70,7 @@ public String getChange() { *

                        Value before the change.

                        */ - public com.commercetools.history.models.common.LineItem getPreviousValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getPreviousValue() { return this.previousValue; } @@ -78,7 +78,7 @@ public com.commercetools.history.models.common.LineItem getPreviousValue() { *

                        Value after the change.

                        */ - public com.commercetools.history.models.common.LineItem getNextValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getNextValue() { return this.nextValue; } @@ -86,11 +86,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.LineItem previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.ShoppingListLineItem previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.LineItem nextValue) { + public void setNextValue(final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChange.java index a7e660a55a2..de11b947436 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChange.java @@ -33,6 +33,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("AddStateRolesChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AddStateRolesChangeImpl.class) +@Deprecated public interface AddStateRolesChange extends Change { /** diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeBuilder.java index 218825451fc..38ac1888948 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeBuilder.java @@ -21,6 +21,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddStateRolesChangeBuilder implements Builder { private String change; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeImpl.java index 8be07f000ca..6c664f855de 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddStateRolesChangeImpl.java @@ -20,6 +20,7 @@ *

                        Change triggered by the Add State roles update action.

                        */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class AddStateRolesChangeImpl implements AddStateRolesChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChange.java index a4a7fb0cea6..1f3874a2d13 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChange.java @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .category(categoryBuilder -> categoryBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -86,6 +87,18 @@ public interface AddToCategoryChange extends Change { @JsonProperty("category") public Reference getCategory(); + /** + *

                        Product data that was updated.

                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -130,6 +143,17 @@ public interface AddToCategoryChange extends Change { public void setCategory(final Reference category); + /** + *

                        Product data that was updated.

                        + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of AddToCategoryChange @@ -149,6 +173,7 @@ public static AddToCategoryChange of(final AddToCategoryChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCategory(template.getCategory()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -177,6 +202,7 @@ public static AddToCategoryChange deepCopy(@Nullable final AddToCategoryChange t .collect(Collectors.toList())) .orElse(null)); instance.setCategory(com.commercetools.history.models.common.Reference.deepCopy(template.getCategory())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeBuilder.java index 93803a7a7ad..6d54d3fcccc 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .category(categoryBuilder -> categoryBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -33,6 +34,8 @@ public class AddToCategoryChangeBuilder implements Builder private com.commercetools.history.models.common.Reference category; + private String catalogData; + /** * set the value to the change * @param change value to be set @@ -90,7 +93,7 @@ public AddToCategoryChangeBuilder plusPreviousValue( */ public AddToCategoryChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -105,34 +108,12 @@ public AddToCategoryChangeBuilder plusPreviousValue( */ public AddToCategoryChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                        Value before the change.

                        - * @param builder function to build the previousValue value - * @return Builder - */ - - public AddToCategoryChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                        Value before the change.

                        - * @param builder function to build the previousValue value - * @return Builder - */ - - public AddToCategoryChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                        Value after the change.

                        * @param nextValue value to be set @@ -178,7 +159,7 @@ public AddToCategoryChangeBuilder plusNextValue( */ public AddToCategoryChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -193,43 +174,20 @@ public AddToCategoryChangeBuilder plusNextValue( */ public AddToCategoryChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                        Value after the change.

                        - * @param builder function to build the nextValue value - * @return Builder - */ - - public AddToCategoryChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                        Value after the change.

                        - * @param builder function to build the nextValue value - * @return Builder - */ - - public AddToCategoryChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                        Category to which the Product was added.

                        - * @param builder function to build the category value + * @param category value to be set * @return Builder */ - public AddToCategoryChangeBuilder category( - Function builder) { - this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public AddToCategoryChangeBuilder category(final com.commercetools.history.models.common.Reference category) { + this.category = category; return this; } @@ -239,20 +197,24 @@ public AddToCategoryChangeBuilder category( * @return Builder */ - public AddToCategoryChangeBuilder withCategory( - Function builder) { - this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public AddToCategoryChangeBuilder category( + Function> builder) { + this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                        Category to which the Product was added.

                        - * @param category value to be set + *

                        Product data that was updated.

                        + * + * @param catalogData value to be set * @return Builder */ - public AddToCategoryChangeBuilder category(final com.commercetools.history.models.common.Reference category) { - this.category = category; + public AddToCategoryChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; return this; } @@ -292,6 +254,19 @@ public com.commercetools.history.models.common.Reference getCategory() { return this.category; } + /** + *

                        Product data that was updated.

                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds AddToCategoryChange with checking for non-null required values * @return AddToCategoryChange @@ -301,7 +276,8 @@ public AddToCategoryChange build() { Objects.requireNonNull(previousValue, AddToCategoryChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, AddToCategoryChange.class + ": nextValue is missing"); Objects.requireNonNull(category, AddToCategoryChange.class + ": category is missing"); - return new AddToCategoryChangeImpl(change, previousValue, nextValue, category); + Objects.requireNonNull(catalogData, AddToCategoryChange.class + ": catalogData is missing"); + return new AddToCategoryChangeImpl(change, previousValue, nextValue, category, catalogData); } /** @@ -309,7 +285,7 @@ public AddToCategoryChange build() { * @return AddToCategoryChange */ public AddToCategoryChange buildUnchecked() { - return new AddToCategoryChangeImpl(change, previousValue, nextValue, category); + return new AddToCategoryChangeImpl(change, previousValue, nextValue, category, catalogData); } /** @@ -331,6 +307,7 @@ public static AddToCategoryChangeBuilder of(final AddToCategoryChange template) builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.category = template.getCategory(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeImpl.java index 6acf6d19714..d061891d05c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddToCategoryChangeImpl.java @@ -32,6 +32,8 @@ public class AddToCategoryChangeImpl implements AddToCategoryChange, ModelBase { private com.commercetools.history.models.common.Reference category; + private String catalogData; + /** * create instance with all properties */ @@ -39,11 +41,13 @@ public class AddToCategoryChangeImpl implements AddToCategoryChange, ModelBase { AddToCategoryChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("category") final com.commercetools.history.models.common.Reference category) { + @JsonProperty("category") final com.commercetools.history.models.common.Reference category, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.category = category; + this.catalogData = catalogData; this.type = ADD_TO_CATEGORY_CHANGE; } @@ -94,6 +98,18 @@ public com.commercetools.history.models.common.Reference getCategory() { return this.category; } + /** + *

                        Product data that was updated.

                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -119,6 +135,10 @@ public void setCategory(final com.commercetools.history.models.common.Reference this.category = category; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -134,11 +154,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(category, that.category) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(category, that.category) + .append(catalogData, that.catalogData) .isEquals(); } @@ -149,6 +171,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(category) + .append(catalogData) .toHashCode(); } @@ -159,6 +182,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("category", category) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChange.java index 67da084d312..59e8e36c6df 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChange.java @@ -77,6 +77,7 @@ public interface AddVariantChange extends Change { public Variant getNextValue(); /** + *

                        Product data that was updated.

                        *
                          *
                        • staged, if the staged ProductCatalogData was updated.
                        • *
                        • current, if the current ProductCatalogData was updated.
                        • @@ -109,6 +110,7 @@ public interface AddVariantChange extends Change { public void setNextValue(final Variant nextValue); /** + *

                          Product data that was updated.

                          *
                            *
                          • staged, if the staged ProductCatalogData was updated.
                          • *
                          • current, if the current ProductCatalogData was updated.
                          • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeBuilder.java index abfd29a812a..cb970c73b0f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeBuilder.java @@ -115,6 +115,7 @@ public AddVariantChangeBuilder nextValue(final com.commercetools.history.models. } /** + *

                            Product data that was updated.

                            *
                              *
                            • staged, if the staged ProductCatalogData was updated.
                            • *
                            • current, if the current ProductCatalogData was updated.
                            • @@ -156,6 +157,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                              Product data that was updated.

                              *
                                *
                              • staged, if the staged ProductCatalogData was updated.
                              • *
                              • current, if the current ProductCatalogData was updated.
                              • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeImpl.java index 8ae6a0f12ac..f7c2868aad0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/AddVariantChangeImpl.java @@ -87,6 +87,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                                Product data that was updated.

                                *
                                  *
                                • staged, if the staged ProductCatalogData was updated.
                                • *
                                • current, if the current ProductCatalogData was updated.
                                • 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 25a38e1da89..71621bf874d 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 @@ -296,6 +296,14 @@ public static com.commercetools.history.models.change.AddShippingAddressIdChange return com.commercetools.history.models.change.AddShippingAddressIdChangeBuilder.of(); } + /** + * builder for addShippingChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.AddShippingChangeBuilder addShippingChangeBuilder() { + return com.commercetools.history.models.change.AddShippingChangeBuilder.of(); + } + /** * builder for addShoppingListLineItemChange subtype * @return builder @@ -376,6 +384,14 @@ public static com.commercetools.history.models.change.ChangeAmountPlannedChangeB return com.commercetools.history.models.change.ChangeAmountPlannedChangeBuilder.of(); } + /** + * builder for changeApprovalRuleModeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeApprovalRuleModeChangeBuilder changeApprovalRuleModeChangeBuilder() { + return com.commercetools.history.models.change.ChangeApprovalRuleModeChangeBuilder.of(); + } + /** * builder for changeAssetNameChange subtype * @return builder @@ -456,6 +472,14 @@ public static com.commercetools.history.models.change.ChangeCustomLineItemQuanti return com.commercetools.history.models.change.ChangeCustomLineItemQuantityChangeBuilder.of(); } + /** + * builder for changeCustomerChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeCustomerChangeBuilder changeCustomerChangeBuilder() { + return com.commercetools.history.models.change.ChangeCustomerChangeBuilder.of(); + } + /** * builder for changeDescriptionChange subtype * @return builder @@ -504,6 +528,14 @@ public static com.commercetools.history.models.change.ChangeGroupsChangeBuilder return com.commercetools.history.models.change.ChangeGroupsChangeBuilder.of(); } + /** + * builder for changeIncludedInStatisticsChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeIncludedInStatisticsChangeBuilder changeIncludedInStatisticsChangeBuilder() { + return com.commercetools.history.models.change.ChangeIncludedInStatisticsChangeBuilder.of(); + } + /** * builder for changeInheritedAssociateChange subtype * @return builder @@ -560,6 +592,30 @@ public static com.commercetools.history.models.change.ChangeLabelChangeBuilder c return com.commercetools.history.models.change.ChangeLabelChangeBuilder.of(); } + /** + * builder for changeLastVariantIdChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeLastVariantIdChangeBuilder changeLastVariantIdChangeBuilder() { + return com.commercetools.history.models.change.ChangeLastVariantIdChangeBuilder.of(); + } + + /** + * builder for changeLineItemNameChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeLineItemNameChangeBuilder changeLineItemNameChangeBuilder() { + return com.commercetools.history.models.change.ChangeLineItemNameChangeBuilder.of(); + } + + /** + * builder for changeLineItemPublishedChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeLineItemPublishedChangeBuilder changeLineItemPublishedChangeBuilder() { + return com.commercetools.history.models.change.ChangeLineItemPublishedChangeBuilder.of(); + } + /** * builder for changeLineItemQuantityChange subtype * @return builder @@ -688,6 +744,14 @@ public static com.commercetools.history.models.change.ChangePriceChangeBuilder c return com.commercetools.history.models.change.ChangePriceChangeBuilder.of(); } + /** + * builder for changePriceRoundingModeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangePriceRoundingModeChangeBuilder changePriceRoundingModeChangeBuilder() { + return com.commercetools.history.models.change.ChangePriceRoundingModeChangeBuilder.of(); + } + /** * builder for changeProductSelectionActiveChange subtype * @return builder @@ -864,6 +928,14 @@ public static com.commercetools.history.models.change.ChangeTextLineItemsOrderCh return com.commercetools.history.models.change.ChangeTextLineItemsOrderChangeBuilder.of(); } + /** + * builder for changeTopLevelUnitChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ChangeTopLevelUnitChangeBuilder changeTopLevelUnitChangeBuilder() { + return com.commercetools.history.models.change.ChangeTopLevelUnitChangeBuilder.of(); + } + /** * builder for changeTransactionInteractionIdChange subtype * @return builder @@ -896,6 +968,14 @@ public static com.commercetools.history.models.change.ChangeValueChangeBuilder c return com.commercetools.history.models.change.ChangeValueChangeBuilder.of(); } + /** + * builder for excludeProductChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ExcludeProductChangeBuilder excludeProductChangeBuilder() { + return com.commercetools.history.models.change.ExcludeProductChangeBuilder.of(); + } + /** * builder for moveImageToPositionChange subtype * @return builder @@ -1112,6 +1192,14 @@ public static com.commercetools.history.models.change.RemoveShippingAddressIdCha return com.commercetools.history.models.change.RemoveShippingAddressIdChangeBuilder.of(); } + /** + * builder for removeShippingChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RemoveShippingChangeBuilder removeShippingChangeBuilder() { + return com.commercetools.history.models.change.RemoveShippingChangeBuilder.of(); + } + /** * builder for removeShoppingListLineItemChange subtype * @return builder @@ -1152,6 +1240,14 @@ public static com.commercetools.history.models.change.RemoveVariantChangeBuilder return com.commercetools.history.models.change.RemoveVariantChangeBuilder.of(); } + /** + * builder for replaceTaxRateChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.ReplaceTaxRateChangeBuilder replaceTaxRateChangeBuilder() { + return com.commercetools.history.models.change.ReplaceTaxRateChangeBuilder.of(); + } + /** * builder for requestQuoteRenegotiationChange subtype * @return builder @@ -1160,6 +1256,22 @@ public static com.commercetools.history.models.change.RequestQuoteRenegotiationC return com.commercetools.history.models.change.RequestQuoteRenegotiationChangeBuilder.of(); } + /** + * builder for revertStagedChangesChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RevertStagedChangesChangeBuilder revertStagedChangesChangeBuilder() { + return com.commercetools.history.models.change.RevertStagedChangesChangeBuilder.of(); + } + + /** + * builder for revertStagedVariantChangesChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.RevertStagedVariantChangesChangeBuilder revertStagedVariantChangesChangeBuilder() { + return com.commercetools.history.models.change.RevertStagedVariantChangesChangeBuilder.of(); + } + /** * builder for setAddressChange subtype * @return builder @@ -1184,6 +1296,14 @@ public static com.commercetools.history.models.change.SetAddressCustomTypeChange return com.commercetools.history.models.change.SetAddressCustomTypeChangeBuilder.of(); } + /** + * builder for setAncestorsChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetAncestorsChangeBuilder setAncestorsChangeBuilder() { + return com.commercetools.history.models.change.SetAncestorsChangeBuilder.of(); + } + /** * builder for setAnonymousIdChange subtype * @return builder @@ -1248,6 +1368,14 @@ public static com.commercetools.history.models.change.SetAssetTagsChangeBuilder return com.commercetools.history.models.change.SetAssetTagsChangeBuilder.of(); } + /** + * builder for setAssociatesChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetAssociatesChangeBuilder setAssociatesChangeBuilder() { + return com.commercetools.history.models.change.SetAssociatesChangeBuilder.of(); + } + /** * builder for setAttributeChange subtype * @return builder @@ -1280,6 +1408,30 @@ public static com.commercetools.history.models.change.SetBillingAddressChangeBui return com.commercetools.history.models.change.SetBillingAddressChangeBuilder.of(); } + /** + * builder for setBillingAddressCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetBillingAddressCustomFieldChangeBuilder setBillingAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetBillingAddressCustomFieldChangeBuilder.of(); + } + + /** + * builder for setBillingAddressCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetBillingAddressCustomTypeChangeBuilder setBillingAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetBillingAddressCustomTypeChangeBuilder.of(); + } + + /** + * builder for setBusinessUnitChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetBusinessUnitChangeBuilder setBusinessUnitChangeBuilder() { + return com.commercetools.history.models.change.SetBusinessUnitChangeBuilder.of(); + } + /** * builder for setCartPredicateChange subtype * @return builder @@ -1360,6 +1512,22 @@ public static com.commercetools.history.models.change.SetCustomLineItemCustomTyp return com.commercetools.history.models.change.SetCustomLineItemCustomTypeChangeBuilder.of(); } + /** + * builder for setCustomLineItemDiscountedPriceChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetCustomLineItemDiscountedPriceChangeBuilder setCustomLineItemDiscountedPriceChangeBuilder() { + return com.commercetools.history.models.change.SetCustomLineItemDiscountedPriceChangeBuilder.of(); + } + + /** + * builder for setCustomLineItemDiscountedPricePerQuantityChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetCustomLineItemDiscountedPricePerQuantityChangeBuilder setCustomLineItemDiscountedPricePerQuantityChangeBuilder() { + return com.commercetools.history.models.change.SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.of(); + } + /** * builder for setCustomLineItemMoneyChange subtype * @return builder @@ -1448,6 +1616,14 @@ public static com.commercetools.history.models.change.SetCustomerEmailChangeBuil return com.commercetools.history.models.change.SetCustomerEmailChangeBuilder.of(); } + /** + * builder for setCustomerGroupAssignmentsChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetCustomerGroupAssignmentsChangeBuilder setCustomerGroupAssignmentsChangeBuilder() { + return com.commercetools.history.models.change.SetCustomerGroupAssignmentsChangeBuilder.of(); + } + /** * builder for setCustomerGroupChange subtype * @return builder @@ -1512,6 +1688,38 @@ public static com.commercetools.history.models.change.SetDeliveryAddressChangeBu return com.commercetools.history.models.change.SetDeliveryAddressChangeBuilder.of(); } + /** + * builder for setDeliveryAddressCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetDeliveryAddressCustomFieldChangeBuilder setDeliveryAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetDeliveryAddressCustomFieldChangeBuilder.of(); + } + + /** + * builder for setDeliveryAddressCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetDeliveryAddressCustomTypeChangeBuilder setDeliveryAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetDeliveryAddressCustomTypeChangeBuilder.of(); + } + + /** + * builder for setDeliveryCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetDeliveryCustomFieldChangeBuilder setDeliveryCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetDeliveryCustomFieldChangeBuilder.of(); + } + + /** + * builder for setDeliveryCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetDeliveryCustomTypeChangeBuilder setDeliveryCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetDeliveryCustomTypeChangeBuilder.of(); + } + /** * builder for setDeliveryItemsChange subtype * @return builder @@ -1528,6 +1736,14 @@ public static com.commercetools.history.models.change.SetDescriptionChangeBuilde return com.commercetools.history.models.change.SetDescriptionChangeBuilder.of(); } + /** + * builder for setDiscountOnTotalPriceChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetDiscountOnTotalPriceChangeBuilder setDiscountOnTotalPriceChangeBuilder() { + return com.commercetools.history.models.change.SetDiscountOnTotalPriceChangeBuilder.of(); + } + /** * builder for setDiscountedPriceChange subtype * @return builder @@ -1584,6 +1800,22 @@ public static com.commercetools.history.models.change.SetImageLabelChangeBuilder return com.commercetools.history.models.change.SetImageLabelChangeBuilder.of(); } + /** + * builder for setInheritedAssociatesChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetInheritedAssociatesChangeBuilder setInheritedAssociatesChangeBuilder() { + return com.commercetools.history.models.change.SetInheritedAssociatesChangeBuilder.of(); + } + + /** + * builder for setInheritedStoresChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetInheritedStoresChangeBuilder setInheritedStoresChangeBuilder() { + return com.commercetools.history.models.change.SetInheritedStoresChangeBuilder.of(); + } + /** * builder for setInputTipChange subtype * @return builder @@ -1608,6 +1840,22 @@ public static com.commercetools.history.models.change.SetIsValidChangeBuilder se return com.commercetools.history.models.change.SetIsValidChangeBuilder.of(); } + /** + * builder for setItemShippingAddressCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetItemShippingAddressCustomFieldChangeBuilder setItemShippingAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetItemShippingAddressCustomFieldChangeBuilder.of(); + } + + /** + * builder for setItemShippingAddressCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetItemShippingAddressCustomTypeChangeBuilder setItemShippingAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetItemShippingAddressCustomTypeChangeBuilder.of(); + } + /** * builder for setKeyChange subtype * @return builder @@ -1768,6 +2016,14 @@ public static com.commercetools.history.models.change.SetMaxApplicationsPerCusto return com.commercetools.history.models.change.SetMaxApplicationsPerCustomerChangeBuilder.of(); } + /** + * builder for setMaxCartQuantityChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetMaxCartQuantityChangeBuilder setMaxCartQuantityChangeBuilder() { + return com.commercetools.history.models.change.SetMaxCartQuantityChangeBuilder.of(); + } + /** * builder for setMetaDescriptionChange subtype * @return builder @@ -1824,6 +2080,14 @@ public static com.commercetools.history.models.change.SetMiddleNameChangeBuilder return com.commercetools.history.models.change.SetMiddleNameChangeBuilder.of(); } + /** + * builder for setMinCartQuantityChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetMinCartQuantityChangeBuilder setMinCartQuantityChangeBuilder() { + return com.commercetools.history.models.change.SetMinCartQuantityChangeBuilder.of(); + } + /** * builder for setNameChange subtype * @return builder @@ -1880,6 +2144,22 @@ public static com.commercetools.history.models.change.SetOrderTotalTaxChangeBuil return com.commercetools.history.models.change.SetOrderTotalTaxChangeBuilder.of(); } + /** + * builder for setParcelCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetParcelCustomFieldChangeBuilder setParcelCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetParcelCustomFieldChangeBuilder.of(); + } + + /** + * builder for setParcelCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetParcelCustomTypeChangeBuilder setParcelCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetParcelCustomTypeChangeBuilder.of(); + } + /** * builder for setParcelItemsChange subtype * @return builder @@ -1904,6 +2184,14 @@ public static com.commercetools.history.models.change.SetParcelTrackingDataChang return com.commercetools.history.models.change.SetParcelTrackingDataChangeBuilder.of(); } + /** + * builder for setPasswordChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetPasswordChangeBuilder setPasswordChangeBuilder() { + return com.commercetools.history.models.change.SetPasswordChangeBuilder.of(); + } + /** * builder for setPermissionsChange subtype * @return builder @@ -1912,6 +2200,22 @@ public static com.commercetools.history.models.change.SetPermissionsChangeBuilde return com.commercetools.history.models.change.SetPermissionsChangeBuilder.of(); } + /** + * builder for setPriceKeyChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetPriceKeyChangeBuilder setPriceKeyChangeBuilder() { + return com.commercetools.history.models.change.SetPriceKeyChangeBuilder.of(); + } + + /** + * builder for setPriceModeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetPriceModeChangeBuilder setPriceModeChangeBuilder() { + return com.commercetools.history.models.change.SetPriceModeChangeBuilder.of(); + } + /** * builder for setPricesChange subtype * @return builder @@ -1920,6 +2224,14 @@ public static com.commercetools.history.models.change.SetPricesChangeBuilder set return com.commercetools.history.models.change.SetPricesChangeBuilder.of(); } + /** + * builder for setProductAttributeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetProductAttributeChangeBuilder setProductAttributeChangeBuilder() { + return com.commercetools.history.models.change.SetProductAttributeChangeBuilder.of(); + } + /** * builder for setProductCountChange subtype * @return builder @@ -2000,6 +2312,46 @@ public static com.commercetools.history.models.change.SetRestockableInDaysChange return com.commercetools.history.models.change.SetRestockableInDaysChangeBuilder.of(); } + /** + * builder for setReturnInfoChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetReturnInfoChangeBuilder setReturnInfoChangeBuilder() { + return com.commercetools.history.models.change.SetReturnInfoChangeBuilder.of(); + } + + /** + * builder for setReturnItemCustomLineItemCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetReturnItemCustomLineItemCustomFieldChangeBuilder setReturnItemCustomLineItemCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetReturnItemCustomLineItemCustomFieldChangeBuilder.of(); + } + + /** + * builder for setReturnItemCustomLineItemCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetReturnItemCustomLineItemCustomTypeChangeBuilder setReturnItemCustomLineItemCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetReturnItemCustomLineItemCustomTypeChangeBuilder.of(); + } + + /** + * builder for setReturnItemLineItemCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetReturnItemLineItemCustomFieldChangeBuilder setReturnItemLineItemCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetReturnItemLineItemCustomFieldChangeBuilder.of(); + } + + /** + * builder for setReturnItemLineItemCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetReturnItemLineItemCustomTypeChangeBuilder setReturnItemLineItemCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetReturnItemLineItemCustomTypeChangeBuilder.of(); + } + /** * builder for setReturnPaymentStateChange subtype * @return builder @@ -2048,6 +2400,38 @@ public static com.commercetools.history.models.change.SetShippingAddressChangeBu return com.commercetools.history.models.change.SetShippingAddressChangeBuilder.of(); } + /** + * builder for setShippingAddressCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetShippingAddressCustomFieldChangeBuilder setShippingAddressCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetShippingAddressCustomFieldChangeBuilder.of(); + } + + /** + * builder for setShippingAddressCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetShippingAddressCustomTypeChangeBuilder setShippingAddressCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetShippingAddressCustomTypeChangeBuilder.of(); + } + + /** + * builder for setShippingCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetShippingCustomFieldChangeBuilder setShippingCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetShippingCustomFieldChangeBuilder.of(); + } + + /** + * builder for setShippingCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetShippingCustomTypeChangeBuilder setShippingCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetShippingCustomTypeChangeBuilder.of(); + } + /** * builder for setShippingInfoPriceChange subtype * @return builder @@ -2256,6 +2640,22 @@ public static com.commercetools.history.models.change.SetTitleChangeBuilder setT return com.commercetools.history.models.change.SetTitleChangeBuilder.of(); } + /** + * builder for setTransactionCustomFieldChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetTransactionCustomFieldChangeBuilder setTransactionCustomFieldChangeBuilder() { + return com.commercetools.history.models.change.SetTransactionCustomFieldChangeBuilder.of(); + } + + /** + * builder for setTransactionCustomTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetTransactionCustomTypeChangeBuilder setTransactionCustomTypeChangeBuilder() { + return com.commercetools.history.models.change.SetTransactionCustomTypeChangeBuilder.of(); + } + /** * builder for setTransitionsChange subtype * @return builder @@ -2264,6 +2664,14 @@ public static com.commercetools.history.models.change.SetTransitionsChangeBuilde return com.commercetools.history.models.change.SetTransitionsChangeBuilder.of(); } + /** + * builder for setUnitTypeChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetUnitTypeChangeBuilder setUnitTypeChangeBuilder() { + return com.commercetools.history.models.change.SetUnitTypeChangeBuilder.of(); + } + /** * builder for setValidFromAndUntilChange subtype * @return builder @@ -2312,6 +2720,14 @@ public static com.commercetools.history.models.change.SetVariantAvailabilityChan return com.commercetools.history.models.change.SetVariantAvailabilityChangeBuilder.of(); } + /** + * builder for setVariantExclusionChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.SetVariantExclusionChangeBuilder setVariantExclusionChangeBuilder() { + return com.commercetools.history.models.change.SetVariantExclusionChangeBuilder.of(); + } + /** * builder for setVariantSelectionChange subtype * @return builder @@ -2368,6 +2784,14 @@ public static com.commercetools.history.models.change.UnpublishChangeBuilder unp return com.commercetools.history.models.change.UnpublishChangeBuilder.of(); } + /** + * builder for updateItemShippingAddressChange subtype + * @return builder + */ + public static com.commercetools.history.models.change.UpdateItemShippingAddressChangeBuilder updateItemShippingAddressChangeBuilder() { + return com.commercetools.history.models.change.UpdateItemShippingAddressChangeBuilder.of(); + } + /** * builder for updateSyncInfoChange subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChange.java index b76864d86dd..06f939925cd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                  Change triggered automatically due to a user-initiated change.

                                  + *

                                  This change is initiated by background processes after the Change AmountPlanned update action is performed.

                                  * *
                                  * Example to create an instance using the builder pattern @@ -34,6 +34,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("ChangeAmountAuthorizedChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = ChangeAmountAuthorizedChangeImpl.class) +@Deprecated public interface ChangeAmountAuthorizedChange extends Change { /** diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeBuilder.java index ebc7efda419..0193ed89384 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeBuilder.java @@ -22,6 +22,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class ChangeAmountAuthorizedChangeBuilder implements Builder { private String change; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeImpl.java index 5cc0e418bfd..19499fded46 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAmountAuthorizedChangeImpl.java @@ -17,9 +17,10 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                  Change triggered automatically due to a user-initiated change.

                                  + *

                                  This change is initiated by background processes after the Change AmountPlanned update action is performed.

                                  */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class ChangeAmountAuthorizedChangeImpl implements ChangeAmountAuthorizedChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChange.java new file mode 100644 index 00000000000..4ddf3b883ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChange.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 com.commercetools.history.models.common.BusinessUnitApprovalRuleMode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                  Change triggered by the Change Approval Rule Mode update action.

                                  + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeApprovalRuleModeChange changeApprovalRuleModeChange = ChangeApprovalRuleModeChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(BusinessUnitApprovalRuleMode.EXPLICIT)
                                  + *             .nextValue(BusinessUnitApprovalRuleMode.EXPLICIT)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeApprovalRuleModeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeApprovalRuleModeChangeImpl.class) +public interface ChangeApprovalRuleModeChange extends Change { + + /** + * discriminator value for ChangeApprovalRuleModeChange + */ + String CHANGE_APPROVAL_RULE_MODE_CHANGE = "ChangeApprovalRuleModeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public BusinessUnitApprovalRuleMode 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 BusinessUnitApprovalRuleMode previousValue); + + /** + *

                                  Value after the change.

                                  + * @param nextValue value to be set + */ + + public void setNextValue(final BusinessUnitApprovalRuleMode nextValue); + + /** + * factory method + * @return instance of ChangeApprovalRuleModeChange + */ + public static ChangeApprovalRuleModeChange of() { + return new ChangeApprovalRuleModeChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeApprovalRuleModeChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeApprovalRuleModeChange of(final ChangeApprovalRuleModeChange template) { + ChangeApprovalRuleModeChangeImpl instance = new ChangeApprovalRuleModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeApprovalRuleModeChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeApprovalRuleModeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeApprovalRuleModeChange deepCopy(@Nullable final ChangeApprovalRuleModeChange template) { + if (template == null) { + return null; + } + ChangeApprovalRuleModeChangeImpl instance = new ChangeApprovalRuleModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeApprovalRuleModeChange + * @return builder + */ + public static ChangeApprovalRuleModeChangeBuilder builder() { + return ChangeApprovalRuleModeChangeBuilder.of(); + } + + /** + * create builder for ChangeApprovalRuleModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeApprovalRuleModeChangeBuilder builder(final ChangeApprovalRuleModeChange template) { + return ChangeApprovalRuleModeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeApprovalRuleModeChange(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/ChangeApprovalRuleModeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeBuilder.java new file mode 100644 index 00000000000..6b7c93f7712 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeBuilder.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; + +/** + * ChangeApprovalRuleModeChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeApprovalRuleModeChange changeApprovalRuleModeChange = ChangeApprovalRuleModeChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(BusinessUnitApprovalRuleMode.EXPLICIT)
                                  + *             .nextValue(BusinessUnitApprovalRuleMode.EXPLICIT)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeApprovalRuleModeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.BusinessUnitApprovalRuleMode previousValue; + + private com.commercetools.history.models.common.BusinessUnitApprovalRuleMode nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeApprovalRuleModeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + * @param nextValue value to be set + * @return Builder + */ + + public ChangeApprovalRuleModeChangeBuilder nextValue( + final com.commercetools.history.models.common.BusinessUnitApprovalRuleMode 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.BusinessUnitApprovalRuleMode getPreviousValue() { + return this.previousValue; + } + + /** + *

                                  Value after the change.

                                  + * @return nextValue + */ + + public com.commercetools.history.models.common.BusinessUnitApprovalRuleMode getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeApprovalRuleModeChange with checking for non-null required values + * @return ChangeApprovalRuleModeChange + */ + public ChangeApprovalRuleModeChange build() { + Objects.requireNonNull(change, ChangeApprovalRuleModeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeApprovalRuleModeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeApprovalRuleModeChange.class + ": nextValue is missing"); + return new ChangeApprovalRuleModeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeApprovalRuleModeChange without checking for non-null required values + * @return ChangeApprovalRuleModeChange + */ + public ChangeApprovalRuleModeChange buildUnchecked() { + return new ChangeApprovalRuleModeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeApprovalRuleModeChangeBuilder + * @return builder + */ + public static ChangeApprovalRuleModeChangeBuilder of() { + return new ChangeApprovalRuleModeChangeBuilder(); + } + + /** + * create builder for ChangeApprovalRuleModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeApprovalRuleModeChangeBuilder of(final ChangeApprovalRuleModeChange template) { + ChangeApprovalRuleModeChangeBuilder builder = new ChangeApprovalRuleModeChangeBuilder(); + 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/ChangeApprovalRuleModeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeImpl.java new file mode 100644 index 00000000000..30edbac2775 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeImpl.java @@ -0,0 +1,141 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  Change triggered by the Change Approval Rule Mode update action.

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

                                  Value before the change.

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

                                  Value after the change.

                                  + */ + + public com.commercetools.history.models.common.BusinessUnitApprovalRuleMode getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue( + final com.commercetools.history.models.common.BusinessUnitApprovalRuleMode previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.BusinessUnitApprovalRuleMode nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeApprovalRuleModeChangeImpl that = (ChangeApprovalRuleModeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeApprovalRuleModeChange copyDeep() { + return ChangeApprovalRuleModeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChange.java index c57ef6b0f28..000cc480116 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChange.java @@ -33,6 +33,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -90,6 +92,27 @@ public interface ChangeAssetNameChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                  Product data that was updated.

                                  + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -118,6 +141,25 @@ public interface ChangeAssetNameChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                  Product data that was updated.

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

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of ChangeAssetNameChange @@ -137,6 +179,8 @@ public static ChangeAssetNameChange of(final ChangeAssetNameChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -159,6 +203,8 @@ public static ChangeAssetNameChange deepCopy(@Nullable final ChangeAssetNameChan instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeBuilder.java index fb38e36e412..857d461dcfb 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class ChangeAssetNameChangeBuilder implements BuilderProduct data that was updated.

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

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @param variant value to be set + * @return Builder + */ + + public ChangeAssetNameChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -188,6 +221,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                  Product data that was updated.

                                  + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds ChangeAssetNameChange with checking for non-null required values * @return ChangeAssetNameChange @@ -197,7 +253,9 @@ public ChangeAssetNameChange build() { Objects.requireNonNull(previousValue, ChangeAssetNameChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeAssetNameChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, ChangeAssetNameChange.class + ": asset is missing"); - return new ChangeAssetNameChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, ChangeAssetNameChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, ChangeAssetNameChange.class + ": variant is missing"); + return new ChangeAssetNameChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -205,7 +263,7 @@ public ChangeAssetNameChange build() { * @return ChangeAssetNameChange */ public ChangeAssetNameChange buildUnchecked() { - return new ChangeAssetNameChangeImpl(change, previousValue, nextValue, asset); + return new ChangeAssetNameChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -227,6 +285,8 @@ public static ChangeAssetNameChangeBuilder of(final ChangeAssetNameChange templa builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeImpl.java index 46505a2a5e7..ea723524d11 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeImpl.java @@ -36,6 +36,10 @@ public class ChangeAssetNameChangeImpl implements ChangeAssetNameChange, ModelBa private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class ChangeAssetNameChangeImpl implements ChangeAssetNameChange, ModelBa ChangeAssetNameChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = CHANGE_ASSET_NAME_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                  Product data that was updated.

                                  + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +142,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +165,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -144,6 +184,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -154,6 +196,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChange.java index b76062e3387..192e26b3572 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChange.java @@ -32,6 +32,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -80,6 +82,27 @@ public interface ChangeAssetOrderChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                  Product data that was updated.

                                  + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -117,6 +140,25 @@ public interface ChangeAssetOrderChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                  Product data that was updated.

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

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of ChangeAssetOrderChange @@ -135,6 +177,8 @@ public static ChangeAssetOrderChange of(final ChangeAssetOrderChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -162,6 +206,8 @@ public static ChangeAssetOrderChange deepCopy(@Nullable final ChangeAssetOrderCh .map(com.commercetools.history.models.common.LocalizedString::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeBuilder.java index ddae710b14f..63b6376a691 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -30,6 +32,10 @@ public class ChangeAssetOrderChangeBuilder implements Builder nextValue; + private String catalogData; + + private String variant; + /** * set the value to the change * @param change value to be set @@ -221,6 +227,33 @@ public ChangeAssetOrderChangeBuilder setNextValue( return nextValue(builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of())); } + /** + *

                                  Product data that was updated.

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

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @param variant value to be set + * @return Builder + */ + + public ChangeAssetOrderChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -248,6 +281,29 @@ public java.util.List g return this.nextValue; } + /** + *

                                  Product data that was updated.

                                  + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds ChangeAssetOrderChange with checking for non-null required values * @return ChangeAssetOrderChange @@ -256,7 +312,9 @@ public ChangeAssetOrderChange build() { Objects.requireNonNull(change, ChangeAssetOrderChange.class + ": change is missing"); Objects.requireNonNull(previousValue, ChangeAssetOrderChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeAssetOrderChange.class + ": nextValue is missing"); - return new ChangeAssetOrderChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, ChangeAssetOrderChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, ChangeAssetOrderChange.class + ": variant is missing"); + return new ChangeAssetOrderChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -264,7 +322,7 @@ public ChangeAssetOrderChange build() { * @return ChangeAssetOrderChange */ public ChangeAssetOrderChange buildUnchecked() { - return new ChangeAssetOrderChangeImpl(change, previousValue, nextValue); + return new ChangeAssetOrderChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -285,6 +343,8 @@ public static ChangeAssetOrderChangeBuilder of(final ChangeAssetOrderChange temp builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeImpl.java index 456bdff948d..b928d062b09 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeImpl.java @@ -34,16 +34,23 @@ public class ChangeAssetOrderChangeImpl implements ChangeAssetOrderChange, Model private java.util.List nextValue; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @JsonCreator ChangeAssetOrderChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; + this.variant = variant; this.type = CHANGE_ASSET_ORDER_CHANGE; } @@ -86,6 +93,27 @@ public java.util.List g return this.nextValue; } + /** + *

                                  Product data that was updated.

                                  + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                  Identifier of the updated Product Variant.

                                  + *

                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                  + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -107,6 +135,14 @@ public void setNextValue(final java.util.List previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface ChangeCartDiscountsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                  Elements added to the array.

                                  + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                  Elements removed from the array.

                                  + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface ChangeCartDiscountsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                  Elements added to the array.

                                  + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reference... addedItems); + + /** + *

                                  Elements added to the array.

                                  + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reference... removedItems); + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of ChangeCartDiscountsChange @@ -131,6 +181,8 @@ public static ChangeCartDiscountsChange of(final ChangeCartDiscountsChange templ instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static ChangeCartDiscountsChange deepCopy(@Nullable final ChangeCartDisco .map(com.commercetools.history.models.common.Reference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeBuilder.java index b26e624c998..aacc4fb4912 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class ChangeCartDiscountsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -87,7 +93,7 @@ public ChangeCartDiscountsChangeBuilder plusPreviousValue( */ public ChangeCartDiscountsChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -102,34 +108,12 @@ public ChangeCartDiscountsChangeBuilder plusPreviousValue( */ public ChangeCartDiscountsChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                  Value before the change.

                                  - * @param builder function to build the previousValue value - * @return Builder - */ - - public ChangeCartDiscountsChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                  Value before the change.

                                  - * @param builder function to build the previousValue value - * @return Builder - */ - - public ChangeCartDiscountsChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                  Value after the change.

                                  * @param nextValue value to be set @@ -176,7 +160,7 @@ public ChangeCartDiscountsChangeBuilder plusNextValue( */ public ChangeCartDiscountsChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -191,32 +175,144 @@ public ChangeCartDiscountsChangeBuilder plusNextValue( */ public ChangeCartDiscountsChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } /** - *

                                  Value after the change.

                                  - * @param builder function to build the nextValue value + *

                                  Elements added to the array.

                                  + * @param addedItems value to be set * @return Builder */ - public ChangeCartDiscountsChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public ChangeCartDiscountsChangeBuilder addedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; } /** - *

                                  Value after the change.

                                  - * @param builder function to build the nextValue value + *

                                  Elements added to the array.

                                  + * @param addedItems value to be set + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                  Elements added to the array.

                                  + * @param addedItems value to be set + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                  Elements added to the array.

                                  + * @param builder function to build the addedItems value + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                  Elements added to the array.

                                  + * @param builder function to build the addedItems value + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems value to be set + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems value to be set + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems value to be set * @return Builder */ - public ChangeCartDiscountsChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public ChangeCartDiscountsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param builder function to build the removedItems value + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param builder function to build the removedItems value + * @return Builder + */ + + public ChangeCartDiscountsChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; } /** @@ -246,6 +342,24 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                  Elements added to the array.

                                  + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                  Elements removed from the array.

                                  + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds ChangeCartDiscountsChange with checking for non-null required values * @return ChangeCartDiscountsChange @@ -254,7 +368,9 @@ public ChangeCartDiscountsChange build() { Objects.requireNonNull(change, ChangeCartDiscountsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, ChangeCartDiscountsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeCartDiscountsChange.class + ": nextValue is missing"); - return new ChangeCartDiscountsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, ChangeCartDiscountsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, ChangeCartDiscountsChange.class + ": removedItems is missing"); + return new ChangeCartDiscountsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -262,7 +378,7 @@ public ChangeCartDiscountsChange build() { * @return ChangeCartDiscountsChange */ public ChangeCartDiscountsChange buildUnchecked() { - return new ChangeCartDiscountsChangeImpl(change, previousValue, nextValue); + return new ChangeCartDiscountsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -283,6 +399,8 @@ public static ChangeCartDiscountsChangeBuilder of(final ChangeCartDiscountsChang builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeImpl.java index 0ee25c610c2..202332d20dd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeImpl.java @@ -30,16 +30,24 @@ public class ChangeCartDiscountsChangeImpl implements ChangeCartDiscountsChange, private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator ChangeCartDiscountsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = CHANGE_CART_DISCOUNTS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                  Elements added to the array.

                                  + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                  Elements removed from the array.

                                  + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,22 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +157,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +174,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +185,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChange.java new file mode 100644 index 00000000000..62f9df36da0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChange.java @@ -0,0 +1,183 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                  Change triggered by the following update actions:

                                  + * + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeCustomerChange changeCustomerChange = ChangeCustomerChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                  + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeCustomerChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeCustomerChangeImpl.class) +public interface ChangeCustomerChange extends Change { + + /** + * discriminator value for ChangeCustomerChange + */ + String CHANGE_CUSTOMER_CHANGE = "ChangeCustomerChange"; + + /** + * + * @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 Reference getPreviousValue(); + + /** + *

                                  Value after the change.

                                  + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public Reference 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 Reference previousValue); + + /** + *

                                  Value after the change.

                                  + * @param nextValue value to be set + */ + + public void setNextValue(final Reference nextValue); + + /** + * factory method + * @return instance of ChangeCustomerChange + */ + public static ChangeCustomerChange of() { + return new ChangeCustomerChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeCustomerChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeCustomerChange of(final ChangeCustomerChange template) { + ChangeCustomerChangeImpl instance = new ChangeCustomerChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeCustomerChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeCustomerChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeCustomerChange deepCopy(@Nullable final ChangeCustomerChange template) { + if (template == null) { + return null; + } + ChangeCustomerChangeImpl instance = new ChangeCustomerChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.Reference.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.Reference.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ChangeCustomerChange + * @return builder + */ + public static ChangeCustomerChangeBuilder builder() { + return ChangeCustomerChangeBuilder.of(); + } + + /** + * create builder for ChangeCustomerChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeCustomerChangeBuilder builder(final ChangeCustomerChange template) { + return ChangeCustomerChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeCustomerChange(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/ChangeCustomerChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeBuilder.java new file mode 100644 index 00000000000..52294990e3b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeBuilder.java @@ -0,0 +1,158 @@ + +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; + +/** + * ChangeCustomerChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeCustomerChange changeCustomerChange = ChangeCustomerChange.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 ChangeCustomerChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Reference previousValue; + + private com.commercetools.history.models.common.Reference nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeCustomerChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value before the change.

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

                                  Value after the change.

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

                                  Value after the change.

                                  + * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeCustomerChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + 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.Reference getPreviousValue() { + return this.previousValue; + } + + /** + *

                                  Value after the change.

                                  + * @return nextValue + */ + + public com.commercetools.history.models.common.Reference getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeCustomerChange with checking for non-null required values + * @return ChangeCustomerChange + */ + public ChangeCustomerChange build() { + Objects.requireNonNull(change, ChangeCustomerChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeCustomerChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeCustomerChange.class + ": nextValue is missing"); + return new ChangeCustomerChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeCustomerChange without checking for non-null required values + * @return ChangeCustomerChange + */ + public ChangeCustomerChange buildUnchecked() { + return new ChangeCustomerChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeCustomerChangeBuilder + * @return builder + */ + public static ChangeCustomerChangeBuilder of() { + return new ChangeCustomerChangeBuilder(); + } + + /** + * create builder for ChangeCustomerChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeCustomerChangeBuilder of(final ChangeCustomerChange template) { + ChangeCustomerChangeBuilder builder = new ChangeCustomerChangeBuilder(); + 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/ChangeCustomerChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeImpl.java new file mode 100644 index 00000000000..f3876fe23c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeImpl.java @@ -0,0 +1,144 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  Change triggered by the following update actions:

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

                                  Value before the change.

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

                                  Value after the change.

                                  + */ + + public com.commercetools.history.models.common.Reference getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeCustomerChangeImpl that = (ChangeCustomerChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeCustomerChange copyDeep() { + return ChangeCustomerChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChange.java index 2d7db53169b..183f3dcc30b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChange.java @@ -27,6 +27,7 @@ * .nextValue("{nextValue}") * .fieldName("{fieldName}") * .valueKey("{valueKey}") + * .attributeName("{attributeName}") * .build() * * @@ -89,6 +90,14 @@ public interface ChangeEnumValueLabelChange extends Change { @JsonProperty("valueKey") public String getValueKey(); + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @return attributeName + */ + @NotNull + @JsonProperty("attributeName") + public String getAttributeName(); + /** * set change * @param change value to be set @@ -124,6 +133,13 @@ public interface ChangeEnumValueLabelChange extends Change { public void setValueKey(final String valueKey); + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @param attributeName value to be set + */ + + public void setAttributeName(final String attributeName); + /** * factory method * @return instance of ChangeEnumValueLabelChange @@ -144,6 +160,7 @@ public static ChangeEnumValueLabelChange of(final ChangeEnumValueLabelChange tem instance.setNextValue(template.getNextValue()); instance.setFieldName(template.getFieldName()); instance.setValueKey(template.getValueKey()); + instance.setAttributeName(template.getAttributeName()); return instance; } @@ -165,6 +182,7 @@ public static ChangeEnumValueLabelChange deepCopy(@Nullable final ChangeEnumValu instance.setNextValue(template.getNextValue()); instance.setFieldName(template.getFieldName()); instance.setValueKey(template.getValueKey()); + instance.setAttributeName(template.getAttributeName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeBuilder.java index d89edb6993a..120e762ce39 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeBuilder.java @@ -18,6 +18,7 @@ * .nextValue("{nextValue}") * .fieldName("{fieldName}") * .valueKey("{valueKey}") + * .attributeName("{attributeName}") * .build() * * @@ -35,6 +36,8 @@ public class ChangeEnumValueLabelChangeBuilder implements BuilderName of the updated AttributeDefinition.

                                  + * @param attributeName value to be set + * @return Builder + */ + + public ChangeEnumValueLabelChangeBuilder attributeName(final String attributeName) { + this.attributeName = attributeName; + return this; + } + /** * value of change} * @return change @@ -135,6 +149,15 @@ public String getValueKey() { return this.valueKey; } + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @return attributeName + */ + + public String getAttributeName() { + return this.attributeName; + } + /** * builds ChangeEnumValueLabelChange with checking for non-null required values * @return ChangeEnumValueLabelChange @@ -145,7 +168,8 @@ public ChangeEnumValueLabelChange build() { Objects.requireNonNull(nextValue, ChangeEnumValueLabelChange.class + ": nextValue is missing"); Objects.requireNonNull(fieldName, ChangeEnumValueLabelChange.class + ": fieldName is missing"); Objects.requireNonNull(valueKey, ChangeEnumValueLabelChange.class + ": valueKey is missing"); - return new ChangeEnumValueLabelChangeImpl(change, previousValue, nextValue, fieldName, valueKey); + Objects.requireNonNull(attributeName, ChangeEnumValueLabelChange.class + ": attributeName is missing"); + return new ChangeEnumValueLabelChangeImpl(change, previousValue, nextValue, fieldName, valueKey, attributeName); } /** @@ -153,7 +177,7 @@ public ChangeEnumValueLabelChange build() { * @return ChangeEnumValueLabelChange */ public ChangeEnumValueLabelChange buildUnchecked() { - return new ChangeEnumValueLabelChangeImpl(change, previousValue, nextValue, fieldName, valueKey); + return new ChangeEnumValueLabelChangeImpl(change, previousValue, nextValue, fieldName, valueKey, attributeName); } /** @@ -176,6 +200,7 @@ public static ChangeEnumValueLabelChangeBuilder of(final ChangeEnumValueLabelCha builder.nextValue = template.getNextValue(); builder.fieldName = template.getFieldName(); builder.valueKey = template.getValueKey(); + builder.attributeName = template.getAttributeName(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeImpl.java index 3cafc17767a..fa770a95cce 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeImpl.java @@ -34,6 +34,8 @@ public class ChangeEnumValueLabelChangeImpl implements ChangeEnumValueLabelChang private String valueKey; + private String attributeName; + /** * create instance with all properties */ @@ -41,12 +43,14 @@ public class ChangeEnumValueLabelChangeImpl implements ChangeEnumValueLabelChang ChangeEnumValueLabelChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final String previousValue, @JsonProperty("nextValue") final String nextValue, @JsonProperty("fieldName") final String fieldName, - @JsonProperty("valueKey") final String valueKey) { + @JsonProperty("valueKey") final String valueKey, + @JsonProperty("attributeName") final String attributeName) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.fieldName = fieldName; this.valueKey = valueKey; + this.attributeName = attributeName; this.type = CHANGE_ENUM_VALUE_LABEL_CHANGE; } @@ -105,6 +109,14 @@ public String getValueKey() { return this.valueKey; } + /** + *

                                  Name of the updated AttributeDefinition.

                                  + */ + + public String getAttributeName() { + return this.attributeName; + } + public void setChange(final String change) { this.change = change; } @@ -125,6 +137,10 @@ public void setValueKey(final String valueKey) { this.valueKey = valueKey; } + public void setAttributeName(final String attributeName) { + this.attributeName = attributeName; + } + @Override public boolean equals(Object o) { if (this == o) @@ -141,12 +157,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) .append(valueKey, that.valueKey) + .append(attributeName, that.attributeName) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) .append(valueKey, that.valueKey) + .append(attributeName, that.attributeName) .isEquals(); } @@ -158,6 +176,7 @@ public int hashCode() { .append(nextValue) .append(fieldName) .append(valueKey) + .append(attributeName) .toHashCode(); } @@ -169,6 +188,7 @@ public String toString() { .append("nextValue", nextValue) .append("fieldName", fieldName) .append("valueKey", valueKey) + .append("attributeName", attributeName) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChange.java index f927a829f24..65a20c4df30 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChange.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.EnumValue; +import com.commercetools.history.models.common.CustomFieldEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .fieldName("{fieldName}") + * .attributeName("{attributeName}") * .build() * * @@ -66,7 +67,7 @@ public interface ChangeEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public List getPreviousValue(); + public List getPreviousValue(); /** *

                                  Value after the change.

                                  @@ -75,7 +76,7 @@ public interface ChangeEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public List getNextValue(); + public List getNextValue(); /** *

                                  Name of the updated FieldDefinition.

                                  @@ -85,6 +86,14 @@ public interface ChangeEnumValueOrderChange extends Change { @JsonProperty("fieldName") public String getFieldName(); + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @return attributeName + */ + @NotNull + @JsonProperty("attributeName") + public String getAttributeName(); + /** * set change * @param change value to be set @@ -98,14 +107,14 @@ public interface ChangeEnumValueOrderChange extends Change { */ @JsonIgnore - public void setPreviousValue(final EnumValue... previousValue); + public void setPreviousValue(final CustomFieldEnumValue... previousValue); /** *

                                  Value before the change.

                                  * @param previousValue values to be set */ - public void setPreviousValue(final List previousValue); + public void setPreviousValue(final List previousValue); /** *

                                  Value after the change.

                                  @@ -113,14 +122,14 @@ public interface ChangeEnumValueOrderChange extends Change { */ @JsonIgnore - public void setNextValue(final EnumValue... nextValue); + public void setNextValue(final CustomFieldEnumValue... nextValue); /** *

                                  Value after the change.

                                  * @param nextValue values to be set */ - public void setNextValue(final List nextValue); + public void setNextValue(final List nextValue); /** *

                                  Name of the updated FieldDefinition.

                                  @@ -129,6 +138,13 @@ public interface ChangeEnumValueOrderChange extends Change { public void setFieldName(final String fieldName); + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @param attributeName value to be set + */ + + public void setAttributeName(final String attributeName); + /** * factory method * @return instance of ChangeEnumValueOrderChange @@ -148,6 +164,7 @@ public static ChangeEnumValueOrderChange of(final ChangeEnumValueOrderChange tem instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setFieldName(template.getFieldName()); + instance.setAttributeName(template.getAttributeName()); return instance; } @@ -167,15 +184,16 @@ public static ChangeEnumValueOrderChange deepCopy(@Nullable final ChangeEnumValu instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.EnumValue::deepCopy) + .map(com.commercetools.history.models.common.CustomFieldEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.EnumValue::deepCopy) + .map(com.commercetools.history.models.common.CustomFieldEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setFieldName(template.getFieldName()); + instance.setAttributeName(template.getAttributeName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeBuilder.java index 78b772cabc7..3180cc10c37 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .fieldName("{fieldName}") + * .attributeName("{attributeName}") * .build() * * @@ -27,12 +28,14 @@ public class ChangeEnumValueOrderChangeBuilder implements Builder previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String fieldName; + private String attributeName; + /** * set the value to the change * @param change value to be set @@ -51,7 +54,7 @@ public ChangeEnumValueOrderChangeBuilder change(final String change) { */ public ChangeEnumValueOrderChangeBuilder previousValue( - final com.commercetools.history.models.change_value.EnumValue... previousValue) { + final com.commercetools.history.models.common.CustomFieldEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); return this; } @@ -63,7 +66,7 @@ public ChangeEnumValueOrderChangeBuilder previousValue( */ public ChangeEnumValueOrderChangeBuilder previousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; return this; } @@ -75,7 +78,7 @@ public ChangeEnumValueOrderChangeBuilder previousValue( */ public ChangeEnumValueOrderChangeBuilder plusPreviousValue( - final com.commercetools.history.models.change_value.EnumValue... previousValue) { + final com.commercetools.history.models.common.CustomFieldEnumValue... previousValue) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -90,12 +93,12 @@ public ChangeEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangeEnumValueOrderChangeBuilder plusPreviousValue( - Function builder) { + Function builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } this.previousValue - .add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + .add(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()).build()); return this; } @@ -106,10 +109,10 @@ public ChangeEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangeEnumValueOrderChangeBuilder withPreviousValue( - Function builder) { + Function builder) { this.previousValue = new ArrayList<>(); this.previousValue - .add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + .add(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()).build()); return this; } @@ -120,8 +123,9 @@ public ChangeEnumValueOrderChangeBuilder withPreviousValue( */ public ChangeEnumValueOrderChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return plusPreviousValue( + builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of())); } /** @@ -131,8 +135,8 @@ public ChangeEnumValueOrderChangeBuilder addPreviousValue( */ public ChangeEnumValueOrderChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return previousValue(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of())); } /** @@ -142,7 +146,7 @@ public ChangeEnumValueOrderChangeBuilder setPreviousValue( */ public ChangeEnumValueOrderChangeBuilder nextValue( - final com.commercetools.history.models.change_value.EnumValue... nextValue) { + final com.commercetools.history.models.common.CustomFieldEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); return this; } @@ -154,7 +158,7 @@ public ChangeEnumValueOrderChangeBuilder nextValue( */ public ChangeEnumValueOrderChangeBuilder nextValue( - final java.util.List nextValue) { + final java.util.List nextValue) { this.nextValue = nextValue; return this; } @@ -166,7 +170,7 @@ public ChangeEnumValueOrderChangeBuilder nextValue( */ public ChangeEnumValueOrderChangeBuilder plusNextValue( - final com.commercetools.history.models.change_value.EnumValue... nextValue) { + final com.commercetools.history.models.common.CustomFieldEnumValue... nextValue) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -181,11 +185,12 @@ public ChangeEnumValueOrderChangeBuilder plusNextValue( */ public ChangeEnumValueOrderChangeBuilder plusNextValue( - Function builder) { + Function builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } - this.nextValue.add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.nextValue + .add(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()).build()); return this; } @@ -196,9 +201,10 @@ public ChangeEnumValueOrderChangeBuilder plusNextValue( */ public ChangeEnumValueOrderChangeBuilder withNextValue( - Function builder) { + Function builder) { this.nextValue = new ArrayList<>(); - this.nextValue.add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.nextValue + .add(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of()).build()); return this; } @@ -209,8 +215,8 @@ public ChangeEnumValueOrderChangeBuilder withNextValue( */ public ChangeEnumValueOrderChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return plusNextValue(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of())); } /** @@ -220,8 +226,8 @@ public ChangeEnumValueOrderChangeBuilder addNextValue( */ public ChangeEnumValueOrderChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return nextValue(builder.apply(com.commercetools.history.models.common.CustomFieldEnumValueBuilder.of())); } /** @@ -235,6 +241,17 @@ public ChangeEnumValueOrderChangeBuilder fieldName(final String fieldName) { return this; } + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @param attributeName value to be set + * @return Builder + */ + + public ChangeEnumValueOrderChangeBuilder attributeName(final String attributeName) { + this.attributeName = attributeName; + return this; + } + /** * value of change} * @return change @@ -249,7 +266,7 @@ public String getChange() { * @return previousValue */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -258,7 +275,7 @@ public java.util.List g * @return nextValue */ - public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } @@ -271,6 +288,15 @@ public String getFieldName() { return this.fieldName; } + /** + *

                                  Name of the updated AttributeDefinition.

                                  + * @return attributeName + */ + + public String getAttributeName() { + return this.attributeName; + } + /** * builds ChangeEnumValueOrderChange with checking for non-null required values * @return ChangeEnumValueOrderChange @@ -280,7 +306,8 @@ public ChangeEnumValueOrderChange build() { Objects.requireNonNull(previousValue, ChangeEnumValueOrderChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeEnumValueOrderChange.class + ": nextValue is missing"); Objects.requireNonNull(fieldName, ChangeEnumValueOrderChange.class + ": fieldName is missing"); - return new ChangeEnumValueOrderChangeImpl(change, previousValue, nextValue, fieldName); + Objects.requireNonNull(attributeName, ChangeEnumValueOrderChange.class + ": attributeName is missing"); + return new ChangeEnumValueOrderChangeImpl(change, previousValue, nextValue, fieldName, attributeName); } /** @@ -288,7 +315,7 @@ public ChangeEnumValueOrderChange build() { * @return ChangeEnumValueOrderChange */ public ChangeEnumValueOrderChange buildUnchecked() { - return new ChangeEnumValueOrderChangeImpl(change, previousValue, nextValue, fieldName); + return new ChangeEnumValueOrderChangeImpl(change, previousValue, nextValue, fieldName, attributeName); } /** @@ -310,6 +337,7 @@ public static ChangeEnumValueOrderChangeBuilder of(final ChangeEnumValueOrderCha builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.fieldName = template.getFieldName(); + builder.attributeName = template.getAttributeName(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeImpl.java index 8da248b1fd8..c85d94bcc6b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeImpl.java @@ -26,24 +26,28 @@ public class ChangeEnumValueOrderChangeImpl implements ChangeEnumValueOrderChang private String change; - private java.util.List previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String fieldName; + private String attributeName; + /** * create instance with all properties */ @JsonCreator ChangeEnumValueOrderChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("fieldName") final String fieldName) { + @JsonProperty("previousValue") final java.util.List previousValue, + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("fieldName") final String fieldName, + @JsonProperty("attributeName") final String attributeName) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.fieldName = fieldName; + this.attributeName = attributeName; this.type = CHANGE_ENUM_VALUE_ORDER_CHANGE; } @@ -74,7 +78,7 @@ public String getChange() { *

                                  Value before the change.

                                  */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -82,7 +86,7 @@ public java.util.List g *

                                  Value after the change.

                                  */ - public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } @@ -94,24 +98,33 @@ public String getFieldName() { return this.fieldName; } + /** + *

                                  Name of the updated AttributeDefinition.

                                  + */ + + public String getAttributeName() { + return this.attributeName; + } + public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.change_value.EnumValue... previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.CustomFieldEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); } public void setPreviousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.change_value.EnumValue... nextValue) { + public void setNextValue(final com.commercetools.history.models.common.CustomFieldEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); } - public void setNextValue(final java.util.List nextValue) { + public void setNextValue( + final java.util.List nextValue) { this.nextValue = nextValue; } @@ -119,6 +132,10 @@ public void setFieldName(final String fieldName) { this.fieldName = fieldName; } + public void setAttributeName(final String attributeName) { + this.attributeName = attributeName; + } + @Override public boolean equals(Object o) { if (this == o) @@ -134,11 +151,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) + .append(attributeName, that.attributeName) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(fieldName, that.fieldName) + .append(attributeName, that.attributeName) .isEquals(); } @@ -149,6 +168,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(fieldName) + .append(attributeName) .toHashCode(); } @@ -159,6 +179,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("fieldName", fieldName) + .append("attributeName", attributeName) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChange.java index ba474ab7a22..0e24398ac21 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChange.java @@ -25,6 +25,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -71,6 +73,22 @@ public interface ChangeGroupsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                  Elements added to the array.

                                  + * @return addedItems + */ + @NotNull + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                  Elements removed from the array.

                                  + * @return removedItems + */ + @NotNull + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -108,6 +126,36 @@ public interface ChangeGroupsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                  Elements added to the array.

                                  + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final String... addedItems); + + /** + *

                                  Elements added to the array.

                                  + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final String... removedItems); + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of ChangeGroupsChange @@ -126,6 +174,8 @@ public static ChangeGroupsChange of(final ChangeGroupsChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -145,6 +195,8 @@ public static ChangeGroupsChange deepCopy(@Nullable final ChangeGroupsChange tem instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()).map(ArrayList::new).orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeBuilder.java index ae3b48e24f7..28de7ee068d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeBuilder.java @@ -16,6 +16,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -29,6 +31,10 @@ public class ChangeGroupsChangeBuilder implements Builder { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -112,6 +118,78 @@ public ChangeGroupsChangeBuilder plusNextValue(final String... nextValue) { return this; } + /** + *

                                  Elements added to the array.

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

                                  Elements added to the array.

                                  + * @param addedItems value to be set + * @return Builder + */ + + public ChangeGroupsChangeBuilder addedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                  Elements added to the array.

                                  + * @param addedItems value to be set + * @return Builder + */ + + public ChangeGroupsChangeBuilder plusAddedItems(final String... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                  Elements removed from the array.

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

                                  Elements removed from the array.

                                  + * @param removedItems value to be set + * @return Builder + */ + + public ChangeGroupsChangeBuilder removedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                  Elements removed from the array.

                                  + * @param removedItems value to be set + * @return Builder + */ + + public ChangeGroupsChangeBuilder plusRemovedItems(final String... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + /** * value of change} * @return change @@ -139,6 +217,24 @@ public java.util.List getNextValue() { return this.nextValue; } + /** + *

                                  Elements added to the array.

                                  + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                  Elements removed from the array.

                                  + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds ChangeGroupsChange with checking for non-null required values * @return ChangeGroupsChange @@ -147,7 +243,9 @@ public ChangeGroupsChange build() { Objects.requireNonNull(change, ChangeGroupsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, ChangeGroupsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeGroupsChange.class + ": nextValue is missing"); - return new ChangeGroupsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, ChangeGroupsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, ChangeGroupsChange.class + ": removedItems is missing"); + return new ChangeGroupsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -155,7 +253,7 @@ public ChangeGroupsChange build() { * @return ChangeGroupsChange */ public ChangeGroupsChange buildUnchecked() { - return new ChangeGroupsChangeImpl(change, previousValue, nextValue); + return new ChangeGroupsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -176,6 +274,8 @@ public static ChangeGroupsChangeBuilder of(final ChangeGroupsChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeImpl.java index 465699367ba..531f51e74ea 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeImpl.java @@ -30,16 +30,24 @@ public class ChangeGroupsChangeImpl implements ChangeGroupsChange, ModelBase { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator ChangeGroupsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = CHANGE_GROUPS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNextValue() { return this.nextValue; } + /** + *

                                  Elements added to the array.

                                  + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                  Elements removed from the array.

                                  + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -102,6 +126,22 @@ public void setNextValue(final java.util.List nextValue) { this.nextValue = nextValue; } + public void setAddedItems(final String... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final String... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -116,10 +156,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -129,6 +173,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -138,6 +184,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChange.java new file mode 100644 index 00000000000..dcd943e9239 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChange.java @@ -0,0 +1,174 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                  This change is initiated by background processes after the Transition State update action is performed.

                                  + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeIncludedInStatisticsChange changeIncludedInStatisticsChange = ChangeIncludedInStatisticsChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(true)
                                  + *             .nextValue(true)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeIncludedInStatisticsChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeIncludedInStatisticsChangeImpl.class) +public interface ChangeIncludedInStatisticsChange extends Change { + + /** + * discriminator value for ChangeIncludedInStatisticsChange + */ + String CHANGE_INCLUDED_IN_STATISTICS_CHANGE = "ChangeIncludedInStatisticsChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                  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); + + /** + *

                                  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 ChangeIncludedInStatisticsChange + */ + public static ChangeIncludedInStatisticsChange of() { + return new ChangeIncludedInStatisticsChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeIncludedInStatisticsChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeIncludedInStatisticsChange of(final ChangeIncludedInStatisticsChange template) { + ChangeIncludedInStatisticsChangeImpl instance = new ChangeIncludedInStatisticsChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeIncludedInStatisticsChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeIncludedInStatisticsChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeIncludedInStatisticsChange deepCopy(@Nullable final ChangeIncludedInStatisticsChange template) { + if (template == null) { + return null; + } + ChangeIncludedInStatisticsChangeImpl instance = new ChangeIncludedInStatisticsChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeIncludedInStatisticsChange + * @return builder + */ + public static ChangeIncludedInStatisticsChangeBuilder builder() { + return ChangeIncludedInStatisticsChangeBuilder.of(); + } + + /** + * create builder for ChangeIncludedInStatisticsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeIncludedInStatisticsChangeBuilder builder(final ChangeIncludedInStatisticsChange template) { + return ChangeIncludedInStatisticsChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeIncludedInStatisticsChange(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/ChangeIncludedInStatisticsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeBuilder.java new file mode 100644 index 00000000000..016a06b7518 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeBuilder.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; + +/** + * ChangeIncludedInStatisticsChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeIncludedInStatisticsChange changeIncludedInStatisticsChange = ChangeIncludedInStatisticsChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(true)
                                  + *             .nextValue(true)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeIncludedInStatisticsChangeBuilder implements Builder { + + private String change; + + private Boolean previousValue; + + private Boolean nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeIncludedInStatisticsChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

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

                                  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 ChangeIncludedInStatisticsChange with checking for non-null required values + * @return ChangeIncludedInStatisticsChange + */ + public ChangeIncludedInStatisticsChange build() { + Objects.requireNonNull(change, ChangeIncludedInStatisticsChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeIncludedInStatisticsChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeIncludedInStatisticsChange.class + ": nextValue is missing"); + return new ChangeIncludedInStatisticsChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeIncludedInStatisticsChange without checking for non-null required values + * @return ChangeIncludedInStatisticsChange + */ + public ChangeIncludedInStatisticsChange buildUnchecked() { + return new ChangeIncludedInStatisticsChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeIncludedInStatisticsChangeBuilder + * @return builder + */ + public static ChangeIncludedInStatisticsChangeBuilder of() { + return new ChangeIncludedInStatisticsChangeBuilder(); + } + + /** + * create builder for ChangeIncludedInStatisticsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeIncludedInStatisticsChangeBuilder of(final ChangeIncludedInStatisticsChange template) { + ChangeIncludedInStatisticsChangeBuilder builder = new ChangeIncludedInStatisticsChangeBuilder(); + 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/ChangeIncludedInStatisticsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeImpl.java new file mode 100644 index 00000000000..eafa02375a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  This change is initiated by background processes after the Transition State update action is performed.

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

                                  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 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; + + ChangeIncludedInStatisticsChangeImpl that = (ChangeIncludedInStatisticsChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeIncludedInStatisticsChange copyDeep() { + return ChangeIncludedInStatisticsChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChange.java index 2df744562d4..b82b39502c4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.TextInputHint; +import com.commercetools.history.models.common.TypeTextInputHint; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -28,8 +28,8 @@ *
                                  
                                    *     ChangeInputHintChange changeInputHintChange = ChangeInputHintChange.builder()
                                    *             .change("{change}")
                                  - *             .previousValue(TextInputHint.SINGLE_LINE)
                                  - *             .nextValue(TextInputHint.SINGLE_LINE)
                                  + *             .previousValue(TypeTextInputHint.SINGLE_LINE)
                                  + *             .nextValue(TypeTextInputHint.SINGLE_LINE)
                                    *             .fieldName("{fieldName}")
                                    *             .attributeName("{attributeName}")
                                    *             .build()
                                  @@ -68,7 +68,7 @@ public interface ChangeInputHintChange extends Change {
                                        */
                                       @NotNull
                                       @JsonProperty("previousValue")
                                  -    public TextInputHint getPreviousValue();
                                  +    public TypeTextInputHint getPreviousValue();
                                   
                                       /**
                                        *  

                                  Value after the change.

                                  @@ -76,7 +76,7 @@ public interface ChangeInputHintChange extends Change { */ @NotNull @JsonProperty("nextValue") - public TextInputHint getNextValue(); + public TypeTextInputHint getNextValue(); /** *

                                  Name of the updated FieldDefinition; only present on changes to Types.

                                  @@ -106,14 +106,14 @@ public interface ChangeInputHintChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final TextInputHint previousValue); + public void setPreviousValue(final TypeTextInputHint previousValue); /** *

                                  Value after the change.

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

                                  Name of the updated FieldDefinition; only present on changes to Types.

                                  diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeBuilder.java index 2d701e4ea21..e4ce5e4ef92 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeBuilder.java @@ -14,8 +14,8 @@ *
                                  
                                    *     ChangeInputHintChange changeInputHintChange = ChangeInputHintChange.builder()
                                    *             .change("{change}")
                                  - *             .previousValue(TextInputHint.SINGLE_LINE)
                                  - *             .nextValue(TextInputHint.SINGLE_LINE)
                                  + *             .previousValue(TypeTextInputHint.SINGLE_LINE)
                                  + *             .nextValue(TypeTextInputHint.SINGLE_LINE)
                                    *             .fieldName("{fieldName}")
                                    *             .attributeName("{attributeName}")
                                    *             .build()
                                  @@ -27,9 +27,9 @@ public class ChangeInputHintChangeBuilder implements BuilderValue before the change.

                                  */ - public com.commercetools.history.models.common.TextInputHint getPreviousValue() { + public com.commercetools.history.models.common.TypeTextInputHint getPreviousValue() { return this.previousValue; } @@ -90,7 +90,7 @@ public com.commercetools.history.models.common.TextInputHint getPreviousValue() *

                                  Value after the change.

                                  */ - public com.commercetools.history.models.common.TextInputHint getNextValue() { + public com.commercetools.history.models.common.TypeTextInputHint getNextValue() { return this.nextValue; } @@ -114,11 +114,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.TextInputHint previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.TypeTextInputHint previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.TextInputHint nextValue) { + public void setNextValue(final com.commercetools.history.models.common.TypeTextInputHint nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChange.java new file mode 100644 index 00000000000..61a4c6f9798 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChange.java @@ -0,0 +1,174 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                  This change is initiated by background processes after the Add ProductVariant update action is performed.

                                  + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLastVariantIdChange changeLastVariantIdChange = ChangeLastVariantIdChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(1)
                                  + *             .nextValue(1)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeLastVariantIdChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeLastVariantIdChangeImpl.class) +public interface ChangeLastVariantIdChange extends Change { + + /** + * discriminator value for ChangeLastVariantIdChange + */ + String CHANGE_LAST_VARIANT_ID_CHANGE = "ChangeLastVariantIdChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public Integer 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 Integer previousValue); + + /** + *

                                  Value after the change.

                                  + * @param nextValue value to be set + */ + + public void setNextValue(final Integer nextValue); + + /** + * factory method + * @return instance of ChangeLastVariantIdChange + */ + public static ChangeLastVariantIdChange of() { + return new ChangeLastVariantIdChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeLastVariantIdChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeLastVariantIdChange of(final ChangeLastVariantIdChange template) { + ChangeLastVariantIdChangeImpl instance = new ChangeLastVariantIdChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeLastVariantIdChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeLastVariantIdChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeLastVariantIdChange deepCopy(@Nullable final ChangeLastVariantIdChange template) { + if (template == null) { + return null; + } + ChangeLastVariantIdChangeImpl instance = new ChangeLastVariantIdChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeLastVariantIdChange + * @return builder + */ + public static ChangeLastVariantIdChangeBuilder builder() { + return ChangeLastVariantIdChangeBuilder.of(); + } + + /** + * create builder for ChangeLastVariantIdChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLastVariantIdChangeBuilder builder(final ChangeLastVariantIdChange template) { + return ChangeLastVariantIdChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeLastVariantIdChange(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/ChangeLastVariantIdChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeBuilder.java new file mode 100644 index 00000000000..95a7de1fddb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeBuilder.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; + +/** + * ChangeLastVariantIdChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLastVariantIdChange changeLastVariantIdChange = ChangeLastVariantIdChange.builder()
                                  + *             .change("{change}")
                                  + *             .previousValue(1)
                                  + *             .nextValue(1)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeLastVariantIdChangeBuilder implements Builder { + + private String change; + + private Integer previousValue; + + private Integer nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeLastVariantIdChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

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

                                  Value before the change.

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

                                  Value after the change.

                                  + * @return nextValue + */ + + public Integer getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeLastVariantIdChange with checking for non-null required values + * @return ChangeLastVariantIdChange + */ + public ChangeLastVariantIdChange build() { + Objects.requireNonNull(change, ChangeLastVariantIdChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeLastVariantIdChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeLastVariantIdChange.class + ": nextValue is missing"); + return new ChangeLastVariantIdChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeLastVariantIdChange without checking for non-null required values + * @return ChangeLastVariantIdChange + */ + public ChangeLastVariantIdChange buildUnchecked() { + return new ChangeLastVariantIdChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeLastVariantIdChangeBuilder + * @return builder + */ + public static ChangeLastVariantIdChangeBuilder of() { + return new ChangeLastVariantIdChangeBuilder(); + } + + /** + * create builder for ChangeLastVariantIdChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLastVariantIdChangeBuilder of(final ChangeLastVariantIdChange template) { + ChangeLastVariantIdChangeBuilder builder = new ChangeLastVariantIdChangeBuilder(); + 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/ChangeLastVariantIdChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeImpl.java new file mode 100644 index 00000000000..1947a708a84 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  This change is initiated by background processes after the Add ProductVariant update action is performed.

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

                                  Value before the change.

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

                                  Value after the change.

                                  + */ + + public Integer getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final Integer previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final Integer nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeLastVariantIdChangeImpl that = (ChangeLastVariantIdChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeLastVariantIdChange copyDeep() { + return ChangeLastVariantIdChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChange.java new file mode 100644 index 00000000000..b2e4e8823b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChange.java @@ -0,0 +1,201 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.change_value.ShoppingListLineItemValue; +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                  This change is initiated by background processes after the Change Name update action is performed.

                                  + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLineItemNameChange changeLineItemNameChange = ChangeLineItemNameChange.builder()
                                  + *             .change("{change}")
                                  + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                  + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                  + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeLineItemNameChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeLineItemNameChangeImpl.class) +public interface ChangeLineItemNameChange extends Change { + + /** + * discriminator value for ChangeLineItemNameChange + */ + String CHANGE_LINE_ITEM_NAME_CHANGE = "ChangeLineItemNameChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItemValue getLineItem(); + + /** + *

                                  Value before the change.

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

                                  Value after the change.

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

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItemValue lineItem); + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + * @param nextValue value to be set + */ + + public void setNextValue(final LocalizedString nextValue); + + /** + * factory method + * @return instance of ChangeLineItemNameChange + */ + public static ChangeLineItemNameChange of() { + return new ChangeLineItemNameChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeLineItemNameChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeLineItemNameChange of(final ChangeLineItemNameChange template) { + ChangeLineItemNameChangeImpl instance = new ChangeLineItemNameChangeImpl(); + instance.setChange(template.getChange()); + instance.setLineItem(template.getLineItem()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeLineItemNameChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeLineItemNameChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeLineItemNameChange deepCopy(@Nullable final ChangeLineItemNameChange template) { + if (template == null) { + return null; + } + ChangeLineItemNameChangeImpl instance = new ChangeLineItemNameChangeImpl(); + instance.setChange(template.getChange()); + instance.setLineItem( + com.commercetools.history.models.change_value.ShoppingListLineItemValue.deepCopy(template.getLineItem())); + instance.setPreviousValue( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ChangeLineItemNameChange + * @return builder + */ + public static ChangeLineItemNameChangeBuilder builder() { + return ChangeLineItemNameChangeBuilder.of(); + } + + /** + * create builder for ChangeLineItemNameChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLineItemNameChangeBuilder builder(final ChangeLineItemNameChange template) { + return ChangeLineItemNameChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeLineItemNameChange(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/ChangeLineItemNameChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeBuilder.java new file mode 100644 index 00000000000..a653ecc7d0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeBuilder.java @@ -0,0 +1,236 @@ + +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; + +/** + * ChangeLineItemNameChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLineItemNameChange changeLineItemNameChange = ChangeLineItemNameChange.builder()
                                  + *             .change("{change}")
                                  + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                  + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                  + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeLineItemNameChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem; + + private com.commercetools.history.models.common.LocalizedString previousValue; + + private com.commercetools.history.models.common.LocalizedString nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeLineItemNameChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param builder function to build the lineItem value + * @return Builder + */ + + public ChangeLineItemNameChangeBuilder lineItem( + Function builder) { + this.lineItem = builder + .apply(com.commercetools.history.models.change_value.ShoppingListLineItemValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param builder function to build the lineItem value + * @return Builder + */ + + public ChangeLineItemNameChangeBuilder withLineItem( + Function builder) { + this.lineItem = builder + .apply(com.commercetools.history.models.change_value.ShoppingListLineItemValueBuilder.of()); + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param lineItem value to be set + * @return Builder + */ + + public ChangeLineItemNameChangeBuilder lineItem( + final com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem) { + this.lineItem = lineItem; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value before the change.

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

                                  Value before the change.

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

                                  Value after the change.

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

                                  Value after the change.

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

                                  Value after the change.

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

                                  Holds information about the updated Shopping List Line Item.

                                  + * @return lineItem + */ + + public com.commercetools.history.models.change_value.ShoppingListLineItemValue getLineItem() { + return this.lineItem; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + * @return nextValue + */ + + public com.commercetools.history.models.common.LocalizedString getNextValue() { + return this.nextValue; + } + + /** + * builds ChangeLineItemNameChange with checking for non-null required values + * @return ChangeLineItemNameChange + */ + public ChangeLineItemNameChange build() { + Objects.requireNonNull(change, ChangeLineItemNameChange.class + ": change is missing"); + Objects.requireNonNull(lineItem, ChangeLineItemNameChange.class + ": lineItem is missing"); + Objects.requireNonNull(previousValue, ChangeLineItemNameChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeLineItemNameChange.class + ": nextValue is missing"); + return new ChangeLineItemNameChangeImpl(change, lineItem, previousValue, nextValue); + } + + /** + * builds ChangeLineItemNameChange without checking for non-null required values + * @return ChangeLineItemNameChange + */ + public ChangeLineItemNameChange buildUnchecked() { + return new ChangeLineItemNameChangeImpl(change, lineItem, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeLineItemNameChangeBuilder + * @return builder + */ + public static ChangeLineItemNameChangeBuilder of() { + return new ChangeLineItemNameChangeBuilder(); + } + + /** + * create builder for ChangeLineItemNameChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLineItemNameChangeBuilder of(final ChangeLineItemNameChange template) { + ChangeLineItemNameChangeBuilder builder = new ChangeLineItemNameChangeBuilder(); + builder.change = template.getChange(); + builder.lineItem = template.getLineItem(); + 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/ChangeLineItemNameChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeImpl.java new file mode 100644 index 00000000000..0c1a568be7d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  This change is initiated by background processes after the Change Name update action is performed.

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

                                  Holds information about the updated Shopping List Line Item.

                                  + */ + + public com.commercetools.history.models.change_value.ShoppingListLineItemValue getLineItem() { + return this.lineItem; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

                                  + */ + + public com.commercetools.history.models.common.LocalizedString getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setLineItem(final com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem) { + this.lineItem = lineItem; + } + + public void setPreviousValue(final com.commercetools.history.models.common.LocalizedString previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.LocalizedString nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangeLineItemNameChangeImpl that = (ChangeLineItemNameChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(lineItem, that.lineItem) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(lineItem, that.lineItem) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(lineItem) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("lineItem", lineItem) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeLineItemNameChange copyDeep() { + return ChangeLineItemNameChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChange.java new file mode 100644 index 00000000000..55361282a23 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChange.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 com.commercetools.history.models.change_value.ShoppingListLineItemValue; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                  This change is initiated by background processes after the Publish or Unpublish update action is performed.

                                  + * + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLineItemPublishedChange changeLineItemPublishedChange = ChangeLineItemPublishedChange.builder()
                                  + *             .change("{change}")
                                  + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                  + *             .previousValue(true)
                                  + *             .nextValue(true)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeLineItemPublishedChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeLineItemPublishedChangeImpl.class) +public interface ChangeLineItemPublishedChange extends Change { + + /** + * discriminator value for ChangeLineItemPublishedChange + */ + String CHANGE_LINE_ITEM_PUBLISHED_CHANGE = "ChangeLineItemPublishedChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public ShoppingListLineItemValue getLineItem(); + + /** + *

                                  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); + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param lineItem value to be set + */ + + public void setLineItem(final ShoppingListLineItemValue lineItem); + + /** + *

                                  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 ChangeLineItemPublishedChange + */ + public static ChangeLineItemPublishedChange of() { + return new ChangeLineItemPublishedChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeLineItemPublishedChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeLineItemPublishedChange of(final ChangeLineItemPublishedChange template) { + ChangeLineItemPublishedChangeImpl instance = new ChangeLineItemPublishedChangeImpl(); + instance.setChange(template.getChange()); + instance.setLineItem(template.getLineItem()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeLineItemPublishedChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeLineItemPublishedChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeLineItemPublishedChange deepCopy(@Nullable final ChangeLineItemPublishedChange template) { + if (template == null) { + return null; + } + ChangeLineItemPublishedChangeImpl instance = new ChangeLineItemPublishedChangeImpl(); + instance.setChange(template.getChange()); + instance.setLineItem( + com.commercetools.history.models.change_value.ShoppingListLineItemValue.deepCopy(template.getLineItem())); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangeLineItemPublishedChange + * @return builder + */ + public static ChangeLineItemPublishedChangeBuilder builder() { + return ChangeLineItemPublishedChangeBuilder.of(); + } + + /** + * create builder for ChangeLineItemPublishedChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLineItemPublishedChangeBuilder builder(final ChangeLineItemPublishedChange template) { + return ChangeLineItemPublishedChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeLineItemPublishedChange(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/ChangeLineItemPublishedChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeBuilder.java new file mode 100644 index 00000000000..adaa0dd8c30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeBuilder.java @@ -0,0 +1,186 @@ + +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; + +/** + * ChangeLineItemPublishedChangeBuilder + *
                                  + * Example to create an instance using the builder pattern + *
                                  + *
                                  
                                  + *     ChangeLineItemPublishedChange changeLineItemPublishedChange = ChangeLineItemPublishedChange.builder()
                                  + *             .change("{change}")
                                  + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                  + *             .previousValue(true)
                                  + *             .nextValue(true)
                                  + *             .build()
                                  + * 
                                  + *
                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeLineItemPublishedChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem; + + private Boolean previousValue; + + private Boolean nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangeLineItemPublishedChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param builder function to build the lineItem value + * @return Builder + */ + + public ChangeLineItemPublishedChangeBuilder lineItem( + Function builder) { + this.lineItem = builder + .apply(com.commercetools.history.models.change_value.ShoppingListLineItemValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param builder function to build the lineItem value + * @return Builder + */ + + public ChangeLineItemPublishedChangeBuilder withLineItem( + Function builder) { + this.lineItem = builder + .apply(com.commercetools.history.models.change_value.ShoppingListLineItemValueBuilder.of()); + return this; + } + + /** + *

                                  Holds information about the updated Shopping List Line Item.

                                  + * @param lineItem value to be set + * @return Builder + */ + + public ChangeLineItemPublishedChangeBuilder lineItem( + final com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem) { + this.lineItem = lineItem; + return this; + } + + /** + *

                                  Value before the change.

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

                                  Value after the change.

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

                                  Holds information about the updated Shopping List Line Item.

                                  + * @return lineItem + */ + + public com.commercetools.history.models.change_value.ShoppingListLineItemValue getLineItem() { + return this.lineItem; + } + + /** + *

                                  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 ChangeLineItemPublishedChange with checking for non-null required values + * @return ChangeLineItemPublishedChange + */ + public ChangeLineItemPublishedChange build() { + Objects.requireNonNull(change, ChangeLineItemPublishedChange.class + ": change is missing"); + Objects.requireNonNull(lineItem, ChangeLineItemPublishedChange.class + ": lineItem is missing"); + Objects.requireNonNull(previousValue, ChangeLineItemPublishedChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeLineItemPublishedChange.class + ": nextValue is missing"); + return new ChangeLineItemPublishedChangeImpl(change, lineItem, previousValue, nextValue); + } + + /** + * builds ChangeLineItemPublishedChange without checking for non-null required values + * @return ChangeLineItemPublishedChange + */ + public ChangeLineItemPublishedChange buildUnchecked() { + return new ChangeLineItemPublishedChangeImpl(change, lineItem, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeLineItemPublishedChangeBuilder + * @return builder + */ + public static ChangeLineItemPublishedChangeBuilder of() { + return new ChangeLineItemPublishedChangeBuilder(); + } + + /** + * create builder for ChangeLineItemPublishedChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeLineItemPublishedChangeBuilder of(final ChangeLineItemPublishedChange template) { + ChangeLineItemPublishedChangeBuilder builder = new ChangeLineItemPublishedChangeBuilder(); + builder.change = template.getChange(); + builder.lineItem = template.getLineItem(); + 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/ChangeLineItemPublishedChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeImpl.java new file mode 100644 index 00000000000..bad63921938 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                  This change is initiated by background processes after the Publish or Unpublish update action is performed.

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

                                  Holds information about the updated Shopping List Line Item.

                                  + */ + + public com.commercetools.history.models.change_value.ShoppingListLineItemValue getLineItem() { + return this.lineItem; + } + + /** + *

                                  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 setLineItem(final com.commercetools.history.models.change_value.ShoppingListLineItemValue lineItem) { + this.lineItem = lineItem; + } + + 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; + + ChangeLineItemPublishedChangeImpl that = (ChangeLineItemPublishedChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(lineItem, that.lineItem) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(lineItem, that.lineItem) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(lineItem) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("lineItem", lineItem) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeLineItemPublishedChange copyDeep() { + return ChangeLineItemPublishedChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChange.java index d77640da3be..79d8b772e5e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChange.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.LocalizedEnumValue; +import com.commercetools.history.models.common.AttributeLocalizedEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -71,7 +71,7 @@ public interface ChangeLocalizedEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public List getPreviousValue(); + public List getPreviousValue(); /** *

                                  Value after the change.

                                  @@ -80,7 +80,7 @@ public interface ChangeLocalizedEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public List getNextValue(); + public List getNextValue(); /** *

                                  Name of the updated FieldDefinition; only present on changes to Types.

                                  @@ -111,14 +111,14 @@ public interface ChangeLocalizedEnumValueOrderChange extends Change { */ @JsonIgnore - public void setPreviousValue(final LocalizedEnumValue... previousValue); + public void setPreviousValue(final AttributeLocalizedEnumValue... previousValue); /** *

                                  Value before the change.

                                  * @param previousValue values to be set */ - public void setPreviousValue(final List previousValue); + public void setPreviousValue(final List previousValue); /** *

                                  Value after the change.

                                  @@ -126,14 +126,14 @@ public interface ChangeLocalizedEnumValueOrderChange extends Change { */ @JsonIgnore - public void setNextValue(final LocalizedEnumValue... nextValue); + public void setNextValue(final AttributeLocalizedEnumValue... nextValue); /** *

                                  Value after the change.

                                  * @param nextValue values to be set */ - public void setNextValue(final List nextValue); + public void setNextValue(final List nextValue); /** *

                                  Name of the updated FieldDefinition; only present on changes to Types.

                                  @@ -189,12 +189,12 @@ public static ChangeLocalizedEnumValueOrderChange deepCopy( instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.LocalizedEnumValue::deepCopy) + .map(com.commercetools.history.models.common.AttributeLocalizedEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.LocalizedEnumValue::deepCopy) + .map(com.commercetools.history.models.common.AttributeLocalizedEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setFieldName(template.getFieldName()); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeBuilder.java index 7ceaca60324..b622beaeaf5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeBuilder.java @@ -28,9 +28,9 @@ public class ChangeLocalizedEnumValueOrderChangeBuilder implements Builder previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String fieldName; @@ -54,7 +54,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder change(final String change) { */ public ChangeLocalizedEnumValueOrderChangeBuilder previousValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue... previousValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); return this; } @@ -66,7 +66,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder previousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder previousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; return this; } @@ -78,7 +78,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder previousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder plusPreviousValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue... previousValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue... previousValue) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -93,12 +93,12 @@ public ChangeLocalizedEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder plusPreviousValue( - Function builder) { + Function builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } this.previousValue.add( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()).build()); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()).build()); return this; } @@ -109,10 +109,10 @@ public ChangeLocalizedEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder withPreviousValue( - Function builder) { + Function builder) { this.previousValue = new ArrayList<>(); this.previousValue.add( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()).build()); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()).build()); return this; } @@ -123,9 +123,9 @@ public ChangeLocalizedEnumValueOrderChangeBuilder withPreviousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder addPreviousValue( - Function builder) { + Function builder) { return plusPreviousValue( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of())); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of())); } /** @@ -135,9 +135,9 @@ public ChangeLocalizedEnumValueOrderChangeBuilder addPreviousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder setPreviousValue( - Function builder) { + Function builder) { return previousValue( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of())); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of())); } /** @@ -147,7 +147,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder setPreviousValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder nextValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue... nextValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); return this; } @@ -159,7 +159,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder nextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder nextValue( - final java.util.List nextValue) { + final java.util.List nextValue) { this.nextValue = nextValue; return this; } @@ -171,7 +171,7 @@ public ChangeLocalizedEnumValueOrderChangeBuilder nextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder plusNextValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue... nextValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue... nextValue) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -186,12 +186,12 @@ public ChangeLocalizedEnumValueOrderChangeBuilder plusNextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder plusNextValue( - Function builder) { + Function builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } this.nextValue.add( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()).build()); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()).build()); return this; } @@ -202,10 +202,10 @@ public ChangeLocalizedEnumValueOrderChangeBuilder plusNextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder withNextValue( - Function builder) { + Function builder) { this.nextValue = new ArrayList<>(); this.nextValue.add( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()).build()); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()).build()); return this; } @@ -216,9 +216,9 @@ public ChangeLocalizedEnumValueOrderChangeBuilder withNextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder addNextValue( - Function builder) { + Function builder) { return plusNextValue( - builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of())); + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of())); } /** @@ -228,8 +228,9 @@ public ChangeLocalizedEnumValueOrderChangeBuilder addNextValue( */ public ChangeLocalizedEnumValueOrderChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of())); + Function builder) { + return nextValue( + builder.apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of())); } /** @@ -268,7 +269,7 @@ public String getChange() { * @return previousValue */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -277,7 +278,7 @@ public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeImpl.java index c7f74e091f3..5848e4599de 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeImpl.java @@ -30,9 +30,9 @@ public class ChangeLocalizedEnumValueOrderChangeImpl implements ChangeLocalizedE private String change; - private java.util.List previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String fieldName; @@ -43,8 +43,8 @@ public class ChangeLocalizedEnumValueOrderChangeImpl implements ChangeLocalizedE */ @JsonCreator ChangeLocalizedEnumValueOrderChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("previousValue") final java.util.List previousValue, + @JsonProperty("nextValue") final java.util.List nextValue, @JsonProperty("fieldName") final String fieldName, @JsonProperty("attributeName") final String attributeName) { this.change = change; @@ -82,7 +82,7 @@ public String getChange() { *

                                  Value before the change.

                                  */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -90,7 +90,7 @@ public java.util.ListValue after the change.

                                  */ - public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } @@ -115,21 +115,21 @@ public void setChange(final String change) { } public void setPreviousValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue... previousValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); } public void setPreviousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.change_value.LocalizedEnumValue... nextValue) { + public void setNextValue(final com.commercetools.history.models.common.AttributeLocalizedEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); } public void setNextValue( - final java.util.List nextValue) { + final java.util.List nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChange.java index ecc24dbb037..43bcc065994 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChange.java @@ -22,7 +22,7 @@ *
                                • Change Name on Cart Discounts.
                                • *
                                • Change Name on Categories.
                                • *
                                • Change Name on Channels.
                                • - *
                                • Change Name on Products.
                                • + *
                                • Change Product Name on Products.
                                • *
                                • Change Name on Product Discounts.
                                • *
                                • Change Name on Product Selections.
                                • *
                                • Change Name on Shopping Lists.
                                • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChangeImpl.java index dcef4a43986..76c0c9bfbc0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeLocalizedNameChangeImpl.java @@ -22,7 +22,7 @@ *
                                • Change Name on Cart Discounts.
                                • *
                                • Change Name on Categories.
                                • *
                                • Change Name on Channels.
                                • - *
                                • Change Name on Products.
                                • + *
                                • Change Product Name on Products.
                                • *
                                • Change Name on Product Discounts.
                                • *
                                • Change Name on Product Selections.
                                • *
                                • Change Name on Shopping Lists.
                                • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChange.java index 4879c90224e..c62e6dfce86 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChange.java @@ -77,6 +77,7 @@ public interface ChangeMasterVariantChange extends Change { public Variant getNextValue(); /** + *

                                  Product data that was updated.

                                  *
                                    *
                                  • staged, if the staged ProductCatalogData was updated.
                                  • *
                                  • current, if the current ProductCatalogData was updated.
                                  • @@ -109,6 +110,7 @@ public interface ChangeMasterVariantChange extends Change { public void setNextValue(final Variant nextValue); /** + *

                                    Product data that was updated.

                                    *
                                      *
                                    • staged, if the staged ProductCatalogData was updated.
                                    • *
                                    • current, if the current ProductCatalogData was updated.
                                    • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeBuilder.java index e005d922206..6ef1af576a0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeBuilder.java @@ -116,6 +116,7 @@ public ChangeMasterVariantChangeBuilder nextValue(final com.commercetools.histor } /** + *

                                      Product data that was updated.

                                      *
                                        *
                                      • staged, if the staged ProductCatalogData was updated.
                                      • *
                                      • current, if the current ProductCatalogData was updated.
                                      • @@ -157,6 +158,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                                        Product data that was updated.

                                        *
                                          *
                                        • staged, if the staged ProductCatalogData was updated.
                                        • *
                                        • current, if the current ProductCatalogData was updated.
                                        • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeImpl.java index e571541f61e..34bc3b9c4bc 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeMasterVariantChangeImpl.java @@ -87,6 +87,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                                          Product data that was updated.

                                          *
                                            *
                                          • staged, if the staged ProductCatalogData was updated.
                                          • *
                                          • current, if the current ProductCatalogData was updated.
                                          • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentChangeBuilder.java index dcc8e969170..ef8fcadf9f9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeParentChangeBuilder.java @@ -43,13 +43,13 @@ public ChangeParentChangeBuilder change(final String change) { /** *

                                            Value before the change.

                                            - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public ChangeParentChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public ChangeParentChangeBuilder previousValue( * @return Builder */ - public ChangeParentChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                            Value before the change.

                                            - * @param previousValue value to be set - * @return Builder - */ - public ChangeParentChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                            Value after the change.

                                            - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public ChangeParentChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public ChangeParentChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public ChangeParentChangeBuilder nextValue( * @return Builder */ - public ChangeParentChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                            Value after the change.

                                            - * @param nextValue value to be set - * @return Builder - */ - - public ChangeParentChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public ChangeParentChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } 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 index 28bf06b76e9..ab702d81cbd 100644 --- 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 @@ -43,13 +43,13 @@ public ChangeParentUnitChangeBuilder change(final String change) { /** *

                                            Value before the change.

                                            - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public ChangeParentUnitChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.KeyReference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,21 @@ public ChangeParentUnitChangeBuilder previousValue( * @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; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); return this; } /** *

                                            Value after the change.

                                            - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ public ChangeParentUnitChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.KeyReference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,21 +83,9 @@ public ChangeParentUnitChangeBuilder nextValue( * @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; + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChange.java index ad03078f761..aec9b4717d9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChange.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.EnumValue; +import com.commercetools.history.models.common.AttributePlainEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -66,7 +66,7 @@ public interface ChangePlainEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public List getPreviousValue(); + public List getPreviousValue(); /** *

                                            Value after the change.

                                            @@ -75,7 +75,7 @@ public interface ChangePlainEnumValueOrderChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public List getNextValue(); + public List getNextValue(); /** *

                                            Name of the updated AttributeDefinition.

                                            @@ -98,14 +98,14 @@ public interface ChangePlainEnumValueOrderChange extends Change { */ @JsonIgnore - public void setPreviousValue(final EnumValue... previousValue); + public void setPreviousValue(final AttributePlainEnumValue... previousValue); /** *

                                            Value before the change.

                                            * @param previousValue values to be set */ - public void setPreviousValue(final List previousValue); + public void setPreviousValue(final List previousValue); /** *

                                            Value after the change.

                                            @@ -113,14 +113,14 @@ public interface ChangePlainEnumValueOrderChange extends Change { */ @JsonIgnore - public void setNextValue(final EnumValue... nextValue); + public void setNextValue(final AttributePlainEnumValue... nextValue); /** *

                                            Value after the change.

                                            * @param nextValue values to be set */ - public void setNextValue(final List nextValue); + public void setNextValue(final List nextValue); /** *

                                            Name of the updated AttributeDefinition.

                                            @@ -167,12 +167,12 @@ public static ChangePlainEnumValueOrderChange deepCopy(@Nullable final ChangePla instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.EnumValue::deepCopy) + .map(com.commercetools.history.models.common.AttributePlainEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()) .map(t -> t.stream() - .map(com.commercetools.history.models.change_value.EnumValue::deepCopy) + .map(com.commercetools.history.models.common.AttributePlainEnumValue::deepCopy) .collect(Collectors.toList())) .orElse(null)); instance.setAttributeName(template.getAttributeName()); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeBuilder.java index 0686ad54560..1bcbb5e65e0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeBuilder.java @@ -27,9 +27,9 @@ public class ChangePlainEnumValueOrderChangeBuilder implements Builder previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String attributeName; @@ -51,7 +51,7 @@ public ChangePlainEnumValueOrderChangeBuilder change(final String change) { */ public ChangePlainEnumValueOrderChangeBuilder previousValue( - final com.commercetools.history.models.change_value.EnumValue... previousValue) { + final com.commercetools.history.models.common.AttributePlainEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); return this; } @@ -63,7 +63,7 @@ public ChangePlainEnumValueOrderChangeBuilder previousValue( */ public ChangePlainEnumValueOrderChangeBuilder previousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; return this; } @@ -75,7 +75,7 @@ public ChangePlainEnumValueOrderChangeBuilder previousValue( */ public ChangePlainEnumValueOrderChangeBuilder plusPreviousValue( - final com.commercetools.history.models.change_value.EnumValue... previousValue) { + final com.commercetools.history.models.common.AttributePlainEnumValue... previousValue) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -90,12 +90,12 @@ public ChangePlainEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangePlainEnumValueOrderChangeBuilder plusPreviousValue( - Function builder) { + Function builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } - this.previousValue - .add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.previousValue.add( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()).build()); return this; } @@ -106,10 +106,10 @@ public ChangePlainEnumValueOrderChangeBuilder plusPreviousValue( */ public ChangePlainEnumValueOrderChangeBuilder withPreviousValue( - Function builder) { + Function builder) { this.previousValue = new ArrayList<>(); - this.previousValue - .add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.previousValue.add( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()).build()); return this; } @@ -120,8 +120,9 @@ public ChangePlainEnumValueOrderChangeBuilder withPreviousValue( */ public ChangePlainEnumValueOrderChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return plusPreviousValue( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of())); } /** @@ -131,8 +132,9 @@ public ChangePlainEnumValueOrderChangeBuilder addPreviousValue( */ public ChangePlainEnumValueOrderChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return previousValue( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of())); } /** @@ -142,7 +144,7 @@ public ChangePlainEnumValueOrderChangeBuilder setPreviousValue( */ public ChangePlainEnumValueOrderChangeBuilder nextValue( - final com.commercetools.history.models.change_value.EnumValue... nextValue) { + final com.commercetools.history.models.common.AttributePlainEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); return this; } @@ -154,7 +156,7 @@ public ChangePlainEnumValueOrderChangeBuilder nextValue( */ public ChangePlainEnumValueOrderChangeBuilder nextValue( - final java.util.List nextValue) { + final java.util.List nextValue) { this.nextValue = nextValue; return this; } @@ -166,7 +168,7 @@ public ChangePlainEnumValueOrderChangeBuilder nextValue( */ public ChangePlainEnumValueOrderChangeBuilder plusNextValue( - final com.commercetools.history.models.change_value.EnumValue... nextValue) { + final com.commercetools.history.models.common.AttributePlainEnumValue... nextValue) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -181,11 +183,12 @@ public ChangePlainEnumValueOrderChangeBuilder plusNextValue( */ public ChangePlainEnumValueOrderChangeBuilder plusNextValue( - Function builder) { + Function builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } - this.nextValue.add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.nextValue.add( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()).build()); return this; } @@ -196,9 +199,10 @@ public ChangePlainEnumValueOrderChangeBuilder plusNextValue( */ public ChangePlainEnumValueOrderChangeBuilder withNextValue( - Function builder) { + Function builder) { this.nextValue = new ArrayList<>(); - this.nextValue.add(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build()); + this.nextValue.add( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()).build()); return this; } @@ -209,8 +213,9 @@ public ChangePlainEnumValueOrderChangeBuilder withNextValue( */ public ChangePlainEnumValueOrderChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return plusNextValue( + builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of())); } /** @@ -220,8 +225,8 @@ public ChangePlainEnumValueOrderChangeBuilder addNextValue( */ public ChangePlainEnumValueOrderChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of())); + Function builder) { + return nextValue(builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of())); } /** @@ -249,7 +254,7 @@ public String getChange() { * @return previousValue */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -258,7 +263,7 @@ public java.util.List g * @return nextValue */ - public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeImpl.java index fc8c0d335e5..1c4ba6b880b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeImpl.java @@ -26,9 +26,9 @@ public class ChangePlainEnumValueOrderChangeImpl implements ChangePlainEnumValue private String change; - private java.util.List previousValue; + private java.util.List previousValue; - private java.util.List nextValue; + private java.util.List nextValue; private String attributeName; @@ -37,8 +37,8 @@ public class ChangePlainEnumValueOrderChangeImpl implements ChangePlainEnumValue */ @JsonCreator ChangePlainEnumValueOrderChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("previousValue") final java.util.List previousValue, + @JsonProperty("nextValue") final java.util.List nextValue, @JsonProperty("attributeName") final String attributeName) { this.change = change; this.previousValue = previousValue; @@ -74,7 +74,7 @@ public String getChange() { *

                                            Value before the change.

                                            */ - public java.util.List getPreviousValue() { + public java.util.List getPreviousValue() { return this.previousValue; } @@ -82,7 +82,7 @@ public java.util.List g *

                                            Value after the change.

                                            */ - public java.util.List getNextValue() { + public java.util.List getNextValue() { return this.nextValue; } @@ -98,20 +98,22 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.change_value.EnumValue... previousValue) { + public void setPreviousValue( + final com.commercetools.history.models.common.AttributePlainEnumValue... previousValue) { this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); } public void setPreviousValue( - final java.util.List previousValue) { + final java.util.List previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.change_value.EnumValue... nextValue) { + public void setNextValue(final com.commercetools.history.models.common.AttributePlainEnumValue... nextValue) { this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); } - public void setNextValue(final java.util.List nextValue) { + public void setNextValue( + final java.util.List nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChange.java index 4d1aeb8928c..50da71885c3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChange.java @@ -29,6 +29,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() *
                                  * @@ -78,6 +79,7 @@ public interface ChangePriceChange extends Change { public Price getNextValue(); /** + *

                                  Product data that was updated.

                                  *
                                    *
                                  • staged, if the staged ProductCatalogData was updated.
                                  • *
                                  • current, if the current ProductCatalogData was updated.
                                  • @@ -96,6 +98,15 @@ public interface ChangePriceChange extends Change { @JsonProperty("priceId") public String getPriceId(); + /** + *

                                    Identifier of the updated Product Variant.

                                    + *

                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                    + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -118,6 +129,7 @@ public interface ChangePriceChange extends Change { public void setNextValue(final Price nextValue); /** + *

                                    Product data that was updated.

                                    *
                                      *
                                    • staged, if the staged ProductCatalogData was updated.
                                    • *
                                    • current, if the current ProductCatalogData was updated.
                                    • @@ -134,6 +146,14 @@ public interface ChangePriceChange extends Change { public void setPriceId(final String priceId); + /** + *

                                      Identifier of the updated Product Variant.

                                      + *

                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                      + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of ChangePriceChange @@ -154,6 +174,7 @@ public static ChangePriceChange of(final ChangePriceChange template) { instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } @@ -175,6 +196,7 @@ public static ChangePriceChange deepCopy(@Nullable final ChangePriceChange templ instance.setNextValue(com.commercetools.history.models.common.Price.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeBuilder.java index 8601e7643c9..8fa0a49b93b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() *
                                  * @@ -36,6 +37,8 @@ public class ChangePriceChangeBuilder implements Builder { private String priceId; + private String variant; + /** * set the value to the change * @param change value to be set @@ -118,6 +121,7 @@ public ChangePriceChangeBuilder nextValue(final com.commercetools.history.models } /** + *

                                  Product data that was updated.

                                  *
                                    *
                                  • staged, if the staged ProductCatalogData was updated.
                                  • *
                                  • current, if the current ProductCatalogData was updated.
                                  • @@ -142,6 +146,18 @@ public ChangePriceChangeBuilder priceId(final String priceId) { return this; } + /** + *

                                    Identifier of the updated Product Variant.

                                    + *

                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                    + * @param variant value to be set + * @return Builder + */ + + public ChangePriceChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -170,6 +186,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                                    Product data that was updated.

                                    *
                                      *
                                    • staged, if the staged ProductCatalogData was updated.
                                    • *
                                    • current, if the current ProductCatalogData was updated.
                                    • @@ -190,6 +207,16 @@ public String getPriceId() { return this.priceId; } + /** + *

                                      Identifier of the updated Product Variant.

                                      + *

                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                      + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds ChangePriceChange with checking for non-null required values * @return ChangePriceChange @@ -200,7 +227,8 @@ public ChangePriceChange build() { Objects.requireNonNull(nextValue, ChangePriceChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, ChangePriceChange.class + ": catalogData is missing"); Objects.requireNonNull(priceId, ChangePriceChange.class + ": priceId is missing"); - return new ChangePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId); + Objects.requireNonNull(variant, ChangePriceChange.class + ": variant is missing"); + return new ChangePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId, variant); } /** @@ -208,7 +236,7 @@ public ChangePriceChange build() { * @return ChangePriceChange */ public ChangePriceChange buildUnchecked() { - return new ChangePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId); + return new ChangePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId, variant); } /** @@ -231,6 +259,7 @@ public static ChangePriceChangeBuilder of(final ChangePriceChange template) { builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); builder.priceId = template.getPriceId(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeImpl.java index ec3dfb373b9..9e33a4513a2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceChangeImpl.java @@ -34,6 +34,8 @@ public class ChangePriceChangeImpl implements ChangePriceChange, ModelBase { private String priceId; + private String variant; + /** * create instance with all properties */ @@ -41,12 +43,14 @@ public class ChangePriceChangeImpl implements ChangePriceChange, ModelBase { ChangePriceChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Price previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.Price nextValue, - @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId, + @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; this.priceId = priceId; + this.variant = variant; this.type = CHANGE_PRICE_CHANGE; } @@ -90,6 +94,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                                      Product data that was updated.

                                      *
                                        *
                                      • staged, if the staged ProductCatalogData was updated.
                                      • *
                                      • current, if the current ProductCatalogData was updated.
                                      • @@ -108,6 +113,15 @@ public String getPriceId() { return this.priceId; } + /** + *

                                        Identifier of the updated Product Variant.

                                        + *

                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -128,6 +142,10 @@ public void setPriceId(final String priceId) { this.priceId = priceId; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -144,12 +162,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .isEquals(); } @@ -161,6 +181,7 @@ public int hashCode() { .append(nextValue) .append(catalogData) .append(priceId) + .append(variant) .toHashCode(); } @@ -172,6 +193,7 @@ public String toString() { .append("nextValue", nextValue) .append("catalogData", catalogData) .append("priceId", priceId) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChange.java new file mode 100644 index 00000000000..dbc46979ac3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChange.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 com.commercetools.history.models.common.RoundingMode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                        Change triggered by the Change Price Rounding Mode update action.

                                        + * + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ChangePriceRoundingModeChange changePriceRoundingModeChange = ChangePriceRoundingModeChange.builder()
                                        + *             .change("{change}")
                                        + *             .previousValue(RoundingMode.HALF_EVEN)
                                        + *             .nextValue(RoundingMode.HALF_EVEN)
                                        + *             .build()
                                        + * 
                                        + *
                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangePriceRoundingModeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangePriceRoundingModeChangeImpl.class) +public interface ChangePriceRoundingModeChange extends Change { + + /** + * discriminator value for ChangePriceRoundingModeChange + */ + String CHANGE_PRICE_ROUNDING_MODE_CHANGE = "ChangePriceRoundingModeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                        Value before the change.

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

                                        Value after the change.

                                        + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public RoundingMode 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 RoundingMode previousValue); + + /** + *

                                        Value after the change.

                                        + * @param nextValue value to be set + */ + + public void setNextValue(final RoundingMode nextValue); + + /** + * factory method + * @return instance of ChangePriceRoundingModeChange + */ + public static ChangePriceRoundingModeChange of() { + return new ChangePriceRoundingModeChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangePriceRoundingModeChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangePriceRoundingModeChange of(final ChangePriceRoundingModeChange template) { + ChangePriceRoundingModeChangeImpl instance = new ChangePriceRoundingModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangePriceRoundingModeChange copyDeep(); + + /** + * factory method to create a deep copy of ChangePriceRoundingModeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangePriceRoundingModeChange deepCopy(@Nullable final ChangePriceRoundingModeChange template) { + if (template == null) { + return null; + } + ChangePriceRoundingModeChangeImpl instance = new ChangePriceRoundingModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for ChangePriceRoundingModeChange + * @return builder + */ + public static ChangePriceRoundingModeChangeBuilder builder() { + return ChangePriceRoundingModeChangeBuilder.of(); + } + + /** + * create builder for ChangePriceRoundingModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangePriceRoundingModeChangeBuilder builder(final ChangePriceRoundingModeChange template) { + return ChangePriceRoundingModeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangePriceRoundingModeChange(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/ChangePriceRoundingModeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeBuilder.java new file mode 100644 index 00000000000..a9a57e9c1b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeBuilder.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; + +/** + * ChangePriceRoundingModeChangeBuilder + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ChangePriceRoundingModeChange changePriceRoundingModeChange = ChangePriceRoundingModeChange.builder()
                                        + *             .change("{change}")
                                        + *             .previousValue(RoundingMode.HALF_EVEN)
                                        + *             .nextValue(RoundingMode.HALF_EVEN)
                                        + *             .build()
                                        + * 
                                        + *
                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangePriceRoundingModeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.RoundingMode previousValue; + + private com.commercetools.history.models.common.RoundingMode nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ChangePriceRoundingModeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                        Value before the change.

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

                                        Value after the change.

                                        + * @param nextValue value to be set + * @return Builder + */ + + public ChangePriceRoundingModeChangeBuilder nextValue( + final com.commercetools.history.models.common.RoundingMode 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.RoundingMode getPreviousValue() { + return this.previousValue; + } + + /** + *

                                        Value after the change.

                                        + * @return nextValue + */ + + public com.commercetools.history.models.common.RoundingMode getNextValue() { + return this.nextValue; + } + + /** + * builds ChangePriceRoundingModeChange with checking for non-null required values + * @return ChangePriceRoundingModeChange + */ + public ChangePriceRoundingModeChange build() { + Objects.requireNonNull(change, ChangePriceRoundingModeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangePriceRoundingModeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangePriceRoundingModeChange.class + ": nextValue is missing"); + return new ChangePriceRoundingModeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangePriceRoundingModeChange without checking for non-null required values + * @return ChangePriceRoundingModeChange + */ + public ChangePriceRoundingModeChange buildUnchecked() { + return new ChangePriceRoundingModeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangePriceRoundingModeChangeBuilder + * @return builder + */ + public static ChangePriceRoundingModeChangeBuilder of() { + return new ChangePriceRoundingModeChangeBuilder(); + } + + /** + * create builder for ChangePriceRoundingModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangePriceRoundingModeChangeBuilder of(final ChangePriceRoundingModeChange template) { + ChangePriceRoundingModeChangeBuilder builder = new ChangePriceRoundingModeChangeBuilder(); + 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/ChangePriceRoundingModeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeImpl.java new file mode 100644 index 00000000000..9506f7f531d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                        Change triggered by the Change Price Rounding Mode update action.

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

                                        Value before the change.

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

                                        Value after the change.

                                        + */ + + public com.commercetools.history.models.common.RoundingMode getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.RoundingMode previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.RoundingMode nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChangePriceRoundingModeChangeImpl that = (ChangePriceRoundingModeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangePriceRoundingModeChange copyDeep() { + return ChangePriceRoundingModeChange.deepCopy(this); + } +} 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 index fb6bb0f8c06..c661483cebe 100644 --- 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 @@ -46,13 +46,13 @@ public ChangeProductSelectionActiveChangeBuilder change(final String change) { /** *

                                        Reference to the Product Selection which was changed.

                                        - * @param builder function to build the productSelection value + * @param productSelection value to be set * @return Builder */ public ChangeProductSelectionActiveChangeBuilder productSelection( - Function builder) { - this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference productSelection) { + this.productSelection = productSelection; return this; } @@ -62,21 +62,9 @@ public ChangeProductSelectionActiveChangeBuilder productSelection( * @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; + Function> builder) { + this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChange.java index 706a47f0a18..15558447fe2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * ChangeReviewRatingStatisticsChange + *

                                        This change is initiated by background processes after the Set Rating update action is performed.

                                        * *
                                        * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChangeImpl.java index ce9044d1a12..bdc85dc13d5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeReviewRatingStatisticsChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ChangeReviewRatingStatisticsChange + *

                                        This change is initiated by background processes after the Set Rating update action is performed.

                                        */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ChangeReviewRatingStatisticsChangeImpl implements ChangeReviewRatingStatisticsChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChange.java index 29f5e2daf3f..12ded78ccc7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChange.java @@ -31,6 +31,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -79,6 +80,18 @@ public interface ChangeSlugChange extends Change { @JsonProperty("nextValue") public LocalizedString getNextValue(); + /** + *

                                        Product data that was updated.

                                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -100,6 +113,17 @@ public interface ChangeSlugChange extends Change { public void setNextValue(final LocalizedString nextValue); + /** + *

                                        Product data that was updated.

                                        + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of ChangeSlugChange @@ -118,6 +142,7 @@ public static ChangeSlugChange of(final ChangeSlugChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -139,6 +164,7 @@ public static ChangeSlugChange deepCopy(@Nullable final ChangeSlugChange templat com.commercetools.history.models.common.LocalizedString.deepCopy(template.getPreviousValue())); instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeBuilder.java index b9296701fe7..c0ffeeaed41 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeBuilder.java @@ -17,6 +17,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -30,6 +31,8 @@ public class ChangeSlugChangeBuilder implements Builder { private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * set the value to the change * @param change value to be set @@ -112,6 +115,21 @@ public ChangeSlugChangeBuilder nextValue(final com.commercetools.history.models. return this; } + /** + *

                                        Product data that was updated.

                                        + * + * @param catalogData value to be set + * @return Builder + */ + + public ChangeSlugChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; + return this; + } + /** * value of change} * @return change @@ -139,6 +157,19 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                        Product data that was updated.

                                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds ChangeSlugChange with checking for non-null required values * @return ChangeSlugChange @@ -147,7 +178,8 @@ public ChangeSlugChange build() { Objects.requireNonNull(change, ChangeSlugChange.class + ": change is missing"); Objects.requireNonNull(previousValue, ChangeSlugChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, ChangeSlugChange.class + ": nextValue is missing"); - return new ChangeSlugChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, ChangeSlugChange.class + ": catalogData is missing"); + return new ChangeSlugChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -155,7 +187,7 @@ public ChangeSlugChange build() { * @return ChangeSlugChange */ public ChangeSlugChange buildUnchecked() { - return new ChangeSlugChangeImpl(change, previousValue, nextValue); + return new ChangeSlugChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -176,6 +208,7 @@ public static ChangeSlugChangeBuilder of(final ChangeSlugChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeImpl.java index b8f22d30b0d..d3c486934b8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeSlugChangeImpl.java @@ -34,16 +34,20 @@ public class ChangeSlugChangeImpl implements ChangeSlugChange, ModelBase { private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * create instance with all properties */ @JsonCreator ChangeSlugChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; this.type = CHANGE_SLUG_CHANGE; } @@ -86,6 +90,18 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                        Product data that was updated.

                                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -98,6 +114,10 @@ public void setNextValue(final com.commercetools.history.models.common.Localized this.nextValue = nextValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -112,10 +132,12 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .isEquals(); } @@ -125,6 +147,7 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(catalogData) .toHashCode(); } @@ -134,6 +157,7 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChange.java new file mode 100644 index 00000000000..4840ccc9077 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChange.java @@ -0,0 +1,183 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                        Change triggered by the following update actions:

                                        + * + * + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ChangeTopLevelUnitChange changeTopLevelUnitChange = ChangeTopLevelUnitChange.builder()
                                        + *             .change("{change}")
                                        + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                        + *             .build()
                                        + * 
                                        + *
                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("ChangeTopLevelUnitChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChangeTopLevelUnitChangeImpl.class) +public interface ChangeTopLevelUnitChange extends Change { + + /** + * discriminator value for ChangeTopLevelUnitChange + */ + String CHANGE_TOP_LEVEL_UNIT_CHANGE = "ChangeTopLevelUnitChange"; + + /** + * + * @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 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 ChangeTopLevelUnitChange + */ + public static ChangeTopLevelUnitChange of() { + return new ChangeTopLevelUnitChangeImpl(); + } + + /** + * factory method to create a shallow copy ChangeTopLevelUnitChange + * @param template instance to be copied + * @return copy instance + */ + public static ChangeTopLevelUnitChange of(final ChangeTopLevelUnitChange template) { + ChangeTopLevelUnitChangeImpl instance = new ChangeTopLevelUnitChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ChangeTopLevelUnitChange copyDeep(); + + /** + * factory method to create a deep copy of ChangeTopLevelUnitChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChangeTopLevelUnitChange deepCopy(@Nullable final ChangeTopLevelUnitChange template) { + if (template == null) { + return null; + } + ChangeTopLevelUnitChangeImpl instance = new ChangeTopLevelUnitChangeImpl(); + 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 ChangeTopLevelUnitChange + * @return builder + */ + public static ChangeTopLevelUnitChangeBuilder builder() { + return ChangeTopLevelUnitChangeBuilder.of(); + } + + /** + * create builder for ChangeTopLevelUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeTopLevelUnitChangeBuilder builder(final ChangeTopLevelUnitChange template) { + return ChangeTopLevelUnitChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChangeTopLevelUnitChange(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/ChangeTopLevelUnitChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeBuilder.java new file mode 100644 index 00000000000..b23e8ac82a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeBuilder.java @@ -0,0 +1,159 @@ + +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; + +/** + * ChangeTopLevelUnitChangeBuilder + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ChangeTopLevelUnitChange changeTopLevelUnitChange = ChangeTopLevelUnitChange.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 ChangeTopLevelUnitChangeBuilder 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 ChangeTopLevelUnitChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                        Value before the change.

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

                                        Value before the change.

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

                                        Value after the change.

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

                                        Value after the change.

                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public ChangeTopLevelUnitChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + 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 ChangeTopLevelUnitChange with checking for non-null required values + * @return ChangeTopLevelUnitChange + */ + public ChangeTopLevelUnitChange build() { + Objects.requireNonNull(change, ChangeTopLevelUnitChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ChangeTopLevelUnitChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ChangeTopLevelUnitChange.class + ": nextValue is missing"); + return new ChangeTopLevelUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ChangeTopLevelUnitChange without checking for non-null required values + * @return ChangeTopLevelUnitChange + */ + public ChangeTopLevelUnitChange buildUnchecked() { + return new ChangeTopLevelUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ChangeTopLevelUnitChangeBuilder + * @return builder + */ + public static ChangeTopLevelUnitChangeBuilder of() { + return new ChangeTopLevelUnitChangeBuilder(); + } + + /** + * create builder for ChangeTopLevelUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChangeTopLevelUnitChangeBuilder of(final ChangeTopLevelUnitChange template) { + ChangeTopLevelUnitChangeBuilder builder = new ChangeTopLevelUnitChangeBuilder(); + 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/ChangeTopLevelUnitChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeImpl.java new file mode 100644 index 00000000000..de1a9e9f93d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeImpl.java @@ -0,0 +1,144 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                        Change triggered by the following update actions:

                                        + * + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChangeTopLevelUnitChangeImpl implements ChangeTopLevelUnitChange, 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 + ChangeTopLevelUnitChangeImpl(@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_TOP_LEVEL_UNIT_CHANGE; + } + + /** + * create empty instance + */ + public ChangeTopLevelUnitChangeImpl() { + this.type = CHANGE_TOP_LEVEL_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; + + ChangeTopLevelUnitChangeImpl that = (ChangeTopLevelUnitChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ChangeTopLevelUnitChange copyDeep() { + return ChangeTopLevelUnitChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChange.java new file mode 100644 index 00000000000..34c59b44019 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChange.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.ProductVariantExclusion; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                        Change triggered by the Exclude Product update action.

                                        + * + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ExcludeProductChange excludeProductChange = ExcludeProductChange.builder()
                                        + *             .change("{change}")
                                        + *             .variantExclusion(variantExclusionBuilder -> variantExclusionBuilder)
                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                        + *             .build()
                                        + * 
                                        + *
                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("ExcludeProductChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ExcludeProductChangeImpl.class) +public interface ExcludeProductChange extends Change { + + /** + * discriminator value for ExcludeProductChange + */ + String EXCLUDE_PRODUCT_CHANGE = "ExcludeProductChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                        + * @return variantExclusion + */ + @NotNull + @Valid + @JsonProperty("variantExclusion") + public ProductVariantExclusion getVariantExclusion(); + + /** + *

                                        Value after the change.

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

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                        + * @param variantExclusion value to be set + */ + + public void setVariantExclusion(final ProductVariantExclusion variantExclusion); + + /** + *

                                        Value after the change.

                                        + * @param nextValue value to be set + */ + + public void setNextValue(final Reference nextValue); + + /** + * factory method + * @return instance of ExcludeProductChange + */ + public static ExcludeProductChange of() { + return new ExcludeProductChangeImpl(); + } + + /** + * factory method to create a shallow copy ExcludeProductChange + * @param template instance to be copied + * @return copy instance + */ + public static ExcludeProductChange of(final ExcludeProductChange template) { + ExcludeProductChangeImpl instance = new ExcludeProductChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariantExclusion(template.getVariantExclusion()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ExcludeProductChange copyDeep(); + + /** + * factory method to create a deep copy of ExcludeProductChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ExcludeProductChange deepCopy(@Nullable final ExcludeProductChange template) { + if (template == null) { + return null; + } + ExcludeProductChangeImpl instance = new ExcludeProductChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariantExclusion( + com.commercetools.history.models.common.ProductVariantExclusion.deepCopy(template.getVariantExclusion())); + instance.setNextValue(com.commercetools.history.models.common.Reference.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ExcludeProductChange + * @return builder + */ + public static ExcludeProductChangeBuilder builder() { + return ExcludeProductChangeBuilder.of(); + } + + /** + * create builder for ExcludeProductChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExcludeProductChangeBuilder builder(final ExcludeProductChange template) { + return ExcludeProductChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withExcludeProductChange(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/ExcludeProductChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChangeBuilder.java new file mode 100644 index 00000000000..006bc23a433 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChangeBuilder.java @@ -0,0 +1,173 @@ + +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; + +/** + * ExcludeProductChangeBuilder + *
                                        + * Example to create an instance using the builder pattern + *
                                        + *
                                        
                                        + *     ExcludeProductChange excludeProductChange = ExcludeProductChange.builder()
                                        + *             .change("{change}")
                                        + *             .variantExclusion(variantExclusionBuilder -> variantExclusionBuilder)
                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                        + *             .build()
                                        + * 
                                        + *
                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExcludeProductChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ProductVariantExclusion variantExclusion; + + private com.commercetools.history.models.common.Reference nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ExcludeProductChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

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

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

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

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

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

                                        Value after the change.

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

                                        Value after the change.

                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public ExcludeProductChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                        + * @return variantExclusion + */ + + public com.commercetools.history.models.common.ProductVariantExclusion getVariantExclusion() { + return this.variantExclusion; + } + + /** + *

                                        Value after the change.

                                        + * @return nextValue + */ + + public com.commercetools.history.models.common.Reference getNextValue() { + return this.nextValue; + } + + /** + * builds ExcludeProductChange with checking for non-null required values + * @return ExcludeProductChange + */ + public ExcludeProductChange build() { + Objects.requireNonNull(change, ExcludeProductChange.class + ": change is missing"); + Objects.requireNonNull(variantExclusion, ExcludeProductChange.class + ": variantExclusion is missing"); + Objects.requireNonNull(nextValue, ExcludeProductChange.class + ": nextValue is missing"); + return new ExcludeProductChangeImpl(change, variantExclusion, nextValue); + } + + /** + * builds ExcludeProductChange without checking for non-null required values + * @return ExcludeProductChange + */ + public ExcludeProductChange buildUnchecked() { + return new ExcludeProductChangeImpl(change, variantExclusion, nextValue); + } + + /** + * factory method for an instance of ExcludeProductChangeBuilder + * @return builder + */ + public static ExcludeProductChangeBuilder of() { + return new ExcludeProductChangeBuilder(); + } + + /** + * create builder for ExcludeProductChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExcludeProductChangeBuilder of(final ExcludeProductChange template) { + ExcludeProductChangeBuilder builder = new ExcludeProductChangeBuilder(); + builder.change = template.getChange(); + builder.variantExclusion = template.getVariantExclusion(); + builder.nextValue = template.getNextValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChangeImpl.java new file mode 100644 index 00000000000..47917171449 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ExcludeProductChangeImpl.java @@ -0,0 +1,141 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                        Change triggered by the Exclude Product update action.

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

                                        Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                        + */ + + public com.commercetools.history.models.common.ProductVariantExclusion getVariantExclusion() { + return this.variantExclusion; + } + + /** + *

                                        Value after the change.

                                        + */ + + public com.commercetools.history.models.common.Reference getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setVariantExclusion( + final com.commercetools.history.models.common.ProductVariantExclusion variantExclusion) { + this.variantExclusion = variantExclusion; + } + + public void setNextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ExcludeProductChangeImpl that = (ExcludeProductChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(variantExclusion, that.variantExclusion) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(variantExclusion, that.variantExclusion) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(variantExclusion) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("variantExclusion", variantExclusion) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ExcludeProductChange copyDeep() { + return ExcludeProductChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChange.java index f8d2acf0e8c..50764bfca40 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChange.java @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -78,6 +79,7 @@ public interface MoveImageToPositionChange extends Change { public List getNextValue(); /** + *

                                        Product data that was updated.

                                        *
                                          *
                                        • staged, if the staged ProductCatalogData was updated.
                                        • *
                                        • current, if the current ProductCatalogData was updated.
                                        • @@ -88,6 +90,15 @@ public interface MoveImageToPositionChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                          Identifier of the updated Product Variant.

                                          + *

                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                          + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -126,6 +137,7 @@ public interface MoveImageToPositionChange extends Change { public void setNextValue(final List nextValue); /** + *

                                          Product data that was updated.

                                          *
                                            *
                                          • staged, if the staged ProductCatalogData was updated.
                                          • *
                                          • current, if the current ProductCatalogData was updated.
                                          • @@ -135,6 +147,14 @@ public interface MoveImageToPositionChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                            Identifier of the updated Product Variant.

                                            + *

                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                            + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of MoveImageToPositionChange @@ -154,6 +174,7 @@ public static MoveImageToPositionChange of(final MoveImageToPositionChange templ instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -182,6 +203,7 @@ public static MoveImageToPositionChange deepCopy(@Nullable final MoveImageToPosi .collect(Collectors.toList())) .orElse(null)); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeBuilder.java index 8cd87884e68..7a81804036f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +34,8 @@ public class MoveImageToPositionChangeBuilder implements BuilderProduct data that was updated.

                                            *
                                              *
                                            • staged, if the staged ProductCatalogData was updated.
                                            • *
                                            • current, if the current ProductCatalogData was updated.
                                            • @@ -236,6 +240,18 @@ public MoveImageToPositionChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                              Identifier of the updated Product Variant.

                                              + *

                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                              + * @param variant value to be set + * @return Builder + */ + + public MoveImageToPositionChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -264,6 +280,7 @@ public java.util.List getNextValu } /** + *

                                              Product data that was updated.

                                              *
                                                *
                                              • staged, if the staged ProductCatalogData was updated.
                                              • *
                                              • current, if the current ProductCatalogData was updated.
                                              • @@ -275,6 +292,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                Identifier of the updated Product Variant.

                                                + *

                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds MoveImageToPositionChange with checking for non-null required values * @return MoveImageToPositionChange @@ -284,7 +311,8 @@ public MoveImageToPositionChange build() { Objects.requireNonNull(previousValue, MoveImageToPositionChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, MoveImageToPositionChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, MoveImageToPositionChange.class + ": catalogData is missing"); - return new MoveImageToPositionChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, MoveImageToPositionChange.class + ": variant is missing"); + return new MoveImageToPositionChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -292,7 +320,7 @@ public MoveImageToPositionChange build() { * @return MoveImageToPositionChange */ public MoveImageToPositionChange buildUnchecked() { - return new MoveImageToPositionChangeImpl(change, previousValue, nextValue, catalogData); + return new MoveImageToPositionChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -314,6 +342,7 @@ public static MoveImageToPositionChangeBuilder of(final MoveImageToPositionChang builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeImpl.java index c67681bd3a7..cc20792421c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeImpl.java @@ -32,6 +32,8 @@ public class MoveImageToPositionChangeImpl implements MoveImageToPositionChange, private String catalogData; + private String variant; + /** * create instance with all properties */ @@ -39,11 +41,12 @@ public class MoveImageToPositionChangeImpl implements MoveImageToPositionChange, MoveImageToPositionChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = MOVE_IMAGE_TO_POSITION_CHANGE; } @@ -87,6 +90,7 @@ public java.util.List getNextValu } /** + *

                                                Product data that was updated.

                                                *
                                                  *
                                                • staged, if the staged ProductCatalogData was updated.
                                                • *
                                                • current, if the current ProductCatalogData was updated.
                                                • @@ -97,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -121,6 +134,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -136,11 +153,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -151,6 +170,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -161,6 +181,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChange.java index 0bf5b61b64f..43b0492462f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChange.java @@ -30,6 +30,8 @@ * RemoveAssetChange removeAssetChange = RemoveAssetChange.builder() * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -69,6 +71,27 @@ public interface RemoveAssetChange extends Change { @JsonProperty("previousValue") public Asset getPreviousValue(); + /** + *

                                                  Product data that was updated.

                                                  + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -83,6 +106,25 @@ public interface RemoveAssetChange extends Change { public void setPreviousValue(final Asset previousValue); + /** + *

                                                  Product data that was updated.

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

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of RemoveAssetChange @@ -100,6 +142,8 @@ public static RemoveAssetChange of(final RemoveAssetChange template) { RemoveAssetChangeImpl instance = new RemoveAssetChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -118,6 +162,8 @@ public static RemoveAssetChange deepCopy(@Nullable final RemoveAssetChange templ RemoveAssetChangeImpl instance = new RemoveAssetChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue(com.commercetools.history.models.common.Asset.deepCopy(template.getPreviousValue())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeBuilder.java index e1aa4bf5928..93a9db5145d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeBuilder.java @@ -16,6 +16,8 @@ * RemoveAssetChange removeAssetChange = RemoveAssetChange.builder() * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -27,6 +29,10 @@ public class RemoveAssetChangeBuilder implements Builder { private com.commercetools.history.models.common.Asset previousValue; + private String catalogData; + + private String variant; + /** * set the value to the change * @param change value to be set @@ -73,6 +79,33 @@ public RemoveAssetChangeBuilder previousValue(final com.commercetools.history.mo return this; } + /** + *

                                                  Product data that was updated.

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

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + * @param variant value to be set + * @return Builder + */ + + public RemoveAssetChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -91,6 +124,29 @@ public com.commercetools.history.models.common.Asset getPreviousValue() { return this.previousValue; } + /** + *

                                                  Product data that was updated.

                                                  + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds RemoveAssetChange with checking for non-null required values * @return RemoveAssetChange @@ -98,7 +154,9 @@ public com.commercetools.history.models.common.Asset getPreviousValue() { public RemoveAssetChange build() { Objects.requireNonNull(change, RemoveAssetChange.class + ": change is missing"); Objects.requireNonNull(previousValue, RemoveAssetChange.class + ": previousValue is missing"); - return new RemoveAssetChangeImpl(change, previousValue); + Objects.requireNonNull(catalogData, RemoveAssetChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, RemoveAssetChange.class + ": variant is missing"); + return new RemoveAssetChangeImpl(change, previousValue, catalogData, variant); } /** @@ -106,7 +164,7 @@ public RemoveAssetChange build() { * @return RemoveAssetChange */ public RemoveAssetChange buildUnchecked() { - return new RemoveAssetChangeImpl(change, previousValue); + return new RemoveAssetChangeImpl(change, previousValue, catalogData, variant); } /** @@ -126,6 +184,8 @@ public static RemoveAssetChangeBuilder of(final RemoveAssetChange template) { RemoveAssetChangeBuilder builder = new RemoveAssetChangeBuilder(); builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeImpl.java index 6bbf168bccc..4e91af00d17 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveAssetChangeImpl.java @@ -32,14 +32,21 @@ public class RemoveAssetChangeImpl implements RemoveAssetChange, ModelBase { private com.commercetools.history.models.common.Asset previousValue; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @JsonCreator RemoveAssetChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Asset previousValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.Asset previousValue, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; + this.catalogData = catalogData; + this.variant = variant; this.type = REMOVE_ASSET_CHANGE; } @@ -74,6 +81,27 @@ public com.commercetools.history.models.common.Asset getPreviousValue() { return this.previousValue; } + /** + *

                                                  Product data that was updated.

                                                  + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                  Identifier of the updated Product Variant.

                                                  + *

                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                  + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -82,6 +110,14 @@ public void setPreviousValue(final com.commercetools.history.models.common.Asset this.previousValue = previousValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -95,15 +131,24 @@ public boolean equals(Object o) { return new EqualsBuilder().append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(change).append(previousValue).toHashCode(); + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(previousValue) + .append(catalogData) + .append(variant) + .toHashCode(); } @Override @@ -111,6 +156,8 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) .append("change", change) .append("previousValue", previousValue) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } 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 index c85ff61fe38..2d38fc53e79 100644 --- 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 @@ -33,6 +33,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("RemoveAssociateChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = RemoveAssociateChangeImpl.class) +@Deprecated public interface RemoveAssociateChange extends Change { /** 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 index e921ff0eade..e47273dca4a 100644 --- 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 @@ -21,6 +21,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveAssociateChangeBuilder implements Builder { private String change; 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 index 0b746a5825d..b56b6d48e6d 100644 --- 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 @@ -20,6 +20,7 @@ *

                                                  Change triggered by the Remove Associate update action.

                                                  */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveAssociateChangeImpl implements RemoveAssociateChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChange.java index 0fd5ea12dfc..33dda921b39 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.Delivery; +import com.commercetools.history.models.change_value.DeliveryChangeValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -63,7 +63,7 @@ public interface RemoveDeliveryItemsChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public Delivery getPreviousValue(); + public DeliveryChangeValue getPreviousValue(); /** * set change @@ -77,7 +77,7 @@ public interface RemoveDeliveryItemsChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final Delivery previousValue); + public void setPreviousValue(final DeliveryChangeValue previousValue); /** * factory method @@ -114,7 +114,7 @@ public static RemoveDeliveryItemsChange deepCopy(@Nullable final RemoveDeliveryI RemoveDeliveryItemsChangeImpl instance = new RemoveDeliveryItemsChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.Delivery.deepCopy(template.getPreviousValue())); + com.commercetools.history.models.change_value.DeliveryChangeValue.deepCopy(template.getPreviousValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeBuilder.java index 4d9454ab31d..749268c6876 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeBuilder.java @@ -25,7 +25,7 @@ public class RemoveDeliveryItemsChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of()).build(); + Function builder) { + this.previousValue = builder + .apply(com.commercetools.history.models.change_value.DeliveryChangeValueBuilder.of()) + .build(); return this; } @@ -57,8 +59,9 @@ public RemoveDeliveryItemsChangeBuilder previousValue( */ public RemoveDeliveryItemsChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of()); + Function builder) { + this.previousValue = builder + .apply(com.commercetools.history.models.change_value.DeliveryChangeValueBuilder.of()); return this; } @@ -69,7 +72,7 @@ public RemoveDeliveryItemsChangeBuilder withPreviousValue( */ public RemoveDeliveryItemsChangeBuilder previousValue( - final com.commercetools.history.models.common.Delivery previousValue) { + final com.commercetools.history.models.change_value.DeliveryChangeValue previousValue) { this.previousValue = previousValue; return this; } @@ -88,7 +91,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.Delivery getPreviousValue() { + public com.commercetools.history.models.change_value.DeliveryChangeValue getPreviousValue() { return this.previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeImpl.java index dbd6846b696..4f50e49fa9c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeImpl.java @@ -26,14 +26,14 @@ public class RemoveDeliveryItemsChangeImpl implements RemoveDeliveryItemsChange, private String change; - private com.commercetools.history.models.common.Delivery previousValue; + private com.commercetools.history.models.change_value.DeliveryChangeValue previousValue; /** * create instance with all properties */ @JsonCreator RemoveDeliveryItemsChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Delivery previousValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.change_value.DeliveryChangeValue previousValue) { this.change = change; this.previousValue = previousValue; this.type = REMOVE_DELIVERY_ITEMS_CHANGE; @@ -66,7 +66,7 @@ public String getChange() { *

                                                  Value before the change.

                                                  */ - public com.commercetools.history.models.common.Delivery getPreviousValue() { + public com.commercetools.history.models.change_value.DeliveryChangeValue getPreviousValue() { return this.previousValue; } @@ -74,7 +74,8 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.Delivery previousValue) { + public void setPreviousValue( + final com.commercetools.history.models.change_value.DeliveryChangeValue previousValue) { this.previousValue = previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChange.java index c9fccb9996b..48ed83ad21a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.EnumValue; +import com.commercetools.history.models.common.AttributePlainEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface RemoveEnumValuesChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public EnumValue getPreviousValue(); + public AttributePlainEnumValue getPreviousValue(); /** *

                                                  Name of the updated AttributeDefinition.

                                                  @@ -86,7 +86,7 @@ public interface RemoveEnumValuesChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final EnumValue previousValue); + public void setPreviousValue(final AttributePlainEnumValue previousValue); /** *

                                                  Name of the updated AttributeDefinition.

                                                  @@ -131,7 +131,7 @@ public static RemoveEnumValuesChange deepCopy(@Nullable final RemoveEnumValuesCh RemoveEnumValuesChangeImpl instance = new RemoveEnumValuesChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.change_value.EnumValue.deepCopy(template.getPreviousValue())); + com.commercetools.history.models.common.AttributePlainEnumValue.deepCopy(template.getPreviousValue())); instance.setAttributeName(template.getAttributeName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeBuilder.java index 93a279fbf5b..dc8c1530f38 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeBuilder.java @@ -26,7 +26,7 @@ public class RemoveEnumValuesChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()) + .build(); return this; } @@ -60,8 +61,8 @@ public RemoveEnumValuesChangeBuilder previousValue( */ public RemoveEnumValuesChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.change_value.EnumValueBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AttributePlainEnumValueBuilder.of()); return this; } @@ -72,7 +73,7 @@ public RemoveEnumValuesChangeBuilder withPreviousValue( */ public RemoveEnumValuesChangeBuilder previousValue( - final com.commercetools.history.models.change_value.EnumValue previousValue) { + final com.commercetools.history.models.common.AttributePlainEnumValue previousValue) { this.previousValue = previousValue; return this; } @@ -102,7 +103,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.change_value.EnumValue getPreviousValue() { + public com.commercetools.history.models.common.AttributePlainEnumValue getPreviousValue() { return this.previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeImpl.java index 7c94065b8d2..b7ca42b8504 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeImpl.java @@ -26,7 +26,7 @@ public class RemoveEnumValuesChangeImpl implements RemoveEnumValuesChange, Model private String change; - private com.commercetools.history.models.change_value.EnumValue previousValue; + private com.commercetools.history.models.common.AttributePlainEnumValue previousValue; private String attributeName; @@ -35,7 +35,7 @@ public class RemoveEnumValuesChangeImpl implements RemoveEnumValuesChange, Model */ @JsonCreator RemoveEnumValuesChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.change_value.EnumValue previousValue, + @JsonProperty("previousValue") final com.commercetools.history.models.common.AttributePlainEnumValue previousValue, @JsonProperty("attributeName") final String attributeName) { this.change = change; this.previousValue = previousValue; @@ -70,7 +70,7 @@ public String getChange() { *

                                                  Value before the change.

                                                  */ - public com.commercetools.history.models.change_value.EnumValue getPreviousValue() { + public com.commercetools.history.models.common.AttributePlainEnumValue getPreviousValue() { return this.previousValue; } @@ -86,7 +86,7 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.change_value.EnumValue previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.AttributePlainEnumValue previousValue) { this.previousValue = previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChange.java index 8e9d8688c4e..f4fa9c0b7c0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChange.java @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .category(categoryBuilder -> categoryBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -86,6 +87,18 @@ public interface RemoveFromCategoryChange extends Change { @JsonProperty("category") public Reference getCategory(); + /** + *

                                                  Product data that was updated.

                                                  + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -130,6 +143,17 @@ public interface RemoveFromCategoryChange extends Change { public void setCategory(final Reference category); + /** + *

                                                  Product data that was updated.

                                                  + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of RemoveFromCategoryChange @@ -149,6 +173,7 @@ public static RemoveFromCategoryChange of(final RemoveFromCategoryChange templat instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCategory(template.getCategory()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -177,6 +202,7 @@ public static RemoveFromCategoryChange deepCopy(@Nullable final RemoveFromCatego .collect(Collectors.toList())) .orElse(null)); instance.setCategory(com.commercetools.history.models.common.Reference.deepCopy(template.getCategory())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeBuilder.java index a83234f4558..59f7a46a521 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .category(categoryBuilder -> categoryBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -33,6 +34,8 @@ public class RemoveFromCategoryChangeBuilder implements Builder builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -105,34 +108,12 @@ public RemoveFromCategoryChangeBuilder plusPreviousValue( */ public RemoveFromCategoryChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                  Value before the change.

                                                  - * @param builder function to build the previousValue value - * @return Builder - */ - - public RemoveFromCategoryChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                  Value before the change.

                                                  - * @param builder function to build the previousValue value - * @return Builder - */ - - public RemoveFromCategoryChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                  Value after the change.

                                                  * @param nextValue value to be set @@ -179,7 +160,7 @@ public RemoveFromCategoryChangeBuilder plusNextValue( */ public RemoveFromCategoryChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -194,43 +175,20 @@ public RemoveFromCategoryChangeBuilder plusNextValue( */ public RemoveFromCategoryChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                  Value after the change.

                                                  - * @param builder function to build the nextValue value - * @return Builder - */ - - public RemoveFromCategoryChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                  Value after the change.

                                                  - * @param builder function to build the nextValue value - * @return Builder - */ - - public RemoveFromCategoryChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                  Category from which the Product was removed.

                                                  - * @param builder function to build the category value + * @param category value to be set * @return Builder */ - public RemoveFromCategoryChangeBuilder category( - Function builder) { - this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public RemoveFromCategoryChangeBuilder category(final com.commercetools.history.models.common.Reference category) { + this.category = category; return this; } @@ -240,20 +198,24 @@ public RemoveFromCategoryChangeBuilder category( * @return Builder */ - public RemoveFromCategoryChangeBuilder withCategory( - Function builder) { - this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public RemoveFromCategoryChangeBuilder category( + Function> builder) { + this.category = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                  Category from which the Product was removed.

                                                  - * @param category value to be set + *

                                                  Product data that was updated.

                                                  + * + * @param catalogData value to be set * @return Builder */ - public RemoveFromCategoryChangeBuilder category(final com.commercetools.history.models.common.Reference category) { - this.category = category; + public RemoveFromCategoryChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; return this; } @@ -293,6 +255,19 @@ public com.commercetools.history.models.common.Reference getCategory() { return this.category; } + /** + *

                                                  Product data that was updated.

                                                  + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds RemoveFromCategoryChange with checking for non-null required values * @return RemoveFromCategoryChange @@ -302,7 +277,8 @@ public RemoveFromCategoryChange build() { Objects.requireNonNull(previousValue, RemoveFromCategoryChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, RemoveFromCategoryChange.class + ": nextValue is missing"); Objects.requireNonNull(category, RemoveFromCategoryChange.class + ": category is missing"); - return new RemoveFromCategoryChangeImpl(change, previousValue, nextValue, category); + Objects.requireNonNull(catalogData, RemoveFromCategoryChange.class + ": catalogData is missing"); + return new RemoveFromCategoryChangeImpl(change, previousValue, nextValue, category, catalogData); } /** @@ -310,7 +286,7 @@ public RemoveFromCategoryChange build() { * @return RemoveFromCategoryChange */ public RemoveFromCategoryChange buildUnchecked() { - return new RemoveFromCategoryChangeImpl(change, previousValue, nextValue, category); + return new RemoveFromCategoryChangeImpl(change, previousValue, nextValue, category, catalogData); } /** @@ -332,6 +308,7 @@ public static RemoveFromCategoryChangeBuilder of(final RemoveFromCategoryChange builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.category = template.getCategory(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeImpl.java index d2614a020d1..5d910aef126 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeImpl.java @@ -32,6 +32,8 @@ public class RemoveFromCategoryChangeImpl implements RemoveFromCategoryChange, M private com.commercetools.history.models.common.Reference category; + private String catalogData; + /** * create instance with all properties */ @@ -39,11 +41,13 @@ public class RemoveFromCategoryChangeImpl implements RemoveFromCategoryChange, M RemoveFromCategoryChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("category") final com.commercetools.history.models.common.Reference category) { + @JsonProperty("category") final com.commercetools.history.models.common.Reference category, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.category = category; + this.catalogData = catalogData; this.type = REMOVE_FROM_CATEGORY_CHANGE; } @@ -94,6 +98,18 @@ public com.commercetools.history.models.common.Reference getCategory() { return this.category; } + /** + *

                                                  Product data that was updated.

                                                  + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -119,6 +135,10 @@ public void setCategory(final com.commercetools.history.models.common.Reference this.category = category; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -134,11 +154,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(category, that.category) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(category, that.category) + .append(catalogData, that.catalogData) .isEquals(); } @@ -149,6 +171,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(category) + .append(catalogData) .toHashCode(); } @@ -159,6 +182,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("category", category) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChange.java index a29c04c412f..c5869ab16a9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChange.java @@ -29,6 +29,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -78,6 +79,7 @@ public interface RemoveImageChange extends Change { public List getNextValue(); /** + *

                                                  Product data that was updated.

                                                  *
                                                    *
                                                  • staged, if the staged ProductCatalogData was updated.
                                                  • *
                                                  • current, if the current ProductCatalogData was updated.
                                                  • @@ -88,6 +90,15 @@ public interface RemoveImageChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                    Identifier of the updated Product Variant.

                                                    + *

                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                    + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -126,6 +137,7 @@ public interface RemoveImageChange extends Change { public void setNextValue(final List nextValue); /** + *

                                                    Product data that was updated.

                                                    *
                                                      *
                                                    • staged, if the staged ProductCatalogData was updated.
                                                    • *
                                                    • current, if the current ProductCatalogData was updated.
                                                    • @@ -135,6 +147,14 @@ public interface RemoveImageChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                      Identifier of the updated Product Variant.

                                                      + *

                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                      + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of RemoveImageChange @@ -154,6 +174,7 @@ public static RemoveImageChange of(final RemoveImageChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -182,6 +203,7 @@ public static RemoveImageChange deepCopy(@Nullable final RemoveImageChange templ .collect(Collectors.toList())) .orElse(null)); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeBuilder.java index 0eb11d4f486..06d1ce33c71 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +34,8 @@ public class RemoveImageChangeBuilder implements Builder { private String catalogData; + private String variant; + /** * set the value to the change * @param change value to be set @@ -221,6 +224,7 @@ public RemoveImageChangeBuilder setNextValue( } /** + *

                                                      Product data that was updated.

                                                      *
                                                        *
                                                      • staged, if the staged ProductCatalogData was updated.
                                                      • *
                                                      • current, if the current ProductCatalogData was updated.
                                                      • @@ -234,6 +238,18 @@ public RemoveImageChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                                        Identifier of the updated Product Variant.

                                                        + *

                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                        + * @param variant value to be set + * @return Builder + */ + + public RemoveImageChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -262,6 +278,7 @@ public java.util.List getNextValu } /** + *

                                                        Product data that was updated.

                                                        *
                                                          *
                                                        • staged, if the staged ProductCatalogData was updated.
                                                        • *
                                                        • current, if the current ProductCatalogData was updated.
                                                        • @@ -273,6 +290,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                          Identifier of the updated Product Variant.

                                                          + *

                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                          + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds RemoveImageChange with checking for non-null required values * @return RemoveImageChange @@ -282,7 +309,8 @@ public RemoveImageChange build() { Objects.requireNonNull(previousValue, RemoveImageChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, RemoveImageChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, RemoveImageChange.class + ": catalogData is missing"); - return new RemoveImageChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, RemoveImageChange.class + ": variant is missing"); + return new RemoveImageChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -290,7 +318,7 @@ public RemoveImageChange build() { * @return RemoveImageChange */ public RemoveImageChange buildUnchecked() { - return new RemoveImageChangeImpl(change, previousValue, nextValue, catalogData); + return new RemoveImageChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -312,6 +340,7 @@ public static RemoveImageChangeBuilder of(final RemoveImageChange template) { builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeImpl.java index 17af8344009..beb02070ae3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveImageChangeImpl.java @@ -32,6 +32,8 @@ public class RemoveImageChangeImpl implements RemoveImageChange, ModelBase { private String catalogData; + private String variant; + /** * create instance with all properties */ @@ -39,11 +41,12 @@ public class RemoveImageChangeImpl implements RemoveImageChange, ModelBase { RemoveImageChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = REMOVE_IMAGE_CHANGE; } @@ -87,6 +90,7 @@ public java.util.List getNextValu } /** + *

                                                          Product data that was updated.

                                                          *
                                                            *
                                                          • staged, if the staged ProductCatalogData was updated.
                                                          • *
                                                          • current, if the current ProductCatalogData was updated.
                                                          • @@ -97,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                            Identifier of the updated Product Variant.

                                                            + *

                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                            + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -121,6 +134,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -136,11 +153,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -151,6 +170,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -161,6 +181,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChange.java index c7fb7f25948..b5170ae8ef0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                            Change triggered by the Remove Associate update action on a parent of a Business Unit in cases where inheritance applies.

                                                            + *

                                                            This change is initiated by background processes after the Remove Associate update action is performed (if Associates are inherited).

                                                            * *
                                                            * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChangeImpl.java index 5ee858af1f0..8f57bd0d578 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveInheritedAssociateChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                            Change triggered by the Remove Associate update action on a parent of a Business Unit in cases where inheritance applies.

                                                            + *

                                                            This change is initiated by background processes after the Remove Associate update action is performed (if Associates are inherited).

                                                            */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class RemoveInheritedAssociateChangeImpl implements RemoveInheritedAssociateChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChange.java index 30d821748bb..82ba8aa9d8a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.LocalizedEnumValue; +import com.commercetools.history.models.common.AttributeLocalizedEnumValue; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface RemoveLocalizedEnumValuesChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public LocalizedEnumValue getPreviousValue(); + public AttributeLocalizedEnumValue getPreviousValue(); /** *

                                                            Name of the updated AttributeDefinition.

                                                            @@ -86,7 +86,7 @@ public interface RemoveLocalizedEnumValuesChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final LocalizedEnumValue previousValue); + public void setPreviousValue(final AttributeLocalizedEnumValue previousValue); /** *

                                                            Name of the updated AttributeDefinition.

                                                            @@ -131,7 +131,7 @@ public static RemoveLocalizedEnumValuesChange deepCopy(@Nullable final RemoveLoc RemoveLocalizedEnumValuesChangeImpl instance = new RemoveLocalizedEnumValuesChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.change_value.LocalizedEnumValue.deepCopy(template.getPreviousValue())); + com.commercetools.history.models.common.AttributeLocalizedEnumValue.deepCopy(template.getPreviousValue())); instance.setAttributeName(template.getAttributeName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeBuilder.java index 450be0d3169..784379c9643 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeBuilder.java @@ -26,7 +26,7 @@ public class RemoveLocalizedEnumValuesChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()) + Function builder) { + this.previousValue = builder + .apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()) .build(); return this; } @@ -61,9 +62,9 @@ public RemoveLocalizedEnumValuesChangeBuilder previousValue( */ public RemoveLocalizedEnumValuesChangeBuilder withPreviousValue( - Function builder) { + Function builder) { this.previousValue = builder - .apply(com.commercetools.history.models.change_value.LocalizedEnumValueBuilder.of()); + .apply(com.commercetools.history.models.common.AttributeLocalizedEnumValueBuilder.of()); return this; } @@ -74,7 +75,7 @@ public RemoveLocalizedEnumValuesChangeBuilder withPreviousValue( */ public RemoveLocalizedEnumValuesChangeBuilder previousValue( - final com.commercetools.history.models.change_value.LocalizedEnumValue previousValue) { + final com.commercetools.history.models.common.AttributeLocalizedEnumValue previousValue) { this.previousValue = previousValue; return this; } @@ -104,7 +105,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.change_value.LocalizedEnumValue getPreviousValue() { + public com.commercetools.history.models.common.AttributeLocalizedEnumValue getPreviousValue() { return this.previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeImpl.java index 68e0b365a7b..d7354b1ea11 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeImpl.java @@ -26,7 +26,7 @@ public class RemoveLocalizedEnumValuesChangeImpl implements RemoveLocalizedEnumV private String change; - private com.commercetools.history.models.change_value.LocalizedEnumValue previousValue; + private com.commercetools.history.models.common.AttributeLocalizedEnumValue previousValue; private String attributeName; @@ -35,7 +35,7 @@ public class RemoveLocalizedEnumValuesChangeImpl implements RemoveLocalizedEnumV */ @JsonCreator RemoveLocalizedEnumValuesChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.change_value.LocalizedEnumValue previousValue, + @JsonProperty("previousValue") final com.commercetools.history.models.common.AttributeLocalizedEnumValue previousValue, @JsonProperty("attributeName") final String attributeName) { this.change = change; this.previousValue = previousValue; @@ -70,7 +70,7 @@ public String getChange() { *

                                                            Value before the change.

                                                            */ - public com.commercetools.history.models.change_value.LocalizedEnumValue getPreviousValue() { + public com.commercetools.history.models.common.AttributeLocalizedEnumValue getPreviousValue() { return this.previousValue; } @@ -86,7 +86,8 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.change_value.LocalizedEnumValue previousValue) { + public void setPreviousValue( + final com.commercetools.history.models.common.AttributeLocalizedEnumValue previousValue) { this.previousValue = previousValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChange.java index 16fbbdef914..821dae41917 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChange.java @@ -29,6 +29,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() * * @@ -36,6 +37,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("RemovePriceChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = RemovePriceChangeImpl.class) +@Deprecated public interface RemovePriceChange extends Change { /** @@ -78,6 +80,7 @@ public interface RemovePriceChange extends Change { public Price getNextValue(); /** + *

                                                            Product data that was updated.

                                                            *
                                                              *
                                                            • staged, if the staged ProductCatalogData was updated.
                                                            • *
                                                            • current, if the current ProductCatalogData was updated.
                                                            • @@ -96,6 +99,15 @@ public interface RemovePriceChange extends Change { @JsonProperty("priceId") public String getPriceId(); + /** + *

                                                              Identifier of the updated Product Variant.

                                                              + *

                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                              + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -118,6 +130,7 @@ public interface RemovePriceChange extends Change { public void setNextValue(final Price nextValue); /** + *

                                                              Product data that was updated.

                                                              *
                                                                *
                                                              • staged, if the staged ProductCatalogData was updated.
                                                              • *
                                                              • current, if the current ProductCatalogData was updated.
                                                              • @@ -134,6 +147,14 @@ public interface RemovePriceChange extends Change { public void setPriceId(final String priceId); + /** + *

                                                                Identifier of the updated Product Variant.

                                                                + *

                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of RemovePriceChange @@ -154,6 +175,7 @@ public static RemovePriceChange of(final RemovePriceChange template) { instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } @@ -175,6 +197,7 @@ public static RemovePriceChange deepCopy(@Nullable final RemovePriceChange templ instance.setNextValue(com.commercetools.history.models.common.Price.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); instance.setPriceId(template.getPriceId()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeBuilder.java index d679bdf5efe..5d10a10d619 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeBuilder.java @@ -19,11 +19,13 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .priceId("{priceId}") + * .variant("{variant}") * .build() * * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemovePriceChangeBuilder implements Builder { private String change; @@ -36,6 +38,8 @@ public class RemovePriceChangeBuilder implements Builder { private String priceId; + private String variant; + /** * set the value to the change * @param change value to be set @@ -118,6 +122,7 @@ public RemovePriceChangeBuilder nextValue(final com.commercetools.history.models } /** + *

                                                                Product data that was updated.

                                                                *
                                                                  *
                                                                • staged, if the staged ProductCatalogData was updated.
                                                                • *
                                                                • current, if the current ProductCatalogData was updated.
                                                                • @@ -142,6 +147,18 @@ public RemovePriceChangeBuilder priceId(final String priceId) { return this; } + /** + *

                                                                  Identifier of the updated Product Variant.

                                                                  + *

                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                  + * @param variant value to be set + * @return Builder + */ + + public RemovePriceChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -170,6 +187,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                                                                  Product data that was updated.

                                                                  *
                                                                    *
                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                  • *
                                                                  • current, if the current ProductCatalogData was updated.
                                                                  • @@ -190,6 +208,16 @@ public String getPriceId() { return this.priceId; } + /** + *

                                                                    Identifier of the updated Product Variant.

                                                                    + *

                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                    + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds RemovePriceChange with checking for non-null required values * @return RemovePriceChange @@ -200,7 +228,8 @@ public RemovePriceChange build() { Objects.requireNonNull(nextValue, RemovePriceChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, RemovePriceChange.class + ": catalogData is missing"); Objects.requireNonNull(priceId, RemovePriceChange.class + ": priceId is missing"); - return new RemovePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId); + Objects.requireNonNull(variant, RemovePriceChange.class + ": variant is missing"); + return new RemovePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId, variant); } /** @@ -208,7 +237,7 @@ public RemovePriceChange build() { * @return RemovePriceChange */ public RemovePriceChange buildUnchecked() { - return new RemovePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId); + return new RemovePriceChangeImpl(change, previousValue, nextValue, catalogData, priceId, variant); } /** @@ -231,6 +260,7 @@ public static RemovePriceChangeBuilder of(final RemovePriceChange template) { builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); builder.priceId = template.getPriceId(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeImpl.java index fb1a2a20efc..312feeee3ae 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemovePriceChangeImpl.java @@ -20,6 +20,7 @@ *

                                                                    Change triggered by the Remove Embedded Price update action.

                                                                    */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemovePriceChangeImpl implements RemovePriceChange, ModelBase { private String type; @@ -34,6 +35,8 @@ public class RemovePriceChangeImpl implements RemovePriceChange, ModelBase { private String priceId; + private String variant; + /** * create instance with all properties */ @@ -41,12 +44,14 @@ public class RemovePriceChangeImpl implements RemovePriceChange, ModelBase { RemovePriceChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Price previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.Price nextValue, - @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("priceId") final String priceId, + @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; this.priceId = priceId; + this.variant = variant; this.type = REMOVE_PRICE_CHANGE; } @@ -90,6 +95,7 @@ public com.commercetools.history.models.common.Price getNextValue() { } /** + *

                                                                    Product data that was updated.

                                                                    *
                                                                      *
                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                    • *
                                                                    • current, if the current ProductCatalogData was updated.
                                                                    • @@ -108,6 +114,15 @@ public String getPriceId() { return this.priceId; } + /** + *

                                                                      Identifier of the updated Product Variant.

                                                                      + *

                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                      + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -128,6 +143,10 @@ public void setPriceId(final String priceId) { this.priceId = priceId; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -144,12 +163,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(priceId, that.priceId) + .append(variant, that.variant) .isEquals(); } @@ -161,6 +182,7 @@ public int hashCode() { .append(nextValue) .append(catalogData) .append(priceId) + .append(variant) .toHashCode(); } @@ -172,6 +194,7 @@ public String toString() { .append("nextValue", nextValue) .append("catalogData", catalogData) .append("priceId", priceId) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductChangeBuilder.java index fb514c1738f..638bf070aee 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveProductChangeBuilder.java @@ -40,13 +40,13 @@ public RemoveProductChangeBuilder change(final String change) { /** *

                                                                      Value before the change.

                                                                      - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public RemoveProductChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -56,21 +56,9 @@ public RemoveProductChangeBuilder previousValue( * @return Builder */ - public RemoveProductChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                      Value before the change.

                                                                      - * @param previousValue value to be set - * @return Builder - */ - public RemoveProductChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } 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 index e88ebef98ee..005c543b4fb 100644 --- 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 @@ -33,6 +33,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("RemoveProductSelectionChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = RemoveProductSelectionChangeImpl.class) +@Deprecated public interface RemoveProductSelectionChange extends Change { /** 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 index 1dbf5be83cb..156e8aca1eb 100644 --- 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 @@ -21,6 +21,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveProductSelectionChangeBuilder implements Builder { private String change; 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 index 59b2f8a38a2..ac01260008c 100644 --- 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 @@ -20,6 +20,7 @@ *

                                                                      Change triggered by the Remove Product Selection update action.

                                                                      */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveProductSelectionChangeImpl implements RemoveProductSelectionChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChange.java new file mode 100644 index 00000000000..29bb6362ac5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChange.java @@ -0,0 +1,160 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.Shipping; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * RemoveShippingChange + * + *
                                                                      + * Example to create an instance using the builder pattern + *
                                                                      + *
                                                                      
                                                                      + *     RemoveShippingChange removeShippingChange = RemoveShippingChange.builder()
                                                                      + *             .change("{change}")
                                                                      + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                      + *             .build()
                                                                      + * 
                                                                      + *
                                                                      + */ +@io.vrap.rmf.base.client.utils.json.SubType("RemoveShippingChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RemoveShippingChangeImpl.class) +public interface RemoveShippingChange extends Change { + + /** + * discriminator value for RemoveShippingChange + */ + String REMOVE_SHIPPING_CHANGE = "RemoveShippingChange"; + + /** + * + * @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 Shipping 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 Shipping previousValue); + + /** + * factory method + * @return instance of RemoveShippingChange + */ + public static RemoveShippingChange of() { + return new RemoveShippingChangeImpl(); + } + + /** + * factory method to create a shallow copy RemoveShippingChange + * @param template instance to be copied + * @return copy instance + */ + public static RemoveShippingChange of(final RemoveShippingChange template) { + RemoveShippingChangeImpl instance = new RemoveShippingChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + return instance; + } + + public RemoveShippingChange copyDeep(); + + /** + * factory method to create a deep copy of RemoveShippingChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RemoveShippingChange deepCopy(@Nullable final RemoveShippingChange template) { + if (template == null) { + return null; + } + RemoveShippingChangeImpl instance = new RemoveShippingChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.Shipping.deepCopy(template.getPreviousValue())); + return instance; + } + + /** + * builder factory method for RemoveShippingChange + * @return builder + */ + public static RemoveShippingChangeBuilder builder() { + return RemoveShippingChangeBuilder.of(); + } + + /** + * create builder for RemoveShippingChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveShippingChangeBuilder builder(final RemoveShippingChange template) { + return RemoveShippingChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRemoveShippingChange(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/RemoveShippingChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChangeBuilder.java new file mode 100644 index 00000000000..af9d7288c43 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChangeBuilder.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; + +/** + * RemoveShippingChangeBuilder + *
                                                                      + * Example to create an instance using the builder pattern + *
                                                                      + *
                                                                      
                                                                      + *     RemoveShippingChange removeShippingChange = RemoveShippingChange.builder()
                                                                      + *             .change("{change}")
                                                                      + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                      + *             .build()
                                                                      + * 
                                                                      + *
                                                                      + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveShippingChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Shipping previousValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RemoveShippingChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                      Value before the change.

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

                                                                      Value before the change.

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

                                                                      Value before the change.

                                                                      + * @param previousValue value to be set + * @return Builder + */ + + public RemoveShippingChangeBuilder previousValue( + final com.commercetools.history.models.common.Shipping 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.Shipping getPreviousValue() { + return this.previousValue; + } + + /** + * builds RemoveShippingChange with checking for non-null required values + * @return RemoveShippingChange + */ + public RemoveShippingChange build() { + Objects.requireNonNull(change, RemoveShippingChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, RemoveShippingChange.class + ": previousValue is missing"); + return new RemoveShippingChangeImpl(change, previousValue); + } + + /** + * builds RemoveShippingChange without checking for non-null required values + * @return RemoveShippingChange + */ + public RemoveShippingChange buildUnchecked() { + return new RemoveShippingChangeImpl(change, previousValue); + } + + /** + * factory method for an instance of RemoveShippingChangeBuilder + * @return builder + */ + public static RemoveShippingChangeBuilder of() { + return new RemoveShippingChangeBuilder(); + } + + /** + * create builder for RemoveShippingChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RemoveShippingChangeBuilder of(final RemoveShippingChange template) { + RemoveShippingChangeBuilder builder = new RemoveShippingChangeBuilder(); + 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/RemoveShippingChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChangeImpl.java new file mode 100644 index 00000000000..9e9a4880ef1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShippingChangeImpl.java @@ -0,0 +1,117 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * RemoveShippingChange + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RemoveShippingChangeImpl implements RemoveShippingChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.Shipping previousValue; + + /** + * create instance with all properties + */ + @JsonCreator + RemoveShippingChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("previousValue") final com.commercetools.history.models.common.Shipping previousValue) { + this.change = change; + this.previousValue = previousValue; + this.type = REMOVE_SHIPPING_CHANGE; + } + + /** + * create empty instance + */ + public RemoveShippingChangeImpl() { + this.type = REMOVE_SHIPPING_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                      Value before the change.

                                                                      + */ + + public com.commercetools.history.models.common.Shipping getPreviousValue() { + return this.previousValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Shipping previousValue) { + this.previousValue = previousValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RemoveShippingChangeImpl that = (RemoveShippingChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .build(); + } + + @Override + public RemoveShippingChange copyDeep() { + return RemoveShippingChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChange.java index 49811590d38..2a15af4aac8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.LineItem; +import com.commercetools.history.models.common.ShoppingListLineItem; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface RemoveShoppingListLineItemChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public LineItem getPreviousValue(); + public ShoppingListLineItem getPreviousValue(); /** *

                                                                      Value after the change.

                                                                      @@ -73,7 +73,7 @@ public interface RemoveShoppingListLineItemChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public LineItem getNextValue(); + public ShoppingListLineItem getNextValue(); /** * set change @@ -87,14 +87,14 @@ public interface RemoveShoppingListLineItemChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final LineItem previousValue); + public void setPreviousValue(final ShoppingListLineItem previousValue); /** *

                                                                      Value after the change.

                                                                      * @param nextValue value to be set */ - public void setNextValue(final LineItem nextValue); + public void setNextValue(final ShoppingListLineItem nextValue); /** * factory method @@ -132,8 +132,9 @@ public static RemoveShoppingListLineItemChange deepCopy(@Nullable final RemoveSh RemoveShoppingListLineItemChangeImpl instance = new RemoveShoppingListLineItemChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.LineItem.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.LineItem.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.ShoppingListLineItem.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.ShoppingListLineItem.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeBuilder.java index 4676d1aecd3..4a277c525be 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeBuilder.java @@ -26,9 +26,9 @@ public class RemoveShoppingListLineItemChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()) + .build(); return this; } @@ -60,8 +61,8 @@ public RemoveShoppingListLineItemChangeBuilder previousValue( */ public RemoveShoppingListLineItemChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()); return this; } @@ -72,7 +73,7 @@ public RemoveShoppingListLineItemChangeBuilder withPreviousValue( */ public RemoveShoppingListLineItemChangeBuilder previousValue( - final com.commercetools.history.models.common.LineItem previousValue) { + final com.commercetools.history.models.common.ShoppingListLineItem previousValue) { this.previousValue = previousValue; return this; } @@ -84,8 +85,9 @@ public RemoveShoppingListLineItemChangeBuilder previousValue( */ public RemoveShoppingListLineItemChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()) + .build(); return this; } @@ -96,8 +98,8 @@ public RemoveShoppingListLineItemChangeBuilder nextValue( */ public RemoveShoppingListLineItemChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.LineItemBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShoppingListLineItemBuilder.of()); return this; } @@ -108,7 +110,7 @@ public RemoveShoppingListLineItemChangeBuilder withNextValue( */ public RemoveShoppingListLineItemChangeBuilder nextValue( - final com.commercetools.history.models.common.LineItem nextValue) { + final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.nextValue = nextValue; return this; } @@ -127,7 +129,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.LineItem getPreviousValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getPreviousValue() { return this.previousValue; } @@ -136,7 +138,7 @@ public com.commercetools.history.models.common.LineItem getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.LineItem getNextValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeImpl.java index 87a86e1ec83..3a30cfe48d9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeImpl.java @@ -26,17 +26,17 @@ public class RemoveShoppingListLineItemChangeImpl implements RemoveShoppingListL private String change; - private com.commercetools.history.models.common.LineItem previousValue; + private com.commercetools.history.models.common.ShoppingListLineItem previousValue; - private com.commercetools.history.models.common.LineItem nextValue; + private com.commercetools.history.models.common.ShoppingListLineItem nextValue; /** * create instance with all properties */ @JsonCreator RemoveShoppingListLineItemChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.LineItem previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LineItem nextValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.ShoppingListLineItem previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; @@ -70,7 +70,7 @@ public String getChange() { *

                                                                      Value before the change.

                                                                      */ - public com.commercetools.history.models.common.LineItem getPreviousValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getPreviousValue() { return this.previousValue; } @@ -78,7 +78,7 @@ public com.commercetools.history.models.common.LineItem getPreviousValue() { *

                                                                      Value after the change.

                                                                      */ - public com.commercetools.history.models.common.LineItem getNextValue() { + public com.commercetools.history.models.common.ShoppingListLineItem getNextValue() { return this.nextValue; } @@ -86,11 +86,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.LineItem previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.ShoppingListLineItem previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.LineItem nextValue) { + public void setNextValue(final com.commercetools.history.models.common.ShoppingListLineItem nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChange.java index 1c624891795..8a3ff20dabe 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChange.java @@ -33,6 +33,7 @@ @io.vrap.rmf.base.client.utils.json.SubType("RemoveStateRolesChange") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = RemoveStateRolesChangeImpl.class) +@Deprecated public interface RemoveStateRolesChange extends Change { /** diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeBuilder.java index ad3616d2f33..45acb61b328 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeBuilder.java @@ -21,6 +21,7 @@ * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveStateRolesChangeBuilder implements Builder { private String change; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeImpl.java index cd65b62ff75..c2b99def480 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveStateRolesChangeImpl.java @@ -20,6 +20,7 @@ *

                                                                      Change triggered by the Remove State roles update action.

                                                                      */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@Deprecated public class RemoveStateRolesChangeImpl implements RemoveStateRolesChange, ModelBase { private String type; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChange.java index acf296210c8..378db1e98e2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChange.java @@ -77,6 +77,7 @@ public interface RemoveVariantChange extends Change { public Variant getNextValue(); /** + *

                                                                      Product data that was updated.

                                                                      *
                                                                        *
                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                      • *
                                                                      • current, if the current ProductCatalogData was updated.
                                                                      • @@ -109,6 +110,7 @@ public interface RemoveVariantChange extends Change { public void setNextValue(final Variant nextValue); /** + *

                                                                        Product data that was updated.

                                                                        *
                                                                          *
                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                        • *
                                                                        • current, if the current ProductCatalogData was updated.
                                                                        • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeBuilder.java index 204bd4bdf7c..aa8faefe5c3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeBuilder.java @@ -116,6 +116,7 @@ public RemoveVariantChangeBuilder nextValue(final com.commercetools.history.mode } /** + *

                                                                          Product data that was updated.

                                                                          *
                                                                            *
                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                          • *
                                                                          • current, if the current ProductCatalogData was updated.
                                                                          • @@ -157,6 +158,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                                                                            Product data that was updated.

                                                                            *
                                                                              *
                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                            • *
                                                                            • current, if the current ProductCatalogData was updated.
                                                                            • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeImpl.java index f9bbd3885be..276cca78f74 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RemoveVariantChangeImpl.java @@ -87,6 +87,7 @@ public com.commercetools.history.models.common.Variant getNextValue() { } /** + *

                                                                              Product data that was updated.

                                                                              *
                                                                                *
                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                              • *
                                                                              • current, if the current ProductCatalogData was updated.
                                                                              • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChange.java new file mode 100644 index 00000000000..0f9f5b4a0d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChange.java @@ -0,0 +1,179 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.TaxRate; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                Change triggered by the Replace TaxRate update action.

                                                                                + * + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     ReplaceTaxRateChange replaceTaxRateChange = ReplaceTaxRateChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("ReplaceTaxRateChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ReplaceTaxRateChangeImpl.class) +public interface ReplaceTaxRateChange extends Change { + + /** + * discriminator value for ReplaceTaxRateChange + */ + String REPLACE_TAX_RATE_CHANGE = "ReplaceTaxRateChange"; + + /** + * + * @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 TaxRate getPreviousValue(); + + /** + *

                                                                                Value after the change.

                                                                                + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public TaxRate 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 TaxRate previousValue); + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + */ + + public void setNextValue(final TaxRate nextValue); + + /** + * factory method + * @return instance of ReplaceTaxRateChange + */ + public static ReplaceTaxRateChange of() { + return new ReplaceTaxRateChangeImpl(); + } + + /** + * factory method to create a shallow copy ReplaceTaxRateChange + * @param template instance to be copied + * @return copy instance + */ + public static ReplaceTaxRateChange of(final ReplaceTaxRateChange template) { + ReplaceTaxRateChangeImpl instance = new ReplaceTaxRateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public ReplaceTaxRateChange copyDeep(); + + /** + * factory method to create a deep copy of ReplaceTaxRateChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ReplaceTaxRateChange deepCopy(@Nullable final ReplaceTaxRateChange template) { + if (template == null) { + return null; + } + ReplaceTaxRateChangeImpl instance = new ReplaceTaxRateChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.TaxRate.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.TaxRate.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for ReplaceTaxRateChange + * @return builder + */ + public static ReplaceTaxRateChangeBuilder builder() { + return ReplaceTaxRateChangeBuilder.of(); + } + + /** + * create builder for ReplaceTaxRateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ReplaceTaxRateChangeBuilder builder(final ReplaceTaxRateChange template) { + return ReplaceTaxRateChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withReplaceTaxRateChange(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/ReplaceTaxRateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeBuilder.java new file mode 100644 index 00000000000..c01d907e731 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeBuilder.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; + +/** + * ReplaceTaxRateChangeBuilder + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     ReplaceTaxRateChange replaceTaxRateChange = ReplaceTaxRateChange.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 ReplaceTaxRateChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.TaxRate previousValue; + + private com.commercetools.history.models.common.TaxRate nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public ReplaceTaxRateChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                Value before the change.

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

                                                                                Value before the change.

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

                                                                                Value before the change.

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

                                                                                Value after the change.

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

                                                                                Value after the change.

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

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public ReplaceTaxRateChangeBuilder nextValue(final com.commercetools.history.models.common.TaxRate 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.TaxRate getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @return nextValue + */ + + public com.commercetools.history.models.common.TaxRate getNextValue() { + return this.nextValue; + } + + /** + * builds ReplaceTaxRateChange with checking for non-null required values + * @return ReplaceTaxRateChange + */ + public ReplaceTaxRateChange build() { + Objects.requireNonNull(change, ReplaceTaxRateChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, ReplaceTaxRateChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, ReplaceTaxRateChange.class + ": nextValue is missing"); + return new ReplaceTaxRateChangeImpl(change, previousValue, nextValue); + } + + /** + * builds ReplaceTaxRateChange without checking for non-null required values + * @return ReplaceTaxRateChange + */ + public ReplaceTaxRateChange buildUnchecked() { + return new ReplaceTaxRateChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of ReplaceTaxRateChangeBuilder + * @return builder + */ + public static ReplaceTaxRateChangeBuilder of() { + return new ReplaceTaxRateChangeBuilder(); + } + + /** + * create builder for ReplaceTaxRateChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ReplaceTaxRateChangeBuilder of(final ReplaceTaxRateChange template) { + ReplaceTaxRateChangeBuilder builder = new ReplaceTaxRateChangeBuilder(); + 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/ReplaceTaxRateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeImpl.java new file mode 100644 index 00000000000..42d6e96fa7f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                Change triggered by the Replace TaxRate update action.

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

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + */ + + public com.commercetools.history.models.common.TaxRate getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.TaxRate previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.TaxRate nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ReplaceTaxRateChangeImpl that = (ReplaceTaxRateChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public ReplaceTaxRateChange copyDeep() { + return ReplaceTaxRateChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChange.java new file mode 100644 index 00000000000..ad8f81bcc64 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChange.java @@ -0,0 +1,138 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                Change triggered by the Revert Staged Changes update action.

                                                                                + * + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     RevertStagedChangesChange revertStagedChangesChange = RevertStagedChangesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("RevertStagedChangesChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RevertStagedChangesChangeImpl.class) +public interface RevertStagedChangesChange extends Change { + + /** + * discriminator value for RevertStagedChangesChange + */ + String REVERT_STAGED_CHANGES_CHANGE = "RevertStagedChangesChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + * factory method + * @return instance of RevertStagedChangesChange + */ + public static RevertStagedChangesChange of() { + return new RevertStagedChangesChangeImpl(); + } + + /** + * factory method to create a shallow copy RevertStagedChangesChange + * @param template instance to be copied + * @return copy instance + */ + public static RevertStagedChangesChange of(final RevertStagedChangesChange template) { + RevertStagedChangesChangeImpl instance = new RevertStagedChangesChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + public RevertStagedChangesChange copyDeep(); + + /** + * factory method to create a deep copy of RevertStagedChangesChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RevertStagedChangesChange deepCopy(@Nullable final RevertStagedChangesChange template) { + if (template == null) { + return null; + } + RevertStagedChangesChangeImpl instance = new RevertStagedChangesChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + /** + * builder factory method for RevertStagedChangesChange + * @return builder + */ + public static RevertStagedChangesChangeBuilder builder() { + return RevertStagedChangesChangeBuilder.of(); + } + + /** + * create builder for RevertStagedChangesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RevertStagedChangesChangeBuilder builder(final RevertStagedChangesChange template) { + return RevertStagedChangesChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRevertStagedChangesChange(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/RevertStagedChangesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeBuilder.java new file mode 100644 index 00000000000..b082fc9ed4d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RevertStagedChangesChangeBuilder + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     RevertStagedChangesChange revertStagedChangesChange = RevertStagedChangesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RevertStagedChangesChangeBuilder implements Builder { + + private String change; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RevertStagedChangesChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + * builds RevertStagedChangesChange with checking for non-null required values + * @return RevertStagedChangesChange + */ + public RevertStagedChangesChange build() { + Objects.requireNonNull(change, RevertStagedChangesChange.class + ": change is missing"); + return new RevertStagedChangesChangeImpl(change); + } + + /** + * builds RevertStagedChangesChange without checking for non-null required values + * @return RevertStagedChangesChange + */ + public RevertStagedChangesChange buildUnchecked() { + return new RevertStagedChangesChangeImpl(change); + } + + /** + * factory method for an instance of RevertStagedChangesChangeBuilder + * @return builder + */ + public static RevertStagedChangesChangeBuilder of() { + return new RevertStagedChangesChangeBuilder(); + } + + /** + * create builder for RevertStagedChangesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RevertStagedChangesChangeBuilder of(final RevertStagedChangesChange template) { + RevertStagedChangesChangeBuilder builder = new RevertStagedChangesChangeBuilder(); + builder.change = template.getChange(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeImpl.java new file mode 100644 index 00000000000..19e04fdf454 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                Change triggered by the Revert Staged Changes update action.

                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RevertStagedChangesChangeImpl implements RevertStagedChangesChange, ModelBase { + + private String type; + + private String change; + + /** + * create instance with all properties + */ + @JsonCreator + RevertStagedChangesChangeImpl(@JsonProperty("change") final String change) { + this.change = change; + this.type = REVERT_STAGED_CHANGES_CHANGE; + } + + /** + * create empty instance + */ + public RevertStagedChangesChangeImpl() { + this.type = REVERT_STAGED_CHANGES_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + public void setChange(final String change) { + this.change = change; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RevertStagedChangesChangeImpl that = (RevertStagedChangesChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(type, that.type) + .append(change, that.change) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .build(); + } + + @Override + public RevertStagedChangesChange copyDeep() { + return RevertStagedChangesChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChange.java new file mode 100644 index 00000000000..57110bb8623 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChange.java @@ -0,0 +1,138 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                Change triggered by the Revert Staged Variant Changes update action.

                                                                                + * + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     RevertStagedVariantChangesChange revertStagedVariantChangesChange = RevertStagedVariantChangesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("RevertStagedVariantChangesChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RevertStagedVariantChangesChangeImpl.class) +public interface RevertStagedVariantChangesChange extends Change { + + /** + * discriminator value for RevertStagedVariantChangesChange + */ + String REVERT_STAGED_VARIANT_CHANGES_CHANGE = "RevertStagedVariantChangesChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + * factory method + * @return instance of RevertStagedVariantChangesChange + */ + public static RevertStagedVariantChangesChange of() { + return new RevertStagedVariantChangesChangeImpl(); + } + + /** + * factory method to create a shallow copy RevertStagedVariantChangesChange + * @param template instance to be copied + * @return copy instance + */ + public static RevertStagedVariantChangesChange of(final RevertStagedVariantChangesChange template) { + RevertStagedVariantChangesChangeImpl instance = new RevertStagedVariantChangesChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + public RevertStagedVariantChangesChange copyDeep(); + + /** + * factory method to create a deep copy of RevertStagedVariantChangesChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RevertStagedVariantChangesChange deepCopy(@Nullable final RevertStagedVariantChangesChange template) { + if (template == null) { + return null; + } + RevertStagedVariantChangesChangeImpl instance = new RevertStagedVariantChangesChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + /** + * builder factory method for RevertStagedVariantChangesChange + * @return builder + */ + public static RevertStagedVariantChangesChangeBuilder builder() { + return RevertStagedVariantChangesChangeBuilder.of(); + } + + /** + * create builder for RevertStagedVariantChangesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RevertStagedVariantChangesChangeBuilder builder(final RevertStagedVariantChangesChange template) { + return RevertStagedVariantChangesChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRevertStagedVariantChangesChange(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/RevertStagedVariantChangesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeBuilder.java new file mode 100644 index 00000000000..346524e05a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RevertStagedVariantChangesChangeBuilder + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     RevertStagedVariantChangesChange revertStagedVariantChangesChange = RevertStagedVariantChangesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RevertStagedVariantChangesChangeBuilder implements Builder { + + private String change; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public RevertStagedVariantChangesChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + * builds RevertStagedVariantChangesChange with checking for non-null required values + * @return RevertStagedVariantChangesChange + */ + public RevertStagedVariantChangesChange build() { + Objects.requireNonNull(change, RevertStagedVariantChangesChange.class + ": change is missing"); + return new RevertStagedVariantChangesChangeImpl(change); + } + + /** + * builds RevertStagedVariantChangesChange without checking for non-null required values + * @return RevertStagedVariantChangesChange + */ + public RevertStagedVariantChangesChange buildUnchecked() { + return new RevertStagedVariantChangesChangeImpl(change); + } + + /** + * factory method for an instance of RevertStagedVariantChangesChangeBuilder + * @return builder + */ + public static RevertStagedVariantChangesChangeBuilder of() { + return new RevertStagedVariantChangesChangeBuilder(); + } + + /** + * create builder for RevertStagedVariantChangesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RevertStagedVariantChangesChangeBuilder of(final RevertStagedVariantChangesChange template) { + RevertStagedVariantChangesChangeBuilder builder = new RevertStagedVariantChangesChangeBuilder(); + builder.change = template.getChange(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeImpl.java new file mode 100644 index 00000000000..64dc128679b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                Change triggered by the Revert Staged Variant Changes update action.

                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RevertStagedVariantChangesChangeImpl implements RevertStagedVariantChangesChange, ModelBase { + + private String type; + + private String change; + + /** + * create instance with all properties + */ + @JsonCreator + RevertStagedVariantChangesChangeImpl(@JsonProperty("change") final String change) { + this.change = change; + this.type = REVERT_STAGED_VARIANT_CHANGES_CHANGE; + } + + /** + * create empty instance + */ + public RevertStagedVariantChangesChangeImpl() { + this.type = REVERT_STAGED_VARIANT_CHANGES_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + public void setChange(final String change) { + this.change = change; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RevertStagedVariantChangesChangeImpl that = (RevertStagedVariantChangesChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(type, that.type) + .append(change, that.change) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .build(); + } + + @Override + public RevertStagedVariantChangesChange copyDeep() { + return RevertStagedVariantChangesChange.deepCopy(this); + } +} 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 index 6b189b2a82b..ea1151fa16c 100644 --- 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 @@ -17,7 +17,12 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                Change triggered by the Set Address Custom Field update action.

                                                                                + *

                                                                                Change triggered by the following update actions:

                                                                                + * * *
                                                                                * Example to create an instance using the builder pattern 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 index c83444cd224..7728b8e6e22 100644 --- 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 @@ -17,7 +17,12 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                Change triggered by the Set Address Custom Field update action.

                                                                                + *

                                                                                Change triggered by the following update actions:

                                                                                + * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetAddressCustomFieldChangeImpl implements SetAddressCustomFieldChange, ModelBase { 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 index 870ae8e32f0..68c6a61a44e 100644 --- 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 @@ -18,7 +18,12 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                Change triggered by the Set Address Custom Type update action.

                                                                                + *

                                                                                Change triggered by the following update actions:

                                                                                + * * *
                                                                                * Example to create an instance using the builder pattern 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 index 6c57e396e71..a0a04c9ff2f 100644 --- 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 @@ -17,7 +17,12 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                Change triggered by the Set Address Custom Type update action.

                                                                                + *

                                                                                Change triggered by the following update actions:

                                                                                + * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetAddressCustomTypeChangeImpl implements SetAddressCustomTypeChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChange.java new file mode 100644 index 00000000000..2d2ecabd2db --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChange.java @@ -0,0 +1,265 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                This change is initiated by background processes after the Change Parent update action is performed.

                                                                                + * + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     SetAncestorsChange setAncestorsChange = SetAncestorsChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetAncestorsChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAncestorsChangeImpl.class) +public interface SetAncestorsChange extends Change { + + /** + * discriminator value for SetAncestorsChange + */ + String SET_ANCESTORS_CHANGE = "SetAncestorsChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                Elements added to the array.

                                                                                + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

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

                                                                                Elements added to the array.

                                                                                + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reference... addedItems); + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reference... removedItems); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue values to be set + */ + + @JsonIgnore + public void setPreviousValue(final Reference... previousValue); + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + * @param nextValue values to be set + */ + + @JsonIgnore + public void setNextValue(final Reference... nextValue); + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue values to be set + */ + + public void setNextValue(final List nextValue); + + /** + * factory method + * @return instance of SetAncestorsChange + */ + public static SetAncestorsChange of() { + return new SetAncestorsChangeImpl(); + } + + /** + * factory method to create a shallow copy SetAncestorsChange + * @param template instance to be copied + * @return copy instance + */ + public static SetAncestorsChange of(final SetAncestorsChange template) { + SetAncestorsChangeImpl instance = new SetAncestorsChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetAncestorsChange copyDeep(); + + /** + * factory method to create a deep copy of SetAncestorsChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAncestorsChange deepCopy(@Nullable final SetAncestorsChange template) { + if (template == null) { + return null; + } + SetAncestorsChangeImpl instance = new SetAncestorsChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setNextValue(Optional.ofNullable(template.getNextValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetAncestorsChange + * @return builder + */ + public static SetAncestorsChangeBuilder builder() { + return SetAncestorsChangeBuilder.of(); + } + + /** + * create builder for SetAncestorsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAncestorsChangeBuilder builder(final SetAncestorsChange template) { + return SetAncestorsChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAncestorsChange(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/SetAncestorsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChangeBuilder.java new file mode 100644 index 00000000000..07bd4c1b999 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChangeBuilder.java @@ -0,0 +1,405 @@ + +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; + +/** + * SetAncestorsChangeBuilder + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     SetAncestorsChange setAncestorsChange = SetAncestorsChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAncestorsChangeBuilder implements Builder { + + private String change; + + private java.util.List addedItems; + + private java.util.List removedItems; + + private java.util.List previousValue; + + private java.util.List nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder addedItems(final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetAncestorsChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetAncestorsChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetAncestorsChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetAncestorsChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder previousValue( + final com.commercetools.history.models.common.Reference... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder previousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder plusPreviousValue( + final com.commercetools.history.models.common.Reference... previousValue) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.addAll(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetAncestorsChangeBuilder plusPreviousValue( + Function> builder) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetAncestorsChangeBuilder withPreviousValue( + Function> builder) { + this.previousValue = new ArrayList<>(); + this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder nextValue(final com.commercetools.history.models.common.Reference... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder nextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAncestorsChangeBuilder plusNextValue( + final com.commercetools.history.models.common.Reference... nextValue) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.addAll(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetAncestorsChangeBuilder plusNextValue( + Function> builder) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetAncestorsChangeBuilder withNextValue( + Function> builder) { + this.nextValue = new ArrayList<>(); + this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + * @return nextValue + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + /** + * builds SetAncestorsChange with checking for non-null required values + * @return SetAncestorsChange + */ + public SetAncestorsChange build() { + Objects.requireNonNull(change, SetAncestorsChange.class + ": change is missing"); + Objects.requireNonNull(addedItems, SetAncestorsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetAncestorsChange.class + ": removedItems is missing"); + Objects.requireNonNull(previousValue, SetAncestorsChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetAncestorsChange.class + ": nextValue is missing"); + return new SetAncestorsChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * builds SetAncestorsChange without checking for non-null required values + * @return SetAncestorsChange + */ + public SetAncestorsChange buildUnchecked() { + return new SetAncestorsChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * factory method for an instance of SetAncestorsChangeBuilder + * @return builder + */ + public static SetAncestorsChangeBuilder of() { + return new SetAncestorsChangeBuilder(); + } + + /** + * create builder for SetAncestorsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAncestorsChangeBuilder of(final SetAncestorsChange template) { + SetAncestorsChangeBuilder builder = new SetAncestorsChangeBuilder(); + builder.change = template.getChange(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); + 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/SetAncestorsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChangeImpl.java new file mode 100644 index 00000000000..74160b9facf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAncestorsChangeImpl.java @@ -0,0 +1,197 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                This change is initiated by background processes after the Change Parent update action is performed.

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

                                                                                Elements added to the array.

                                                                                + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                Value before the change.

                                                                                + */ + + public java.util.List getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                Value after the change.

                                                                                + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddedItems(final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Reference... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + } + + public void setPreviousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Reference... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + } + + public void setNextValue(final java.util.List nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAncestorsChangeImpl that = (SetAncestorsChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addedItems) + .append(removedItems) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addedItems", addedItems) + .append("removedItems", removedItems) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetAncestorsChange copyDeep() { + return SetAncestorsChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChange.java index 117fdafc916..c42d0aed811 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChange.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                Change triggered automatically due to a user-initiated change.

                                                                                + *

                                                                                This change is initiated by background processes when a discount is applied through a Discount Code.

                                                                                * *
                                                                                * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChangeImpl.java index 2b7bbdf93b9..017dee495a5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetApplicationVersionChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                Change triggered automatically due to a user-initiated change.

                                                                                + *

                                                                                This change is initiated by background processes when a discount is applied through a Discount Code.

                                                                                */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetApplicationVersionChangeImpl implements SetApplicationVersionChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChange.java index 8eea56bf857..0696fc17b57 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChange.java @@ -32,6 +32,8 @@ * .name("{name}") * .customTypeId("{customTypeId}") * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -103,6 +105,27 @@ public interface SetAssetCustomFieldChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -145,6 +168,25 @@ public interface SetAssetCustomFieldChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetCustomFieldChange @@ -166,6 +208,8 @@ public static SetAssetCustomFieldChange of(final SetAssetCustomFieldChange templ instance.setName(template.getName()); instance.setCustomTypeId(template.getCustomTypeId()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -188,6 +232,8 @@ public static SetAssetCustomFieldChange deepCopy(@Nullable final SetAssetCustomF instance.setName(template.getName()); instance.setCustomTypeId(template.getCustomTypeId()); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeBuilder.java index 1975625b1d2..efececa2411 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeBuilder.java @@ -18,6 +18,8 @@ * .name("{name}") * .customTypeId("{customTypeId}") * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -37,6 +39,10 @@ public class SetAssetCustomFieldChangeBuilder implements BuilderProduct data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetCustomFieldChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -182,6 +215,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetCustomFieldChange with checking for non-null required values * @return SetAssetCustomFieldChange @@ -193,7 +249,10 @@ public SetAssetCustomFieldChange build() { Objects.requireNonNull(name, SetAssetCustomFieldChange.class + ": name is missing"); Objects.requireNonNull(customTypeId, SetAssetCustomFieldChange.class + ": customTypeId is missing"); Objects.requireNonNull(asset, SetAssetCustomFieldChange.class + ": asset is missing"); - return new SetAssetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId, asset); + Objects.requireNonNull(catalogData, SetAssetCustomFieldChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetCustomFieldChange.class + ": variant is missing"); + return new SetAssetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId, asset, + catalogData, variant); } /** @@ -201,7 +260,8 @@ public SetAssetCustomFieldChange build() { * @return SetAssetCustomFieldChange */ public SetAssetCustomFieldChange buildUnchecked() { - return new SetAssetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId, asset); + return new SetAssetCustomFieldChangeImpl(change, previousValue, nextValue, name, customTypeId, asset, + catalogData, variant); } /** @@ -225,6 +285,8 @@ public static SetAssetCustomFieldChangeBuilder of(final SetAssetCustomFieldChang builder.name = template.getName(); builder.customTypeId = template.getCustomTypeId(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeImpl.java index 45b46771ec8..30e838e7ee9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeImpl.java @@ -40,6 +40,10 @@ public class SetAssetCustomFieldChangeImpl implements SetAssetCustomFieldChange, private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -48,13 +52,16 @@ public class SetAssetCustomFieldChangeImpl implements SetAssetCustomFieldChange, @JsonProperty("previousValue") final java.lang.Object previousValue, @JsonProperty("nextValue") final java.lang.Object nextValue, @JsonProperty("name") final String name, @JsonProperty("customTypeId") final String customTypeId, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.name = name; this.customTypeId = customTypeId; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_CUSTOM_FIELD_CHANGE; } @@ -121,6 +128,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -145,6 +173,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -162,6 +198,8 @@ public boolean equals(Object o) { .append(name, that.name) .append(customTypeId, that.customTypeId) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -169,6 +207,8 @@ public boolean equals(Object o) { .append(name, that.name) .append(customTypeId, that.customTypeId) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -181,6 +221,8 @@ public int hashCode() { .append(name) .append(customTypeId) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -193,6 +235,8 @@ public String toString() { .append("name", name) .append("customTypeId", customTypeId) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChange.java index ff531d9ce67..b1c1b2dacc2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChange.java @@ -33,6 +33,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -90,6 +92,27 @@ public interface SetAssetCustomTypeChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -118,6 +141,25 @@ public interface SetAssetCustomTypeChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetCustomTypeChange @@ -137,6 +179,8 @@ public static SetAssetCustomTypeChange of(final SetAssetCustomTypeChange templat instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -158,6 +202,8 @@ public static SetAssetCustomTypeChange deepCopy(@Nullable final SetAssetCustomTy com.commercetools.history.models.common.CustomFields.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeBuilder.java index 297cbde573f..1d96bddd26e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetAssetCustomTypeChangeBuilder implements BuilderProduct data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetCustomTypeChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -188,6 +221,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetCustomTypeChange with checking for non-null required values * @return SetAssetCustomTypeChange @@ -197,7 +253,9 @@ public SetAssetCustomTypeChange build() { Objects.requireNonNull(previousValue, SetAssetCustomTypeChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAssetCustomTypeChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, SetAssetCustomTypeChange.class + ": asset is missing"); - return new SetAssetCustomTypeChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, SetAssetCustomTypeChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetCustomTypeChange.class + ": variant is missing"); + return new SetAssetCustomTypeChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -205,7 +263,7 @@ public SetAssetCustomTypeChange build() { * @return SetAssetCustomTypeChange */ public SetAssetCustomTypeChange buildUnchecked() { - return new SetAssetCustomTypeChangeImpl(change, previousValue, nextValue, asset); + return new SetAssetCustomTypeChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -227,6 +285,8 @@ public static SetAssetCustomTypeChangeBuilder of(final SetAssetCustomTypeChange builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeImpl.java index 4f7f7ad6a27..e2fdc06c276 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeImpl.java @@ -36,6 +36,10 @@ public class SetAssetCustomTypeChangeImpl implements SetAssetCustomTypeChange, M private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class SetAssetCustomTypeChangeImpl implements SetAssetCustomTypeChange, M SetAssetCustomTypeChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.CustomFields previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_CUSTOM_TYPE_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +142,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +165,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -144,6 +184,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -154,6 +196,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChange.java index 90a32800d49..fd3b2daa028 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChange.java @@ -33,6 +33,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -90,6 +92,27 @@ public interface SetAssetDescriptionChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -118,6 +141,25 @@ public interface SetAssetDescriptionChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetDescriptionChange @@ -137,6 +179,8 @@ public static SetAssetDescriptionChange of(final SetAssetDescriptionChange templ instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -159,6 +203,8 @@ public static SetAssetDescriptionChange deepCopy(@Nullable final SetAssetDescrip instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeBuilder.java index 9541b7e2806..67d73a9c218 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetAssetDescriptionChangeBuilder implements BuilderProduct data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetDescriptionChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -188,6 +221,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetDescriptionChange with checking for non-null required values * @return SetAssetDescriptionChange @@ -197,7 +253,9 @@ public SetAssetDescriptionChange build() { Objects.requireNonNull(previousValue, SetAssetDescriptionChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAssetDescriptionChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, SetAssetDescriptionChange.class + ": asset is missing"); - return new SetAssetDescriptionChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, SetAssetDescriptionChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetDescriptionChange.class + ": variant is missing"); + return new SetAssetDescriptionChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -205,7 +263,7 @@ public SetAssetDescriptionChange build() { * @return SetAssetDescriptionChange */ public SetAssetDescriptionChange buildUnchecked() { - return new SetAssetDescriptionChangeImpl(change, previousValue, nextValue, asset); + return new SetAssetDescriptionChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -227,6 +285,8 @@ public static SetAssetDescriptionChangeBuilder of(final SetAssetDescriptionChang builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeImpl.java index a02d7ff480d..0ed9e3809ef 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeImpl.java @@ -36,6 +36,10 @@ public class SetAssetDescriptionChangeImpl implements SetAssetDescriptionChange, private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class SetAssetDescriptionChangeImpl implements SetAssetDescriptionChange, SetAssetDescriptionChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_DESCRIPTION_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +142,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +165,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -144,6 +184,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -154,6 +196,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChange.java index c2bcd23a34a..68233fb821b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChange.java @@ -32,6 +32,8 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -87,6 +89,27 @@ public interface SetAssetKeyChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -115,6 +138,25 @@ public interface SetAssetKeyChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetKeyChange @@ -134,6 +176,8 @@ public static SetAssetKeyChange of(final SetAssetKeyChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -154,6 +198,8 @@ public static SetAssetKeyChange deepCopy(@Nullable final SetAssetKeyChange templ instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeBuilder.java index 27ff45c530c..c92cdec19f2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetAssetKeyChangeBuilder implements Builder { private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * set the value to the change * @param change value to be set @@ -101,6 +107,33 @@ public SetAssetKeyChangeBuilder asset(final com.commercetools.history.models.cha return this; } + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetKeyChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -137,6 +170,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetKeyChange with checking for non-null required values * @return SetAssetKeyChange @@ -146,7 +202,9 @@ public SetAssetKeyChange build() { Objects.requireNonNull(previousValue, SetAssetKeyChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAssetKeyChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, SetAssetKeyChange.class + ": asset is missing"); - return new SetAssetKeyChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, SetAssetKeyChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetKeyChange.class + ": variant is missing"); + return new SetAssetKeyChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -154,7 +212,7 @@ public SetAssetKeyChange build() { * @return SetAssetKeyChange */ public SetAssetKeyChange buildUnchecked() { - return new SetAssetKeyChangeImpl(change, previousValue, nextValue, asset); + return new SetAssetKeyChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -176,6 +234,8 @@ public static SetAssetKeyChangeBuilder of(final SetAssetKeyChange template) { builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeImpl.java index b7e08a3907d..5db275c9c9f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeImpl.java @@ -36,6 +36,10 @@ public class SetAssetKeyChangeImpl implements SetAssetKeyChange, ModelBase { private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class SetAssetKeyChangeImpl implements SetAssetKeyChange, ModelBase { SetAssetKeyChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final String previousValue, @JsonProperty("nextValue") final String nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_KEY_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +142,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +165,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -144,6 +184,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -154,6 +196,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChange.java index 46c25f5fb33..a2607e063a5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChange.java @@ -34,6 +34,8 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -91,6 +93,27 @@ public interface SetAssetSourcesChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -135,6 +158,25 @@ public interface SetAssetSourcesChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetSourcesChange @@ -154,6 +196,8 @@ public static SetAssetSourcesChange of(final SetAssetSourcesChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -182,6 +226,8 @@ public static SetAssetSourcesChange deepCopy(@Nullable final SetAssetSourcesChan .collect(Collectors.toList())) .orElse(null)); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeBuilder.java index 1ac945dd782..d104adc789f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeBuilder.java @@ -18,6 +18,8 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetAssetSourcesChangeBuilder implements BuilderProduct data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetSourcesChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -294,6 +327,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetSourcesChange with checking for non-null required values * @return SetAssetSourcesChange @@ -303,7 +359,9 @@ public SetAssetSourcesChange build() { Objects.requireNonNull(previousValue, SetAssetSourcesChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAssetSourcesChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, SetAssetSourcesChange.class + ": asset is missing"); - return new SetAssetSourcesChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, SetAssetSourcesChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetSourcesChange.class + ": variant is missing"); + return new SetAssetSourcesChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -311,7 +369,7 @@ public SetAssetSourcesChange build() { * @return SetAssetSourcesChange */ public SetAssetSourcesChange buildUnchecked() { - return new SetAssetSourcesChangeImpl(change, previousValue, nextValue, asset); + return new SetAssetSourcesChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -333,6 +391,8 @@ public static SetAssetSourcesChangeBuilder of(final SetAssetSourcesChange templa builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeImpl.java index 79350b29002..823957837c9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeImpl.java @@ -36,6 +36,10 @@ public class SetAssetSourcesChangeImpl implements SetAssetSourcesChange, ModelBa private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class SetAssetSourcesChangeImpl implements SetAssetSourcesChange, ModelBa SetAssetSourcesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_SOURCES_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -123,6 +151,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -138,11 +174,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -153,6 +193,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -163,6 +205,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChange.java index f4ab29fc00a..b6bd975eefd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChange.java @@ -32,6 +32,8 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -87,6 +89,27 @@ public interface SetAssetTagsChange extends Change { @JsonProperty("asset") public AssetChangeValue getAsset(); + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -131,6 +154,25 @@ public interface SetAssetTagsChange extends Change { public void setAsset(final AssetChangeValue asset); + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAssetTagsChange @@ -150,6 +192,8 @@ public static SetAssetTagsChange of(final SetAssetTagsChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setAsset(template.getAsset()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -170,6 +214,8 @@ public static SetAssetTagsChange deepCopy(@Nullable final SetAssetTagsChange tem instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); instance.setAsset(com.commercetools.history.models.change_value.AssetChangeValue.deepCopy(template.getAsset())); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeBuilder.java index dd42d5267da..f0a169745db 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeBuilder.java @@ -18,6 +18,8 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .asset(assetBuilder -> assetBuilder) + * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetAssetTagsChangeBuilder implements Builder { private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * set the value to the change * @param change value to be set @@ -151,6 +157,33 @@ public SetAssetTagsChangeBuilder asset(final com.commercetools.history.models.ch return this; } + /** + *

                                                                                Product data that was updated.

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

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetAssetTagsChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -187,6 +220,29 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAssetTagsChange with checking for non-null required values * @return SetAssetTagsChange @@ -196,7 +252,9 @@ public SetAssetTagsChange build() { Objects.requireNonNull(previousValue, SetAssetTagsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAssetTagsChange.class + ": nextValue is missing"); Objects.requireNonNull(asset, SetAssetTagsChange.class + ": asset is missing"); - return new SetAssetTagsChangeImpl(change, previousValue, nextValue, asset); + Objects.requireNonNull(catalogData, SetAssetTagsChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetAssetTagsChange.class + ": variant is missing"); + return new SetAssetTagsChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -204,7 +262,7 @@ public SetAssetTagsChange build() { * @return SetAssetTagsChange */ public SetAssetTagsChange buildUnchecked() { - return new SetAssetTagsChangeImpl(change, previousValue, nextValue, asset); + return new SetAssetTagsChangeImpl(change, previousValue, nextValue, asset, catalogData, variant); } /** @@ -226,6 +284,8 @@ public static SetAssetTagsChangeBuilder of(final SetAssetTagsChange template) { builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.asset = template.getAsset(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeImpl.java index 553b469494c..822ea9c4272 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeImpl.java @@ -36,6 +36,10 @@ public class SetAssetTagsChangeImpl implements SetAssetTagsChange, ModelBase { private com.commercetools.history.models.change_value.AssetChangeValue asset; + private String catalogData; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,14 @@ public class SetAssetTagsChangeImpl implements SetAssetTagsChange, ModelBase { SetAssetTagsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset) { + @JsonProperty("asset") final com.commercetools.history.models.change_value.AssetChangeValue asset, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.asset = asset; + this.catalogData = catalogData; + this.variant = variant; this.type = SET_ASSET_TAGS_CHANGE; } @@ -98,6 +105,27 @@ public com.commercetools.history.models.change_value.AssetChangeValue getAsset() return this.asset; } + /** + *

                                                                                Product data that was updated.

                                                                                + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                Identifier of the updated Product Variant.

                                                                                + *

                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -122,6 +150,14 @@ public void setAsset(final com.commercetools.history.models.change_value.AssetCh this.asset = asset; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -137,11 +173,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(asset, that.asset) + .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -152,6 +192,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(asset) + .append(catalogData) + .append(variant) .toHashCode(); } @@ -162,6 +204,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("asset", asset) + .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChange.java new file mode 100644 index 00000000000..430a21368bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChange.java @@ -0,0 +1,265 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                Change triggered by the Set Associates update action.

                                                                                + * + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     SetAssociatesChange setAssociatesChange = SetAssociatesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetAssociatesChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetAssociatesChangeImpl.class) +public interface SetAssociatesChange extends Change { + + /** + * discriminator value for SetAssociatesChange + */ + String SET_ASSOCIATES_CHANGE = "SetAssociatesChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                Elements added to the array.

                                                                                + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

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

                                                                                Elements added to the array.

                                                                                + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Associate... addedItems); + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Associate... removedItems); + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + + /** + *

                                                                                Value before the change.

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

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + * @param nextValue values to be set + */ + + @JsonIgnore + public void setNextValue(final Associate... nextValue); + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue values to be set + */ + + public void setNextValue(final List nextValue); + + /** + * factory method + * @return instance of SetAssociatesChange + */ + public static SetAssociatesChange of() { + return new SetAssociatesChangeImpl(); + } + + /** + * factory method to create a shallow copy SetAssociatesChange + * @param template instance to be copied + * @return copy instance + */ + public static SetAssociatesChange of(final SetAssociatesChange template) { + SetAssociatesChangeImpl instance = new SetAssociatesChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetAssociatesChange copyDeep(); + + /** + * factory method to create a deep copy of SetAssociatesChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetAssociatesChange deepCopy(@Nullable final SetAssociatesChange template) { + if (template == null) { + return null; + } + SetAssociatesChangeImpl instance = new SetAssociatesChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Associate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Associate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Associate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setNextValue(Optional.ofNullable(template.getNextValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Associate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetAssociatesChange + * @return builder + */ + public static SetAssociatesChangeBuilder builder() { + return SetAssociatesChangeBuilder.of(); + } + + /** + * create builder for SetAssociatesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAssociatesChangeBuilder builder(final SetAssociatesChange template) { + return SetAssociatesChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetAssociatesChange(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/SetAssociatesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChangeBuilder.java new file mode 100644 index 00000000000..ff9a198ebe5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChangeBuilder.java @@ -0,0 +1,494 @@ + +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; + +/** + * SetAssociatesChangeBuilder + *
                                                                                + * Example to create an instance using the builder pattern + *
                                                                                + *
                                                                                
                                                                                + *     SetAssociatesChange setAssociatesChange = SetAssociatesChange.builder()
                                                                                + *             .change("{change}")
                                                                                + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                + *             .build()
                                                                                + * 
                                                                                + *
                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetAssociatesChangeBuilder implements Builder { + + private String change; + + private java.util.List addedItems; + + private java.util.List removedItems; + + private java.util.List previousValue; + + private java.util.List nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder addedItems( + final com.commercetools.history.models.common.Associate... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Associate... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements added to the array.

                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of())); + } + + /** + *

                                                                                Elements added to the array.

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

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder removedItems( + final com.commercetools.history.models.common.Associate... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Associate... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetAssociatesChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of())); + } + + /** + *

                                                                                Elements removed from the array.

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

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder previousValue( + final com.commercetools.history.models.common.Associate... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder previousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param previousValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder plusPreviousValue( + final com.commercetools.history.models.common.Associate... previousValue) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.addAll(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                Value before the change.

                                                                                + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetAssociatesChangeBuilder plusPreviousValue( + Function builder) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.add(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 SetAssociatesChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = new ArrayList<>(); + this.previousValue.add(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 SetAssociatesChangeBuilder addPreviousValue( + Function builder) { + return plusPreviousValue(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of())); + } + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder nextValue(final com.commercetools.history.models.common.Associate... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder nextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetAssociatesChangeBuilder plusNextValue( + final com.commercetools.history.models.common.Associate... nextValue) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.addAll(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                Value after the change.

                                                                                + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetAssociatesChangeBuilder plusNextValue( + Function builder) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.add(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 SetAssociatesChangeBuilder withNextValue( + Function builder) { + this.nextValue = new ArrayList<>(); + this.nextValue.add(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 SetAssociatesChangeBuilder addNextValue( + Function builder) { + return plusNextValue(builder.apply(com.commercetools.history.models.common.AssociateBuilder.of())); + } + + /** + *

                                                                                Value after the change.

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

                                                                                Elements added to the array.

                                                                                + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                Value before the change.

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

                                                                                Value after the change.

                                                                                + * @return nextValue + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + /** + * builds SetAssociatesChange with checking for non-null required values + * @return SetAssociatesChange + */ + public SetAssociatesChange build() { + Objects.requireNonNull(change, SetAssociatesChange.class + ": change is missing"); + Objects.requireNonNull(addedItems, SetAssociatesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetAssociatesChange.class + ": removedItems is missing"); + Objects.requireNonNull(previousValue, SetAssociatesChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetAssociatesChange.class + ": nextValue is missing"); + return new SetAssociatesChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * builds SetAssociatesChange without checking for non-null required values + * @return SetAssociatesChange + */ + public SetAssociatesChange buildUnchecked() { + return new SetAssociatesChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * factory method for an instance of SetAssociatesChangeBuilder + * @return builder + */ + public static SetAssociatesChangeBuilder of() { + return new SetAssociatesChangeBuilder(); + } + + /** + * create builder for SetAssociatesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetAssociatesChangeBuilder of(final SetAssociatesChange template) { + SetAssociatesChangeBuilder builder = new SetAssociatesChangeBuilder(); + builder.change = template.getChange(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); + 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/SetAssociatesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChangeImpl.java new file mode 100644 index 00000000000..7fc1895e2e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAssociatesChangeImpl.java @@ -0,0 +1,197 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                Change triggered by the Set Associates update action.

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

                                                                                Elements added to the array.

                                                                                + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                Elements removed from the array.

                                                                                + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                Value before the change.

                                                                                + */ + + public java.util.List getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                Value after the change.

                                                                                + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddedItems(final com.commercetools.history.models.common.Associate... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Associate... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Associate... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + } + + public void setPreviousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Associate... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + } + + public void setNextValue(final java.util.List nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetAssociatesChangeImpl that = (SetAssociatesChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addedItems) + .append(removedItems) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addedItems", addedItems) + .append("removedItems", removedItems) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetAssociatesChange copyDeep() { + return SetAssociatesChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChange.java index 46dd111dead..87e4b5b05d9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.change_value.AttributeValue; +import com.commercetools.history.models.common.Attribute; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -28,6 +28,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -65,7 +66,7 @@ public interface SetAttributeChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public AttributeValue getPreviousValue(); + public Attribute getPreviousValue(); /** *

                                                                                Value after the change.

                                                                                @@ -74,9 +75,10 @@ public interface SetAttributeChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public AttributeValue getNextValue(); + public Attribute getNextValue(); /** + *

                                                                                Product data that was updated.

                                                                                *
                                                                                  *
                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                • *
                                                                                • current, if the current ProductCatalogData was updated.
                                                                                • @@ -87,6 +89,15 @@ public interface SetAttributeChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                  Identifier of the updated Product Variant.

                                                                                  + *

                                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                  + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -99,16 +110,17 @@ public interface SetAttributeChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final AttributeValue previousValue); + public void setPreviousValue(final Attribute previousValue); /** *

                                                                                  Value after the change.

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

                                                                                  Product data that was updated.

                                                                                  *
                                                                                    *
                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                  • *
                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                  • @@ -118,6 +130,14 @@ public interface SetAttributeChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                    Identifier of the updated Product Variant.

                                                                                    + *

                                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                    + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetAttributeChange @@ -137,6 +157,7 @@ public static SetAttributeChange of(final SetAttributeChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -155,10 +176,10 @@ public static SetAttributeChange deepCopy(@Nullable final SetAttributeChange tem SetAttributeChangeImpl instance = new SetAttributeChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.change_value.AttributeValue.deepCopy(template.getPreviousValue())); - instance.setNextValue( - com.commercetools.history.models.change_value.AttributeValue.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.Attribute.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.Attribute.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeBuilder.java index a1007ee95fb..2b4ce5bafdf 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeBuilder.java @@ -18,6 +18,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -27,12 +28,14 @@ public class SetAttributeChangeBuilder implements Builder { private String change; - private com.commercetools.history.models.change_value.AttributeValue previousValue; + private com.commercetools.history.models.common.Attribute previousValue; - private com.commercetools.history.models.change_value.AttributeValue nextValue; + private com.commercetools.history.models.common.Attribute nextValue; private String catalogData; + private String variant; + /** * set the value to the change * @param change value to be set @@ -51,9 +54,8 @@ public SetAttributeChangeBuilder change(final String change) { */ public SetAttributeChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.change_value.AttributeValueBuilder.of()) - .build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()).build(); return this; } @@ -64,8 +66,8 @@ public SetAttributeChangeBuilder previousValue( */ public SetAttributeChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.change_value.AttributeValueBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()); return this; } @@ -76,7 +78,7 @@ public SetAttributeChangeBuilder withPreviousValue( */ public SetAttributeChangeBuilder previousValue( - final com.commercetools.history.models.change_value.AttributeValue previousValue) { + final com.commercetools.history.models.common.Attribute previousValue) { this.previousValue = previousValue; return this; } @@ -88,9 +90,8 @@ public SetAttributeChangeBuilder previousValue( */ public SetAttributeChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.change_value.AttributeValueBuilder.of()) - .build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()).build(); return this; } @@ -101,8 +102,8 @@ public SetAttributeChangeBuilder nextValue( */ public SetAttributeChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.change_value.AttributeValueBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()); return this; } @@ -112,13 +113,13 @@ public SetAttributeChangeBuilder withNextValue( * @return Builder */ - public SetAttributeChangeBuilder nextValue( - final com.commercetools.history.models.change_value.AttributeValue nextValue) { + public SetAttributeChangeBuilder nextValue(final com.commercetools.history.models.common.Attribute nextValue) { this.nextValue = nextValue; return this; } /** + *

                                                                                    Product data that was updated.

                                                                                    *
                                                                                      *
                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                    • *
                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                    • @@ -132,6 +133,18 @@ public SetAttributeChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                                                                      Identifier of the updated Product Variant.

                                                                                      + *

                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                      + * @param variant value to be set + * @return Builder + */ + + public SetAttributeChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -146,7 +159,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.change_value.AttributeValue getPreviousValue() { + public com.commercetools.history.models.common.Attribute getPreviousValue() { return this.previousValue; } @@ -155,11 +168,12 @@ public com.commercetools.history.models.change_value.AttributeValue getPreviousV * @return nextValue */ - public com.commercetools.history.models.change_value.AttributeValue getNextValue() { + public com.commercetools.history.models.common.Attribute getNextValue() { return this.nextValue; } /** + *

                                                                                      Product data that was updated.

                                                                                      *
                                                                                        *
                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                      • *
                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                      • @@ -171,6 +185,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                        Identifier of the updated Product Variant.

                                                                                        + *

                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                        + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetAttributeChange with checking for non-null required values * @return SetAttributeChange @@ -180,7 +204,8 @@ public SetAttributeChange build() { Objects.requireNonNull(previousValue, SetAttributeChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetAttributeChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetAttributeChange.class + ": catalogData is missing"); - return new SetAttributeChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetAttributeChange.class + ": variant is missing"); + return new SetAttributeChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -188,7 +213,7 @@ public SetAttributeChange build() { * @return SetAttributeChange */ public SetAttributeChange buildUnchecked() { - return new SetAttributeChangeImpl(change, previousValue, nextValue, catalogData); + return new SetAttributeChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -210,6 +235,7 @@ public static SetAttributeChangeBuilder of(final SetAttributeChange template) { builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeImpl.java index 0bd3e150836..eb74a6601a0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetAttributeChangeImpl.java @@ -26,24 +26,27 @@ public class SetAttributeChangeImpl implements SetAttributeChange, ModelBase { private String change; - private com.commercetools.history.models.change_value.AttributeValue previousValue; + private com.commercetools.history.models.common.Attribute previousValue; - private com.commercetools.history.models.change_value.AttributeValue nextValue; + private com.commercetools.history.models.common.Attribute nextValue; private String catalogData; + private String variant; + /** * create instance with all properties */ @JsonCreator SetAttributeChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.change_value.AttributeValue previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.change_value.AttributeValue nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.Attribute previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.Attribute nextValue, + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = SET_ATTRIBUTE_CHANGE; } @@ -74,7 +77,7 @@ public String getChange() { *

                                                                                        Value before the change.

                                                                                        */ - public com.commercetools.history.models.change_value.AttributeValue getPreviousValue() { + public com.commercetools.history.models.common.Attribute getPreviousValue() { return this.previousValue; } @@ -82,11 +85,12 @@ public com.commercetools.history.models.change_value.AttributeValue getPreviousV *

                                                                                        Value after the change.

                                                                                        */ - public com.commercetools.history.models.change_value.AttributeValue getNextValue() { + public com.commercetools.history.models.common.Attribute getNextValue() { return this.nextValue; } /** + *

                                                                                        Product data that was updated.

                                                                                        *
                                                                                          *
                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                        • *
                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                        • @@ -97,15 +101,24 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                          Identifier of the updated Product Variant.

                                                                                          + *

                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                          + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.change_value.AttributeValue previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.Attribute previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.change_value.AttributeValue nextValue) { + public void setNextValue(final com.commercetools.history.models.common.Attribute nextValue) { this.nextValue = nextValue; } @@ -113,6 +126,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -128,11 +145,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -143,6 +162,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -153,6 +173,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChange.java new file mode 100644 index 00000000000..942450092e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChange.java @@ -0,0 +1,209 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                          Change triggered by the Set Billing Address CustomField update action.

                                                                                          + * + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBillingAddressCustomFieldChange setBillingAddressCustomFieldChange = SetBillingAddressCustomFieldChange.builder()
                                                                                          + *             .change("{change}")
                                                                                          + *             .name("{name}")
                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                          + *             .build()
                                                                                          + * 
                                                                                          + *
                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetBillingAddressCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetBillingAddressCustomFieldChangeImpl.class) +public interface SetBillingAddressCustomFieldChange extends Change { + + /** + * discriminator value for SetBillingAddressCustomFieldChange + */ + String SET_BILLING_ADDRESS_CUSTOM_FIELD_CHANGE = "SetBillingAddressCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                          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); + + /** + *

                                                                                          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 SetBillingAddressCustomFieldChange + */ + public static SetBillingAddressCustomFieldChange of() { + return new SetBillingAddressCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetBillingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetBillingAddressCustomFieldChange of(final SetBillingAddressCustomFieldChange template) { + SetBillingAddressCustomFieldChangeImpl instance = new SetBillingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetBillingAddressCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetBillingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetBillingAddressCustomFieldChange deepCopy( + @Nullable final SetBillingAddressCustomFieldChange template) { + if (template == null) { + return null; + } + SetBillingAddressCustomFieldChangeImpl instance = new SetBillingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetBillingAddressCustomFieldChange + * @return builder + */ + public static SetBillingAddressCustomFieldChangeBuilder builder() { + return SetBillingAddressCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetBillingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBillingAddressCustomFieldChangeBuilder builder(final SetBillingAddressCustomFieldChange template) { + return SetBillingAddressCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetBillingAddressCustomFieldChange(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/SetBillingAddressCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..4dadb4646c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeBuilder.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetBillingAddressCustomFieldChangeBuilder + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBillingAddressCustomFieldChange setBillingAddressCustomFieldChange = SetBillingAddressCustomFieldChange.builder()
                                                                                          + *             .change("{change}")
                                                                                          + *             .name("{name}")
                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                          + *             .build()
                                                                                          + * 
                                                                                          + *
                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetBillingAddressCustomFieldChangeBuilder implements Builder { + + private String change; + + 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 SetBillingAddressCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                          Name of the Custom Field.

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

                                                                                          id of the referenced Type.

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

                                                                                          Value before the change.

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

                                                                                          Value after the change.

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

                                                                                          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 SetBillingAddressCustomFieldChange with checking for non-null required values + * @return SetBillingAddressCustomFieldChange + */ + public SetBillingAddressCustomFieldChange build() { + Objects.requireNonNull(change, SetBillingAddressCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(name, SetBillingAddressCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetBillingAddressCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetBillingAddressCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetBillingAddressCustomFieldChange.class + ": nextValue is missing"); + return new SetBillingAddressCustomFieldChangeImpl(change, name, customTypeId, previousValue, nextValue); + } + + /** + * builds SetBillingAddressCustomFieldChange without checking for non-null required values + * @return SetBillingAddressCustomFieldChange + */ + public SetBillingAddressCustomFieldChange buildUnchecked() { + return new SetBillingAddressCustomFieldChangeImpl(change, name, customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetBillingAddressCustomFieldChangeBuilder + * @return builder + */ + public static SetBillingAddressCustomFieldChangeBuilder of() { + return new SetBillingAddressCustomFieldChangeBuilder(); + } + + /** + * create builder for SetBillingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBillingAddressCustomFieldChangeBuilder of(final SetBillingAddressCustomFieldChange template) { + SetBillingAddressCustomFieldChangeBuilder builder = new SetBillingAddressCustomFieldChangeBuilder(); + builder.change = template.getChange(); + 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/SetBillingAddressCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeImpl.java new file mode 100644 index 00000000000..46dcf061cef --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeImpl.java @@ -0,0 +1,179 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                          Change triggered by the Set Billing Address CustomField update action.

                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetBillingAddressCustomFieldChangeImpl implements SetBillingAddressCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetBillingAddressCustomFieldChangeImpl(@JsonProperty("change") final String change, + @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.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_BILLING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetBillingAddressCustomFieldChangeImpl() { + this.type = SET_BILLING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                          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 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; + + SetBillingAddressCustomFieldChangeImpl that = (SetBillingAddressCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .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(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetBillingAddressCustomFieldChange copyDeep() { + return SetBillingAddressCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChange.java new file mode 100644 index 00000000000..d6c776f02be --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChange.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                          Change triggered by the Set Billing Address Custom Type update action.

                                                                                          + * + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBillingAddressCustomTypeChange setBillingAddressCustomTypeChange = SetBillingAddressCustomTypeChange.builder()
                                                                                          + *             .change("{change}")
                                                                                          + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                          + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                          + *             .build()
                                                                                          + * 
                                                                                          + *
                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetBillingAddressCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetBillingAddressCustomTypeChangeImpl.class) +public interface SetBillingAddressCustomTypeChange extends Change { + + /** + * discriminator value for SetBillingAddressCustomTypeChange + */ + String SET_BILLING_ADDRESS_CUSTOM_TYPE_CHANGE = "SetBillingAddressCustomTypeChange"; + + /** + * + * @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 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); + + /** + *

                                                                                          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 SetBillingAddressCustomTypeChange + */ + public static SetBillingAddressCustomTypeChange of() { + return new SetBillingAddressCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetBillingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetBillingAddressCustomTypeChange of(final SetBillingAddressCustomTypeChange template) { + SetBillingAddressCustomTypeChangeImpl instance = new SetBillingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetBillingAddressCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetBillingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetBillingAddressCustomTypeChange deepCopy( + @Nullable final SetBillingAddressCustomTypeChange template) { + if (template == null) { + return null; + } + SetBillingAddressCustomTypeChangeImpl instance = new SetBillingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + 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 SetBillingAddressCustomTypeChange + * @return builder + */ + public static SetBillingAddressCustomTypeChangeBuilder builder() { + return SetBillingAddressCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetBillingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBillingAddressCustomTypeChangeBuilder builder(final SetBillingAddressCustomTypeChange template) { + return SetBillingAddressCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetBillingAddressCustomTypeChange(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/SetBillingAddressCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..6d8d20773cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeBuilder.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; + +/** + * SetBillingAddressCustomTypeChangeBuilder + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBillingAddressCustomTypeChange setBillingAddressCustomTypeChange = SetBillingAddressCustomTypeChange.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 SetBillingAddressCustomTypeChangeBuilder implements Builder { + + private String change; + + 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 SetBillingAddressCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                          Value before the change.

                                                                                          + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetBillingAddressCustomTypeChangeBuilder 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 SetBillingAddressCustomTypeChangeBuilder 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 SetBillingAddressCustomTypeChangeBuilder 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 SetBillingAddressCustomTypeChangeBuilder 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 SetBillingAddressCustomTypeChangeBuilder 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 SetBillingAddressCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                          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 SetBillingAddressCustomTypeChange with checking for non-null required values + * @return SetBillingAddressCustomTypeChange + */ + public SetBillingAddressCustomTypeChange build() { + Objects.requireNonNull(change, SetBillingAddressCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetBillingAddressCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetBillingAddressCustomTypeChange.class + ": nextValue is missing"); + return new SetBillingAddressCustomTypeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetBillingAddressCustomTypeChange without checking for non-null required values + * @return SetBillingAddressCustomTypeChange + */ + public SetBillingAddressCustomTypeChange buildUnchecked() { + return new SetBillingAddressCustomTypeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetBillingAddressCustomTypeChangeBuilder + * @return builder + */ + public static SetBillingAddressCustomTypeChangeBuilder of() { + return new SetBillingAddressCustomTypeChangeBuilder(); + } + + /** + * create builder for SetBillingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBillingAddressCustomTypeChangeBuilder of(final SetBillingAddressCustomTypeChange template) { + SetBillingAddressCustomTypeChangeBuilder builder = new SetBillingAddressCustomTypeChangeBuilder(); + 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/SetBillingAddressCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeImpl.java new file mode 100644 index 00000000000..205ad64659a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                          Change triggered by the Set Billing Address Custom Type update action.

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

                                                                                          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 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; + + SetBillingAddressCustomTypeChangeImpl that = (SetBillingAddressCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetBillingAddressCustomTypeChange copyDeep() { + return SetBillingAddressCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChange.java new file mode 100644 index 00000000000..f68b0e0e8e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChange.java @@ -0,0 +1,179 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                          Change triggered by the Set Business Unit update action.

                                                                                          + * + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBusinessUnitChange setBusinessUnitChange = SetBusinessUnitChange.builder()
                                                                                          + *             .change("{change}")
                                                                                          + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                          + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                          + *             .build()
                                                                                          + * 
                                                                                          + *
                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetBusinessUnitChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetBusinessUnitChangeImpl.class) +public interface SetBusinessUnitChange extends Change { + + /** + * discriminator value for SetBusinessUnitChange + */ + String SET_BUSINESS_UNIT_CHANGE = "SetBusinessUnitChange"; + + /** + * + * @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 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 SetBusinessUnitChange + */ + public static SetBusinessUnitChange of() { + return new SetBusinessUnitChangeImpl(); + } + + /** + * factory method to create a shallow copy SetBusinessUnitChange + * @param template instance to be copied + * @return copy instance + */ + public static SetBusinessUnitChange of(final SetBusinessUnitChange template) { + SetBusinessUnitChangeImpl instance = new SetBusinessUnitChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetBusinessUnitChange copyDeep(); + + /** + * factory method to create a deep copy of SetBusinessUnitChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetBusinessUnitChange deepCopy(@Nullable final SetBusinessUnitChange template) { + if (template == null) { + return null; + } + SetBusinessUnitChangeImpl instance = new SetBusinessUnitChangeImpl(); + 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 SetBusinessUnitChange + * @return builder + */ + public static SetBusinessUnitChangeBuilder builder() { + return SetBusinessUnitChangeBuilder.of(); + } + + /** + * create builder for SetBusinessUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBusinessUnitChangeBuilder builder(final SetBusinessUnitChange template) { + return SetBusinessUnitChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetBusinessUnitChange(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/SetBusinessUnitChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeBuilder.java new file mode 100644 index 00000000000..5022a029d28 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeBuilder.java @@ -0,0 +1,159 @@ + +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; + +/** + * SetBusinessUnitChangeBuilder + *
                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                          + *
                                                                                          
                                                                                          + *     SetBusinessUnitChange setBusinessUnitChange = SetBusinessUnitChange.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 SetBusinessUnitChangeBuilder 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 SetBusinessUnitChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                          Value before the change.

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

                                                                                          Value before the change.

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

                                                                                          Value after the change.

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

                                                                                          Value after the change.

                                                                                          + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetBusinessUnitChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + 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 SetBusinessUnitChange with checking for non-null required values + * @return SetBusinessUnitChange + */ + public SetBusinessUnitChange build() { + Objects.requireNonNull(change, SetBusinessUnitChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetBusinessUnitChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetBusinessUnitChange.class + ": nextValue is missing"); + return new SetBusinessUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetBusinessUnitChange without checking for non-null required values + * @return SetBusinessUnitChange + */ + public SetBusinessUnitChange buildUnchecked() { + return new SetBusinessUnitChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetBusinessUnitChangeBuilder + * @return builder + */ + public static SetBusinessUnitChangeBuilder of() { + return new SetBusinessUnitChangeBuilder(); + } + + /** + * create builder for SetBusinessUnitChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetBusinessUnitChangeBuilder of(final SetBusinessUnitChange template) { + SetBusinessUnitChangeBuilder builder = new SetBusinessUnitChangeBuilder(); + 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/SetBusinessUnitChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeImpl.java new file mode 100644 index 00000000000..2e0ed3426bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                          Change triggered by the Set Business Unit update action.

                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetBusinessUnitChangeImpl implements SetBusinessUnitChange, 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 + SetBusinessUnitChangeImpl(@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 = SET_BUSINESS_UNIT_CHANGE; + } + + /** + * create empty instance + */ + public SetBusinessUnitChangeImpl() { + this.type = SET_BUSINESS_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; + + SetBusinessUnitChangeImpl that = (SetBusinessUnitChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetBusinessUnitChange copyDeep() { + return SetBusinessUnitChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChange.java index 20f7d5f9034..7b89cafab37 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChange.java @@ -78,6 +78,7 @@ public interface SetCategoryOrderHintChange extends Change { public CategoryOrderHints getNextValue(); /** + *

                                                                                          Product data that was updated.

                                                                                          *
                                                                                            *
                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                          • *
                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                          • @@ -118,6 +119,7 @@ public interface SetCategoryOrderHintChange extends Change { public void setNextValue(final CategoryOrderHints nextValue); /** + *

                                                                                            Product data that was updated.

                                                                                            *
                                                                                              *
                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                            • *
                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                            • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeBuilder.java index 71a0c8e168c..8dc95ecabb3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeBuilder.java @@ -121,6 +121,7 @@ public SetCategoryOrderHintChangeBuilder nextValue( } /** + *

                                                                                              Product data that was updated.

                                                                                              *
                                                                                                *
                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                              • *
                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                              • @@ -173,6 +174,7 @@ public com.commercetools.history.models.common.CategoryOrderHints getNextValue() } /** + *

                                                                                                Product data that was updated.

                                                                                                *
                                                                                                  *
                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                • *
                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeImpl.java index 4ad95d9505a..fa2a02770d2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCategoryOrderHintChangeImpl.java @@ -91,6 +91,7 @@ public com.commercetools.history.models.common.CategoryOrderHints getNextValue() } /** + *

                                                                                                  Product data that was updated.

                                                                                                  *
                                                                                                    *
                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                  • *
                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                  • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChange.java index f0ffe2b45e6..527838a3558 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChange.java @@ -26,6 +26,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -72,6 +74,22 @@ public interface SetChannelRolesChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + @NotNull + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + @NotNull + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -109,6 +127,36 @@ public interface SetChannelRolesChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final ChannelRoleEnum... addedItems); + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final ChannelRoleEnum... removedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetChannelRolesChange @@ -127,6 +175,8 @@ public static SetChannelRolesChange of(final SetChannelRolesChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -146,6 +196,8 @@ public static SetChannelRolesChange deepCopy(@Nullable final SetChannelRolesChan instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()).map(ArrayList::new).orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeBuilder.java index 9f26f6605a9..3a9170879cc 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeBuilder.java @@ -16,6 +16,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -29,6 +31,10 @@ public class SetChannelRolesChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -118,6 +124,84 @@ public SetChannelRolesChangeBuilder plusNextValue( return this; } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder addedItems( + final com.commercetools.history.models.common.ChannelRoleEnum... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.ChannelRoleEnum... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder removedItems( + final com.commercetools.history.models.common.ChannelRoleEnum... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetChannelRolesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.ChannelRoleEnum... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + /** * value of change} * @return change @@ -145,6 +229,24 @@ public java.util.List g return this.nextValue; } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetChannelRolesChange with checking for non-null required values * @return SetChannelRolesChange @@ -153,7 +255,9 @@ public SetChannelRolesChange build() { Objects.requireNonNull(change, SetChannelRolesChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetChannelRolesChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetChannelRolesChange.class + ": nextValue is missing"); - return new SetChannelRolesChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetChannelRolesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetChannelRolesChange.class + ": removedItems is missing"); + return new SetChannelRolesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -161,7 +265,7 @@ public SetChannelRolesChange build() { * @return SetChannelRolesChange */ public SetChannelRolesChange buildUnchecked() { - return new SetChannelRolesChangeImpl(change, previousValue, nextValue); + return new SetChannelRolesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -182,6 +286,8 @@ public static SetChannelRolesChangeBuilder of(final SetChannelRolesChange templa builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeImpl.java index d49529c633c..8f2d43737b9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeImpl.java @@ -30,16 +30,24 @@ public class SetChannelRolesChangeImpl implements SetChannelRolesChange, ModelBa private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetChannelRolesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_CHANNEL_ROLES_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List g return this.nextValue; } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,24 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.ChannelRoleEnum... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +159,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +176,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +187,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChange.java index 32e8cf79c28..d94abeaa237 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChange.java @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetCountriesChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetCountriesChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final StoreCountry... addedItems); + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final StoreCountry... removedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetCountriesChange @@ -131,6 +181,8 @@ public static SetCountriesChange of(final SetCountriesChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetCountriesChange deepCopy(@Nullable final SetCountriesChange tem .map(com.commercetools.history.models.common.StoreCountry::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.StoreCountry::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.StoreCountry::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeBuilder.java index 6e10c50d555..088cfccaa1b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetCountriesChangeBuilder implements Builder { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -219,6 +225,184 @@ public SetCountriesChangeBuilder setNextValue( return nextValue(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of())); } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder addedItems( + final com.commercetools.history.models.common.StoreCountry... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.StoreCountry... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of())); + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder setAddedItems( + Function builder) { + return addedItems(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of())); + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder removedItems( + final com.commercetools.history.models.common.StoreCountry... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCountriesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.StoreCountry... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of())); + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCountriesChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.StoreCountryBuilder.of())); + } + /** * value of change} * @return change @@ -246,6 +430,24 @@ public java.util.List getN return this.nextValue; } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetCountriesChange with checking for non-null required values * @return SetCountriesChange @@ -254,7 +456,9 @@ public SetCountriesChange build() { Objects.requireNonNull(change, SetCountriesChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetCountriesChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetCountriesChange.class + ": nextValue is missing"); - return new SetCountriesChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetCountriesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetCountriesChange.class + ": removedItems is missing"); + return new SetCountriesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -262,7 +466,7 @@ public SetCountriesChange build() { * @return SetCountriesChange */ public SetCountriesChange buildUnchecked() { - return new SetCountriesChangeImpl(change, previousValue, nextValue); + return new SetCountriesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -283,6 +487,8 @@ public static SetCountriesChangeBuilder of(final SetCountriesChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeImpl.java index 5268baa39de..b89ab32c522 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCountriesChangeImpl.java @@ -30,16 +30,24 @@ public class SetCountriesChangeImpl implements SetCountriesChange, ModelBase { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetCountriesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_COUNTRIES_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getN return this.nextValue; } + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,23 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.StoreCountry... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +158,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +175,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +186,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChange.java index 16871d72d25..82c5bf3875d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChange.java @@ -32,6 +32,7 @@ * .name("{name}") * .customLineItem(customLineItemBuilder -> customLineItemBuilder) * .customLineItemId("{customLineItemId}") + * .customTypeId("{customTypeId}") * .build() * * @@ -103,6 +104,14 @@ public interface SetCustomLineItemCustomFieldChange extends Change { @JsonProperty("customLineItemId") public String getCustomLineItemId(); + /** + *

                                                                                                    id of the referenced Type.

                                                                                                    + * @return customTypeId + */ + @NotNull + @JsonProperty("customTypeId") + public String getCustomTypeId(); + /** * set change * @param change value to be set @@ -145,6 +154,13 @@ public interface SetCustomLineItemCustomFieldChange extends Change { public void setCustomLineItemId(final String customLineItemId); + /** + *

                                                                                                    id of the referenced Type.

                                                                                                    + * @param customTypeId value to be set + */ + + public void setCustomTypeId(final String customTypeId); + /** * factory method * @return instance of SetCustomLineItemCustomFieldChange @@ -166,6 +182,7 @@ public static SetCustomLineItemCustomFieldChange of(final SetCustomLineItemCusto instance.setName(template.getName()); instance.setCustomLineItem(template.getCustomLineItem()); instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomTypeId(template.getCustomTypeId()); return instance; } @@ -190,6 +207,7 @@ public static SetCustomLineItemCustomFieldChange deepCopy( instance.setCustomLineItem( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomTypeId(template.getCustomTypeId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeBuilder.java index c6f17040166..1ec14262ea2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeBuilder.java @@ -18,6 +18,7 @@ * .name("{name}") * .customLineItem(customLineItemBuilder -> customLineItemBuilder) * .customLineItemId("{customLineItemId}") + * .customTypeId("{customTypeId}") * .build() * * @@ -37,6 +38,8 @@ public class SetCustomLineItemCustomFieldChangeBuilder implements Builderid of the referenced Type.

                                                                                                    + * @param customTypeId value to be set + * @return Builder + */ + + public SetCustomLineItemCustomFieldChangeBuilder customTypeId(final String customTypeId) { + this.customTypeId = customTypeId; + return this; + } + /** * value of change} * @return change @@ -183,6 +197,15 @@ public String getCustomLineItemId() { return this.customLineItemId; } + /** + *

                                                                                                    id of the referenced Type.

                                                                                                    + * @return customTypeId + */ + + public String getCustomTypeId() { + return this.customTypeId; + } + /** * builds SetCustomLineItemCustomFieldChange with checking for non-null required values * @return SetCustomLineItemCustomFieldChange @@ -196,8 +219,9 @@ public SetCustomLineItemCustomFieldChange build() { SetCustomLineItemCustomFieldChange.class + ": customLineItem is missing"); Objects.requireNonNull(customLineItemId, SetCustomLineItemCustomFieldChange.class + ": customLineItemId is missing"); + Objects.requireNonNull(customTypeId, SetCustomLineItemCustomFieldChange.class + ": customTypeId is missing"); return new SetCustomLineItemCustomFieldChangeImpl(change, previousValue, nextValue, name, customLineItem, - customLineItemId); + customLineItemId, customTypeId); } /** @@ -206,7 +230,7 @@ public SetCustomLineItemCustomFieldChange build() { */ public SetCustomLineItemCustomFieldChange buildUnchecked() { return new SetCustomLineItemCustomFieldChangeImpl(change, previousValue, nextValue, name, customLineItem, - customLineItemId); + customLineItemId, customTypeId); } /** @@ -230,6 +254,7 @@ public static SetCustomLineItemCustomFieldChangeBuilder of(final SetCustomLineIt builder.name = template.getName(); builder.customLineItem = template.getCustomLineItem(); builder.customLineItemId = template.getCustomLineItemId(); + builder.customTypeId = template.getCustomTypeId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeImpl.java index 91b555db452..cb9a42eea51 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeImpl.java @@ -40,6 +40,8 @@ public class SetCustomLineItemCustomFieldChangeImpl implements SetCustomLineItem private String customLineItemId; + private String customTypeId; + /** * create instance with all properties */ @@ -48,13 +50,15 @@ public class SetCustomLineItemCustomFieldChangeImpl implements SetCustomLineItem @JsonProperty("previousValue") final java.lang.Object previousValue, @JsonProperty("nextValue") final java.lang.Object nextValue, @JsonProperty("name") final String name, @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem, - @JsonProperty("customLineItemId") final String customLineItemId) { + @JsonProperty("customLineItemId") final String customLineItemId, + @JsonProperty("customTypeId") final String customTypeId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.name = name; this.customLineItem = customLineItem; this.customLineItemId = customLineItemId; + this.customTypeId = customTypeId; this.type = SET_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE; } @@ -121,6 +125,14 @@ public String getCustomLineItemId() { return this.customLineItemId; } + /** + *

                                                                                                    id of the referenced Type.

                                                                                                    + */ + + public String getCustomTypeId() { + return this.customTypeId; + } + public void setChange(final String change) { this.change = change; } @@ -145,6 +157,10 @@ public void setCustomLineItemId(final String customLineItemId) { this.customLineItemId = customLineItemId; } + public void setCustomTypeId(final String customTypeId) { + this.customTypeId = customTypeId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -162,6 +178,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(customLineItem, that.customLineItem) .append(customLineItemId, that.customLineItemId) + .append(customTypeId, that.customTypeId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -169,6 +186,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(customLineItem, that.customLineItem) .append(customLineItemId, that.customLineItemId) + .append(customTypeId, that.customTypeId) .isEquals(); } @@ -181,6 +199,7 @@ public int hashCode() { .append(name) .append(customLineItem) .append(customLineItemId) + .append(customTypeId) .toHashCode(); } @@ -193,6 +212,7 @@ public String toString() { .append("name", name) .append("customLineItem", customLineItem) .append("customLineItemId", customLineItemId) + .append("customTypeId", customTypeId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChange.java new file mode 100644 index 00000000000..ac34760b3bf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChange.java @@ -0,0 +1,222 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.DiscountedLineItemPrice; +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered after a recalculation of discount on a Custom Line Item.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomLineItemDiscountedPriceChange setCustomLineItemDiscountedPriceChange = SetCustomLineItemDiscountedPriceChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                    + *             .customLineItemId("{customLineItemId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetCustomLineItemDiscountedPriceChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetCustomLineItemDiscountedPriceChangeImpl.class) +public interface SetCustomLineItemDiscountedPriceChange extends Change { + + /** + * discriminator value for SetCustomLineItemDiscountedPriceChange + */ + String SET_CUSTOM_LINE_ITEM_DISCOUNTED_PRICE_CHANGE = "SetCustomLineItemDiscountedPriceChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + @NotNull + @Valid + @JsonProperty("customLineItem") + public LocalizedString getCustomLineItem(); + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + * @return customLineItemId + */ + @NotNull + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @param customLineItem value to be set + */ + + public void setCustomLineItem(final LocalizedString customLineItem); + + /** + *

                                                                                                    id of the updated CustomLineItem.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + */ + + public void setNextValue(final DiscountedLineItemPrice nextValue); + + /** + * factory method + * @return instance of SetCustomLineItemDiscountedPriceChange + */ + public static SetCustomLineItemDiscountedPriceChange of() { + return new SetCustomLineItemDiscountedPriceChangeImpl(); + } + + /** + * factory method to create a shallow copy SetCustomLineItemDiscountedPriceChange + * @param template instance to be copied + * @return copy instance + */ + public static SetCustomLineItemDiscountedPriceChange of(final SetCustomLineItemDiscountedPriceChange template) { + SetCustomLineItemDiscountedPriceChangeImpl instance = new SetCustomLineItemDiscountedPriceChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem(template.getCustomLineItem()); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetCustomLineItemDiscountedPriceChange copyDeep(); + + /** + * factory method to create a deep copy of SetCustomLineItemDiscountedPriceChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetCustomLineItemDiscountedPriceChange deepCopy( + @Nullable final SetCustomLineItemDiscountedPriceChange template) { + if (template == null) { + return null; + } + SetCustomLineItemDiscountedPriceChangeImpl instance = new SetCustomLineItemDiscountedPriceChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setPreviousValue( + com.commercetools.history.models.common.DiscountedLineItemPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.DiscountedLineItemPrice.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetCustomLineItemDiscountedPriceChange + * @return builder + */ + public static SetCustomLineItemDiscountedPriceChangeBuilder builder() { + return SetCustomLineItemDiscountedPriceChangeBuilder.of(); + } + + /** + * create builder for SetCustomLineItemDiscountedPriceChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomLineItemDiscountedPriceChangeBuilder builder( + final SetCustomLineItemDiscountedPriceChange template) { + return SetCustomLineItemDiscountedPriceChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetCustomLineItemDiscountedPriceChange( + 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/SetCustomLineItemDiscountedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeBuilder.java new file mode 100644 index 00000000000..68e3aea105f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeBuilder.java @@ -0,0 +1,267 @@ + +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; + +/** + * SetCustomLineItemDiscountedPriceChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomLineItemDiscountedPriceChange setCustomLineItemDiscountedPriceChange = SetCustomLineItemDiscountedPriceChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                    + *             .customLineItemId("{customLineItemId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetCustomLineItemDiscountedPriceChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.LocalizedString customLineItem; + + private String customLineItemId; + + private com.commercetools.history.models.common.DiscountedLineItemPrice previousValue; + + private com.commercetools.history.models.common.DiscountedLineItemPrice nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetCustomLineItemDiscountedPriceChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    id of the updated CustomLineItem.

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

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + * @return customLineItemId + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @return nextValue + */ + + public com.commercetools.history.models.common.DiscountedLineItemPrice getNextValue() { + return this.nextValue; + } + + /** + * builds SetCustomLineItemDiscountedPriceChange with checking for non-null required values + * @return SetCustomLineItemDiscountedPriceChange + */ + public SetCustomLineItemDiscountedPriceChange build() { + Objects.requireNonNull(change, SetCustomLineItemDiscountedPriceChange.class + ": change is missing"); + Objects.requireNonNull(customLineItem, + SetCustomLineItemDiscountedPriceChange.class + ": customLineItem is missing"); + Objects.requireNonNull(customLineItemId, + SetCustomLineItemDiscountedPriceChange.class + ": customLineItemId is missing"); + Objects.requireNonNull(previousValue, + SetCustomLineItemDiscountedPriceChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetCustomLineItemDiscountedPriceChange.class + ": nextValue is missing"); + return new SetCustomLineItemDiscountedPriceChangeImpl(change, customLineItem, customLineItemId, previousValue, + nextValue); + } + + /** + * builds SetCustomLineItemDiscountedPriceChange without checking for non-null required values + * @return SetCustomLineItemDiscountedPriceChange + */ + public SetCustomLineItemDiscountedPriceChange buildUnchecked() { + return new SetCustomLineItemDiscountedPriceChangeImpl(change, customLineItem, customLineItemId, previousValue, + nextValue); + } + + /** + * factory method for an instance of SetCustomLineItemDiscountedPriceChangeBuilder + * @return builder + */ + public static SetCustomLineItemDiscountedPriceChangeBuilder of() { + return new SetCustomLineItemDiscountedPriceChangeBuilder(); + } + + /** + * create builder for SetCustomLineItemDiscountedPriceChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomLineItemDiscountedPriceChangeBuilder of( + final SetCustomLineItemDiscountedPriceChange template) { + SetCustomLineItemDiscountedPriceChangeBuilder builder = new SetCustomLineItemDiscountedPriceChangeBuilder(); + builder.change = template.getChange(); + builder.customLineItem = template.getCustomLineItem(); + builder.customLineItemId = template.getCustomLineItemId(); + 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/SetCustomLineItemDiscountedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeImpl.java new file mode 100644 index 00000000000..95d889926ac --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeImpl.java @@ -0,0 +1,180 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered after a recalculation of discount on a Custom Line Item.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + */ + + public com.commercetools.history.models.common.DiscountedLineItemPrice getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + public void setPreviousValue(final com.commercetools.history.models.common.DiscountedLineItemPrice previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.DiscountedLineItemPrice nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetCustomLineItemDiscountedPriceChangeImpl that = (SetCustomLineItemDiscountedPriceChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(customLineItem) + .append(customLineItemId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("customLineItem", customLineItem) + .append("customLineItemId", customLineItemId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetCustomLineItemDiscountedPriceChange copyDeep() { + return SetCustomLineItemDiscountedPriceChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChange.java new file mode 100644 index 00000000000..ee97722972c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChange.java @@ -0,0 +1,223 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity; +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered after a recalculation of discount on a Custom Line Item.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomLineItemDiscountedPricePerQuantityChange setCustomLineItemDiscountedPricePerQuantityChange = SetCustomLineItemDiscountedPricePerQuantityChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                    + *             .customLineItemId("{customLineItemId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetCustomLineItemDiscountedPricePerQuantityChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetCustomLineItemDiscountedPricePerQuantityChangeImpl.class) +public interface SetCustomLineItemDiscountedPricePerQuantityChange extends Change { + + /** + * discriminator value for SetCustomLineItemDiscountedPricePerQuantityChange + */ + String SET_CUSTOM_LINE_ITEM_DISCOUNTED_PRICE_PER_QUANTITY_CHANGE = "SetCustomLineItemDiscountedPricePerQuantityChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + @NotNull + @Valid + @JsonProperty("customLineItem") + public LocalizedString getCustomLineItem(); + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + * @return customLineItemId + */ + @NotNull + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @param customLineItem value to be set + */ + + public void setCustomLineItem(final LocalizedString customLineItem); + + /** + *

                                                                                                    id of the updated CustomLineItem.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + */ + + public void setNextValue(final DiscountedLineItemPriceForQuantity nextValue); + + /** + * factory method + * @return instance of SetCustomLineItemDiscountedPricePerQuantityChange + */ + public static SetCustomLineItemDiscountedPricePerQuantityChange of() { + return new SetCustomLineItemDiscountedPricePerQuantityChangeImpl(); + } + + /** + * factory method to create a shallow copy SetCustomLineItemDiscountedPricePerQuantityChange + * @param template instance to be copied + * @return copy instance + */ + public static SetCustomLineItemDiscountedPricePerQuantityChange of( + final SetCustomLineItemDiscountedPricePerQuantityChange template) { + SetCustomLineItemDiscountedPricePerQuantityChangeImpl instance = new SetCustomLineItemDiscountedPricePerQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem(template.getCustomLineItem()); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetCustomLineItemDiscountedPricePerQuantityChange copyDeep(); + + /** + * factory method to create a deep copy of SetCustomLineItemDiscountedPricePerQuantityChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetCustomLineItemDiscountedPricePerQuantityChange deepCopy( + @Nullable final SetCustomLineItemDiscountedPricePerQuantityChange template) { + if (template == null) { + return null; + } + SetCustomLineItemDiscountedPricePerQuantityChangeImpl instance = new SetCustomLineItemDiscountedPricePerQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setPreviousValue(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity + .deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity + .deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetCustomLineItemDiscountedPricePerQuantityChange + * @return builder + */ + public static SetCustomLineItemDiscountedPricePerQuantityChangeBuilder builder() { + return SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.of(); + } + + /** + * create builder for SetCustomLineItemDiscountedPricePerQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomLineItemDiscountedPricePerQuantityChangeBuilder builder( + final SetCustomLineItemDiscountedPricePerQuantityChange template) { + return SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetCustomLineItemDiscountedPricePerQuantityChange( + 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/SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.java new file mode 100644 index 00000000000..12b062bc458 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeBuilder.java @@ -0,0 +1,273 @@ + +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; + +/** + * SetCustomLineItemDiscountedPricePerQuantityChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomLineItemDiscountedPricePerQuantityChange setCustomLineItemDiscountedPricePerQuantityChange = SetCustomLineItemDiscountedPricePerQuantityChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                    + *             .customLineItemId("{customLineItemId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetCustomLineItemDiscountedPricePerQuantityChangeBuilder + implements Builder { + + private String change; + + private com.commercetools.history.models.common.LocalizedString customLineItem; + + private String customLineItemId; + + private com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity previousValue; + + private com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetCustomLineItemDiscountedPricePerQuantityChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    id of the updated CustomLineItem.

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

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + * @return customLineItemId + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @return nextValue + */ + + public com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity getNextValue() { + return this.nextValue; + } + + /** + * builds SetCustomLineItemDiscountedPricePerQuantityChange with checking for non-null required values + * @return SetCustomLineItemDiscountedPricePerQuantityChange + */ + public SetCustomLineItemDiscountedPricePerQuantityChange build() { + Objects.requireNonNull(change, SetCustomLineItemDiscountedPricePerQuantityChange.class + ": change is missing"); + Objects.requireNonNull(customLineItem, + SetCustomLineItemDiscountedPricePerQuantityChange.class + ": customLineItem is missing"); + Objects.requireNonNull(customLineItemId, + SetCustomLineItemDiscountedPricePerQuantityChange.class + ": customLineItemId is missing"); + Objects.requireNonNull(previousValue, + SetCustomLineItemDiscountedPricePerQuantityChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, + SetCustomLineItemDiscountedPricePerQuantityChange.class + ": nextValue is missing"); + return new SetCustomLineItemDiscountedPricePerQuantityChangeImpl(change, customLineItem, customLineItemId, + previousValue, nextValue); + } + + /** + * builds SetCustomLineItemDiscountedPricePerQuantityChange without checking for non-null required values + * @return SetCustomLineItemDiscountedPricePerQuantityChange + */ + public SetCustomLineItemDiscountedPricePerQuantityChange buildUnchecked() { + return new SetCustomLineItemDiscountedPricePerQuantityChangeImpl(change, customLineItem, customLineItemId, + previousValue, nextValue); + } + + /** + * factory method for an instance of SetCustomLineItemDiscountedPricePerQuantityChangeBuilder + * @return builder + */ + public static SetCustomLineItemDiscountedPricePerQuantityChangeBuilder of() { + return new SetCustomLineItemDiscountedPricePerQuantityChangeBuilder(); + } + + /** + * create builder for SetCustomLineItemDiscountedPricePerQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomLineItemDiscountedPricePerQuantityChangeBuilder of( + final SetCustomLineItemDiscountedPricePerQuantityChange template) { + SetCustomLineItemDiscountedPricePerQuantityChangeBuilder builder = new SetCustomLineItemDiscountedPricePerQuantityChangeBuilder(); + builder.change = template.getChange(); + builder.customLineItem = template.getCustomLineItem(); + builder.customLineItemId = template.getCustomLineItemId(); + 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/SetCustomLineItemDiscountedPricePerQuantityChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeImpl.java new file mode 100644 index 00000000000..3e553b0c928 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeImpl.java @@ -0,0 +1,183 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered after a recalculation of discount on a Custom Line Item.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                    id of the updated CustomLineItem.

                                                                                                    + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + */ + + public com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + public void setPreviousValue( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetCustomLineItemDiscountedPricePerQuantityChangeImpl that = (SetCustomLineItemDiscountedPricePerQuantityChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(customLineItem) + .append(customLineItemId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("customLineItem", customLineItem) + .append("customLineItemId", customLineItemId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetCustomLineItemDiscountedPricePerQuantityChange copyDeep() { + return SetCustomLineItemDiscountedPricePerQuantityChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChange.java index be7f4e8bbb3..1d12915e7b4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChange.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; import com.commercetools.history.models.common.ItemShippingDetails; +import com.commercetools.history.models.common.LocalizedString; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -32,6 +33,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .customLineItemId("{customLineItemId}") + * .customLineItem(customLineItemBuilder -> customLineItemBuilder) * .build() * * @@ -88,6 +90,15 @@ public interface SetCustomLineItemShippingDetailsChange extends Change { @JsonProperty("customLineItemId") public String getCustomLineItemId(); + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + @NotNull + @Valid + @JsonProperty("customLineItem") + public LocalizedString getCustomLineItem(); + /** * set change * @param change value to be set @@ -116,6 +127,13 @@ public interface SetCustomLineItemShippingDetailsChange extends Change { public void setCustomLineItemId(final String customLineItemId); + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @param customLineItem value to be set + */ + + public void setCustomLineItem(final LocalizedString customLineItem); + /** * factory method * @return instance of SetCustomLineItemShippingDetailsChange @@ -135,6 +153,7 @@ public static SetCustomLineItemShippingDetailsChange of(final SetCustomLineItemS instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItem(template.getCustomLineItem()); return instance; } @@ -158,6 +177,8 @@ public static SetCustomLineItemShippingDetailsChange deepCopy( instance.setNextValue( com.commercetools.history.models.common.ItemShippingDetails.deepCopy(template.getNextValue())); instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setCustomLineItem( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeBuilder.java index 01bc3db54df..2f0daa61934 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeBuilder.java @@ -18,6 +18,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .customLineItemId("{customLineItemId}") + * .customLineItem(customLineItemBuilder -> customLineItemBuilder) * .build() * * @@ -33,6 +34,8 @@ public class SetCustomLineItemShippingDetailsChangeBuilder implements BuilderName of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @param customLineItem value to be set + * @return Builder + */ + + public SetCustomLineItemShippingDetailsChangeBuilder customLineItem( + final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + return this; + } + /** * value of change} * @return change @@ -164,6 +204,15 @@ public String getCustomLineItemId() { return this.customLineItemId; } + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + * @return customLineItem + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + /** * builds SetCustomLineItemShippingDetailsChange with checking for non-null required values * @return SetCustomLineItemShippingDetailsChange @@ -175,7 +224,10 @@ public SetCustomLineItemShippingDetailsChange build() { Objects.requireNonNull(nextValue, SetCustomLineItemShippingDetailsChange.class + ": nextValue is missing"); Objects.requireNonNull(customLineItemId, SetCustomLineItemShippingDetailsChange.class + ": customLineItemId is missing"); - return new SetCustomLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, customLineItemId); + Objects.requireNonNull(customLineItem, + SetCustomLineItemShippingDetailsChange.class + ": customLineItem is missing"); + return new SetCustomLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, customLineItemId, + customLineItem); } /** @@ -183,7 +235,8 @@ public SetCustomLineItemShippingDetailsChange build() { * @return SetCustomLineItemShippingDetailsChange */ public SetCustomLineItemShippingDetailsChange buildUnchecked() { - return new SetCustomLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, customLineItemId); + return new SetCustomLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, customLineItemId, + customLineItem); } /** @@ -206,6 +259,7 @@ public static SetCustomLineItemShippingDetailsChangeBuilder of( builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.customLineItemId = template.getCustomLineItemId(); + builder.customLineItem = template.getCustomLineItem(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeImpl.java index b5c06803c1b..5d3c20d9340 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeImpl.java @@ -36,6 +36,8 @@ public class SetCustomLineItemShippingDetailsChangeImpl implements SetCustomLine private String customLineItemId; + private com.commercetools.history.models.common.LocalizedString customLineItem; + /** * create instance with all properties */ @@ -43,11 +45,13 @@ public class SetCustomLineItemShippingDetailsChangeImpl implements SetCustomLine SetCustomLineItemShippingDetailsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.ItemShippingDetails previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.ItemShippingDetails nextValue, - @JsonProperty("customLineItemId") final String customLineItemId) { + @JsonProperty("customLineItemId") final String customLineItemId, + @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.customLineItemId = customLineItemId; + this.customLineItem = customLineItem; this.type = SET_CUSTOM_LINE_ITEM_SHIPPING_DETAILS_CHANGE; } @@ -98,6 +102,14 @@ public String getCustomLineItemId() { return this.customLineItemId; } + /** + *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +126,10 @@ public void setCustomLineItemId(final String customLineItemId) { this.customLineItemId = customLineItemId; } + public void setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +145,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(customLineItemId, that.customLineItemId) + .append(customLineItem, that.customLineItem) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(customLineItemId, that.customLineItemId) + .append(customLineItem, that.customLineItem) .isEquals(); } @@ -144,6 +162,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(customLineItemId) + .append(customLineItem) .toHashCode(); } @@ -154,6 +173,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("customLineItemId", customLineItemId) + .append("customLineItem", customLineItem) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxCategoryChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxCategoryChangeBuilder.java index 1ef8d5f7132..67632b9480c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxCategoryChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxCategoryChangeBuilder.java @@ -49,13 +49,13 @@ public SetCustomLineItemTaxCategoryChangeBuilder change(final String change) { /** *

                                                                                                    Value before the change.

                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetCustomLineItemTaxCategoryChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -65,33 +65,21 @@ public SetCustomLineItemTaxCategoryChangeBuilder previousValue( * @return Builder */ - public SetCustomLineItemTaxCategoryChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value before the change.

                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - public SetCustomLineItemTaxCategoryChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                    Value after the change.

                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ public SetCustomLineItemTaxCategoryChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -101,21 +89,9 @@ public SetCustomLineItemTaxCategoryChangeBuilder nextValue( * @return Builder */ - public SetCustomLineItemTaxCategoryChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value after the change.

                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - public SetCustomLineItemTaxCategoryChangeBuilder nextValue( - final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChange.java index 364f5361386..d7e1f09af99 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChange.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; import com.commercetools.history.models.common.LocalizedString; -import com.commercetools.history.models.common.Money; +import com.commercetools.history.models.common.TaxedItemPrice; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -67,7 +67,7 @@ public interface SetCustomLineItemTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public Money getPreviousValue(); + public TaxedItemPrice getPreviousValue(); /** *

                                                                                                    Value after the change.

                                                                                                    @@ -76,7 +76,7 @@ public interface SetCustomLineItemTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public Money getNextValue(); + public TaxedItemPrice getNextValue(); /** *

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    @@ -107,14 +107,14 @@ public interface SetCustomLineItemTaxedPriceChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final Money previousValue); + public void setPreviousValue(final TaxedItemPrice previousValue); /** *

                                                                                                    Value after the change.

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

                                                                                                    Name of the updated CustomLineItem.

                                                                                                    @@ -168,8 +168,9 @@ public static SetCustomLineItemTaxedPriceChange deepCopy( } SetCustomLineItemTaxedPriceChangeImpl instance = new SetCustomLineItemTaxedPriceChangeImpl(); instance.setChange(template.getChange()); - instance.setPreviousValue(com.commercetools.history.models.common.Money.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.Money.deepCopy(template.getNextValue())); + instance.setPreviousValue( + com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getNextValue())); instance.setCustomLineItem( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); instance.setCustomLineItemId(template.getCustomLineItemId()); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeBuilder.java index 8269cc9e9a0..48f93bb883a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeBuilder.java @@ -28,9 +28,9 @@ public class SetCustomLineItemTaxedPriceChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); return this; } @@ -66,8 +66,8 @@ public SetCustomLineItemTaxedPriceChangeBuilder previousValue( */ public SetCustomLineItemTaxedPriceChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); return this; } @@ -78,7 +78,7 @@ public SetCustomLineItemTaxedPriceChangeBuilder withPreviousValue( */ public SetCustomLineItemTaxedPriceChangeBuilder previousValue( - final com.commercetools.history.models.common.Money previousValue) { + final com.commercetools.history.models.common.TaxedItemPrice previousValue) { this.previousValue = previousValue; return this; } @@ -90,8 +90,8 @@ public SetCustomLineItemTaxedPriceChangeBuilder previousValue( */ public SetCustomLineItemTaxedPriceChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); return this; } @@ -102,8 +102,8 @@ public SetCustomLineItemTaxedPriceChangeBuilder nextValue( */ public SetCustomLineItemTaxedPriceChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); return this; } @@ -114,7 +114,7 @@ public SetCustomLineItemTaxedPriceChangeBuilder withNextValue( */ public SetCustomLineItemTaxedPriceChangeBuilder nextValue( - final com.commercetools.history.models.common.Money nextValue) { + final com.commercetools.history.models.common.TaxedItemPrice nextValue) { this.nextValue = nextValue; return this; } @@ -181,7 +181,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.Money getPreviousValue() { + public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { return this.previousValue; } @@ -190,7 +190,7 @@ public com.commercetools.history.models.common.Money getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.Money getNextValue() { + public com.commercetools.history.models.common.TaxedItemPrice getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeImpl.java index 1509cbfce5c..a761ec68304 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeImpl.java @@ -26,9 +26,9 @@ public class SetCustomLineItemTaxedPriceChangeImpl implements SetCustomLineItemT private String change; - private com.commercetools.history.models.common.Money previousValue; + private com.commercetools.history.models.common.TaxedItemPrice previousValue; - private com.commercetools.history.models.common.Money nextValue; + private com.commercetools.history.models.common.TaxedItemPrice nextValue; private com.commercetools.history.models.common.LocalizedString customLineItem; @@ -39,8 +39,8 @@ public class SetCustomLineItemTaxedPriceChangeImpl implements SetCustomLineItemT */ @JsonCreator SetCustomLineItemTaxedPriceChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Money previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Money nextValue, + @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedItemPrice previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedItemPrice nextValue, @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem, @JsonProperty("customLineItemId") final String customLineItemId) { this.change = change; @@ -78,7 +78,7 @@ public String getChange() { *

                                                                                                    Value before the change.

                                                                                                    */ - public com.commercetools.history.models.common.Money getPreviousValue() { + public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { return this.previousValue; } @@ -86,7 +86,7 @@ public com.commercetools.history.models.common.Money getPreviousValue() { *

                                                                                                    Value after the change.

                                                                                                    */ - public com.commercetools.history.models.common.Money getNextValue() { + public com.commercetools.history.models.common.TaxedItemPrice getNextValue() { return this.nextValue; } @@ -110,11 +110,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.Money previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.TaxedItemPrice previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.Money nextValue) { + public void setNextValue(final com.commercetools.history.models.common.TaxedItemPrice nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerChangeBuilder.java index bc5cb7c8921..630903e2688 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerChangeBuilder.java @@ -43,13 +43,13 @@ public SetCustomerChangeBuilder change(final String change) { /** *

                                                                                                    Value before the change.

                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetCustomerChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public SetCustomerChangeBuilder previousValue( * @return Builder */ - public SetCustomerChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value before the change.

                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - public SetCustomerChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                    Value after the change.

                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public SetCustomerChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetCustomerChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public SetCustomerChangeBuilder nextValue( * @return Builder */ - public SetCustomerChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value after the change.

                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetCustomerChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public SetCustomerChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChange.java new file mode 100644 index 00000000000..c6471e72e89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChange.java @@ -0,0 +1,266 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.CustomerGroupAssignment; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Set CustomerGroupAssignments update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomerGroupAssignmentsChange setCustomerGroupAssignmentsChange = SetCustomerGroupAssignmentsChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                    + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                    + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetCustomerGroupAssignmentsChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetCustomerGroupAssignmentsChangeImpl.class) +public interface SetCustomerGroupAssignmentsChange extends Change { + + /** + * discriminator value for SetCustomerGroupAssignmentsChange + */ + String SET_CUSTOMER_GROUP_ASSIGNMENTS_CHANGE = "SetCustomerGroupAssignmentsChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final CustomerGroupAssignment... addedItems); + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final CustomerGroupAssignment... removedItems); + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param previousValue values to be set + */ + + @JsonIgnore + public void setPreviousValue(final CustomerGroupAssignment... previousValue); + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue values to be set + */ + + @JsonIgnore + public void setNextValue(final CustomerGroupAssignment... nextValue); + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue values to be set + */ + + public void setNextValue(final List nextValue); + + /** + * factory method + * @return instance of SetCustomerGroupAssignmentsChange + */ + public static SetCustomerGroupAssignmentsChange of() { + return new SetCustomerGroupAssignmentsChangeImpl(); + } + + /** + * factory method to create a shallow copy SetCustomerGroupAssignmentsChange + * @param template instance to be copied + * @return copy instance + */ + public static SetCustomerGroupAssignmentsChange of(final SetCustomerGroupAssignmentsChange template) { + SetCustomerGroupAssignmentsChangeImpl instance = new SetCustomerGroupAssignmentsChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetCustomerGroupAssignmentsChange copyDeep(); + + /** + * factory method to create a deep copy of SetCustomerGroupAssignmentsChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetCustomerGroupAssignmentsChange deepCopy( + @Nullable final SetCustomerGroupAssignmentsChange template) { + if (template == null) { + return null; + } + SetCustomerGroupAssignmentsChangeImpl instance = new SetCustomerGroupAssignmentsChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.CustomerGroupAssignment::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.CustomerGroupAssignment::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.CustomerGroupAssignment::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setNextValue(Optional.ofNullable(template.getNextValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.CustomerGroupAssignment::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetCustomerGroupAssignmentsChange + * @return builder + */ + public static SetCustomerGroupAssignmentsChangeBuilder builder() { + return SetCustomerGroupAssignmentsChangeBuilder.of(); + } + + /** + * create builder for SetCustomerGroupAssignmentsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomerGroupAssignmentsChangeBuilder builder(final SetCustomerGroupAssignmentsChange template) { + return SetCustomerGroupAssignmentsChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetCustomerGroupAssignmentsChange(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/SetCustomerGroupAssignmentsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeBuilder.java new file mode 100644 index 00000000000..ede233c04a4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeBuilder.java @@ -0,0 +1,508 @@ + +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; + +/** + * SetCustomerGroupAssignmentsChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetCustomerGroupAssignmentsChange setCustomerGroupAssignmentsChange = SetCustomerGroupAssignmentsChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                    + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                    + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetCustomerGroupAssignmentsChangeBuilder implements Builder { + + private String change; + + private java.util.List addedItems; + + private java.util.List removedItems; + + private java.util.List previousValue; + + private java.util.List nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addedItems( + final com.commercetools.history.models.common.CustomerGroupAssignment... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.CustomerGroupAssignment... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder setAddedItems( + Function builder) { + return addedItems(builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder removedItems( + final com.commercetools.history.models.common.CustomerGroupAssignment... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.CustomerGroupAssignment... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param previousValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder previousValue( + final com.commercetools.history.models.common.CustomerGroupAssignment... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param previousValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder previousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param previousValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusPreviousValue( + final com.commercetools.history.models.common.CustomerGroupAssignment... previousValue) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.addAll(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusPreviousValue( + Function builder) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = new ArrayList<>(); + this.previousValue.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addPreviousValue( + Function builder) { + return plusPreviousValue( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder nextValue( + final com.commercetools.history.models.common.CustomerGroupAssignment... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder nextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusNextValue( + final com.commercetools.history.models.common.CustomerGroupAssignment... nextValue) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.addAll(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder plusNextValue( + Function builder) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder withNextValue( + Function builder) { + this.nextValue = new ArrayList<>(); + this.nextValue.add( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder addNextValue( + Function builder) { + return plusNextValue( + builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetCustomerGroupAssignmentsChangeBuilder setNextValue( + Function builder) { + return nextValue(builder.apply(com.commercetools.history.models.common.CustomerGroupAssignmentBuilder.of())); + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                    Elements added to the array.

                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @return nextValue + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + /** + * builds SetCustomerGroupAssignmentsChange with checking for non-null required values + * @return SetCustomerGroupAssignmentsChange + */ + public SetCustomerGroupAssignmentsChange build() { + Objects.requireNonNull(change, SetCustomerGroupAssignmentsChange.class + ": change is missing"); + Objects.requireNonNull(addedItems, SetCustomerGroupAssignmentsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetCustomerGroupAssignmentsChange.class + ": removedItems is missing"); + Objects.requireNonNull(previousValue, SetCustomerGroupAssignmentsChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetCustomerGroupAssignmentsChange.class + ": nextValue is missing"); + return new SetCustomerGroupAssignmentsChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * builds SetCustomerGroupAssignmentsChange without checking for non-null required values + * @return SetCustomerGroupAssignmentsChange + */ + public SetCustomerGroupAssignmentsChange buildUnchecked() { + return new SetCustomerGroupAssignmentsChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * factory method for an instance of SetCustomerGroupAssignmentsChangeBuilder + * @return builder + */ + public static SetCustomerGroupAssignmentsChangeBuilder of() { + return new SetCustomerGroupAssignmentsChangeBuilder(); + } + + /** + * create builder for SetCustomerGroupAssignmentsChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetCustomerGroupAssignmentsChangeBuilder of(final SetCustomerGroupAssignmentsChange template) { + SetCustomerGroupAssignmentsChangeBuilder builder = new SetCustomerGroupAssignmentsChangeBuilder(); + builder.change = template.getChange(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); + 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/SetCustomerGroupAssignmentsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeImpl.java new file mode 100644 index 00000000000..82ec7a36014 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeImpl.java @@ -0,0 +1,201 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Set CustomerGroupAssignments update action.

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

                                                                                                    Elements added to the array.

                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                    Elements removed from the array.

                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                    Value before the change.

                                                                                                    + */ + + public java.util.List getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddedItems(final com.commercetools.history.models.common.CustomerGroupAssignment... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.CustomerGroupAssignment... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + + public void setPreviousValue( + final com.commercetools.history.models.common.CustomerGroupAssignment... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + } + + public void setPreviousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.CustomerGroupAssignment... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + } + + public void setNextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetCustomerGroupAssignmentsChangeImpl that = (SetCustomerGroupAssignmentsChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addedItems) + .append(removedItems) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addedItems", addedItems) + .append("removedItems", removedItems) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetCustomerGroupAssignmentsChange copyDeep() { + return SetCustomerGroupAssignmentsChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChange.java index f2e8fb62c5d..f18ae18ee1b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChange.java @@ -17,7 +17,11 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                    Change triggered by the Set CustomerGroup update action.

                                                                                                    + *

                                                                                                    Change triggered by the following update actions:

                                                                                                    + * * *
                                                                                                    * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeBuilder.java index d9ca53b84e8..6b0e04f8708 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeBuilder.java @@ -43,13 +43,13 @@ public SetCustomerGroupChangeBuilder change(final String change) { /** *

                                                                                                    Value before the change.

                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetCustomerGroupChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public SetCustomerGroupChangeBuilder previousValue( * @return Builder */ - public SetCustomerGroupChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value before the change.

                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - public SetCustomerGroupChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                    Value after the change.

                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public SetCustomerGroupChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetCustomerGroupChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public SetCustomerGroupChangeBuilder nextValue( * @return Builder */ - public SetCustomerGroupChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                    Value after the change.

                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetCustomerGroupChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public SetCustomerGroupChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeImpl.java index fd165d2beb2..cfcd9598cdd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetCustomerGroupChangeImpl.java @@ -17,7 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                    Change triggered by the Set CustomerGroup update action.

                                                                                                    + *

                                                                                                    Change triggered by the following update actions:

                                                                                                    + * */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetCustomerGroupChangeImpl implements SetCustomerGroupChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChange.java new file mode 100644 index 00000000000..65921972f50 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChange.java @@ -0,0 +1,246 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Set Delivery Address CustomField update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryAddressCustomFieldChange setDeliveryAddressCustomFieldChange = SetDeliveryAddressCustomFieldChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .addressId("{addressId}")
                                                                                                    + *             .name("{name}")
                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetDeliveryAddressCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDeliveryAddressCustomFieldChangeImpl.class) +public interface SetDeliveryAddressCustomFieldChange extends Change { + + /** + * discriminator value for SetDeliveryAddressCustomFieldChange + */ + String SET_DELIVERY_ADDRESS_CUSTOM_FIELD_CHANGE = "SetDeliveryAddressCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + @NotNull + @JsonProperty("deliveryId") + public String getDeliveryId(); + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + * @return addressId + */ + @NotNull + @JsonProperty("addressId") + public String getAddressId(); + + /** + *

                                                                                                    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); + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    id of the updated Address.

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

                                                                                                    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 SetDeliveryAddressCustomFieldChange + */ + public static SetDeliveryAddressCustomFieldChange of() { + return new SetDeliveryAddressCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetDeliveryAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetDeliveryAddressCustomFieldChange of(final SetDeliveryAddressCustomFieldChange template) { + SetDeliveryAddressCustomFieldChangeImpl instance = new SetDeliveryAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setAddressId(template.getAddressId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetDeliveryAddressCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetDeliveryAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDeliveryAddressCustomFieldChange deepCopy( + @Nullable final SetDeliveryAddressCustomFieldChange template) { + if (template == null) { + return null; + } + SetDeliveryAddressCustomFieldChangeImpl instance = new SetDeliveryAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setAddressId(template.getAddressId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetDeliveryAddressCustomFieldChange + * @return builder + */ + public static SetDeliveryAddressCustomFieldChangeBuilder builder() { + return SetDeliveryAddressCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetDeliveryAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryAddressCustomFieldChangeBuilder builder( + final SetDeliveryAddressCustomFieldChange template) { + return SetDeliveryAddressCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDeliveryAddressCustomFieldChange(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/SetDeliveryAddressCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..6e31a6a5f77 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeBuilder.java @@ -0,0 +1,232 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDeliveryAddressCustomFieldChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryAddressCustomFieldChange setDeliveryAddressCustomFieldChange = SetDeliveryAddressCustomFieldChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .addressId("{addressId}")
                                                                                                    + *             .name("{name}")
                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryAddressCustomFieldChangeBuilder implements Builder { + + private String change; + + private String deliveryId; + + private String addressId; + + 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 SetDeliveryAddressCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    id of the updated Address.

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

                                                                                                    Name of the Custom Field.

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

                                                                                                    id of the referenced Type.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + * @return addressId + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                    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 SetDeliveryAddressCustomFieldChange with checking for non-null required values + * @return SetDeliveryAddressCustomFieldChange + */ + public SetDeliveryAddressCustomFieldChange build() { + Objects.requireNonNull(change, SetDeliveryAddressCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(deliveryId, SetDeliveryAddressCustomFieldChange.class + ": deliveryId is missing"); + Objects.requireNonNull(addressId, SetDeliveryAddressCustomFieldChange.class + ": addressId is missing"); + Objects.requireNonNull(name, SetDeliveryAddressCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetDeliveryAddressCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetDeliveryAddressCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetDeliveryAddressCustomFieldChange.class + ": nextValue is missing"); + return new SetDeliveryAddressCustomFieldChangeImpl(change, deliveryId, addressId, name, customTypeId, + previousValue, nextValue); + } + + /** + * builds SetDeliveryAddressCustomFieldChange without checking for non-null required values + * @return SetDeliveryAddressCustomFieldChange + */ + public SetDeliveryAddressCustomFieldChange buildUnchecked() { + return new SetDeliveryAddressCustomFieldChangeImpl(change, deliveryId, addressId, name, customTypeId, + previousValue, nextValue); + } + + /** + * factory method for an instance of SetDeliveryAddressCustomFieldChangeBuilder + * @return builder + */ + public static SetDeliveryAddressCustomFieldChangeBuilder of() { + return new SetDeliveryAddressCustomFieldChangeBuilder(); + } + + /** + * create builder for SetDeliveryAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryAddressCustomFieldChangeBuilder of(final SetDeliveryAddressCustomFieldChange template) { + SetDeliveryAddressCustomFieldChangeBuilder builder = new SetDeliveryAddressCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.deliveryId = template.getDeliveryId(); + builder.addressId = template.getAddressId(); + 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/SetDeliveryAddressCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeImpl.java new file mode 100644 index 00000000000..0baefc25579 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeImpl.java @@ -0,0 +1,218 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Set Delivery Address CustomField update action.

                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryAddressCustomFieldChangeImpl implements SetDeliveryAddressCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String deliveryId; + + private String addressId; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetDeliveryAddressCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("deliveryId") final String deliveryId, @JsonProperty("addressId") final String addressId, + @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.deliveryId = deliveryId; + this.addressId = addressId; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_DELIVERY_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetDeliveryAddressCustomFieldChangeImpl() { + this.type = SET_DELIVERY_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                    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 setDeliveryId(final String deliveryId) { + this.deliveryId = deliveryId; + } + + public void setAddressId(final String addressId) { + this.addressId = addressId; + } + + 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; + + SetDeliveryAddressCustomFieldChangeImpl that = (SetDeliveryAddressCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(addressId, that.addressId) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(addressId, that.addressId) + .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(deliveryId) + .append(addressId) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("deliveryId", deliveryId) + .append("addressId", addressId) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetDeliveryAddressCustomFieldChange copyDeep() { + return SetDeliveryAddressCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChange.java new file mode 100644 index 00000000000..aedd21172de --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChange.java @@ -0,0 +1,216 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Set Delivery Address Custom Type update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryAddressCustomTypeChange setDeliveryAddressCustomTypeChange = SetDeliveryAddressCustomTypeChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .addressId("{addressId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetDeliveryAddressCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDeliveryAddressCustomTypeChangeImpl.class) +public interface SetDeliveryAddressCustomTypeChange extends Change { + + /** + * discriminator value for SetDeliveryAddressCustomTypeChange + */ + String SET_DELIVERY_ADDRESS_CUSTOM_TYPE_CHANGE = "SetDeliveryAddressCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + @NotNull + @JsonProperty("deliveryId") + public String getDeliveryId(); + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + * @return addressId + */ + @NotNull + @JsonProperty("addressId") + public String getAddressId(); + + /** + *

                                                                                                    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); + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    id of the updated Address.

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

                                                                                                    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 SetDeliveryAddressCustomTypeChange + */ + public static SetDeliveryAddressCustomTypeChange of() { + return new SetDeliveryAddressCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetDeliveryAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetDeliveryAddressCustomTypeChange of(final SetDeliveryAddressCustomTypeChange template) { + SetDeliveryAddressCustomTypeChangeImpl instance = new SetDeliveryAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setAddressId(template.getAddressId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetDeliveryAddressCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetDeliveryAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDeliveryAddressCustomTypeChange deepCopy( + @Nullable final SetDeliveryAddressCustomTypeChange template) { + if (template == null) { + return null; + } + SetDeliveryAddressCustomTypeChangeImpl instance = new SetDeliveryAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setAddressId(template.getAddressId()); + 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 SetDeliveryAddressCustomTypeChange + * @return builder + */ + public static SetDeliveryAddressCustomTypeChangeBuilder builder() { + return SetDeliveryAddressCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetDeliveryAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryAddressCustomTypeChangeBuilder builder(final SetDeliveryAddressCustomTypeChange template) { + return SetDeliveryAddressCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDeliveryAddressCustomTypeChange(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/SetDeliveryAddressCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..114747b8755 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeBuilder.java @@ -0,0 +1,233 @@ + +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; + +/** + * SetDeliveryAddressCustomTypeChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryAddressCustomTypeChange setDeliveryAddressCustomTypeChange = SetDeliveryAddressCustomTypeChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .addressId("{addressId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryAddressCustomTypeChangeBuilder implements Builder { + + private String change; + + private String deliveryId; + + private String addressId; + + 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 SetDeliveryAddressCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    id of the updated Address.

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

                                                                                                    Value before the change.

                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetDeliveryAddressCustomTypeChangeBuilder 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 SetDeliveryAddressCustomTypeChangeBuilder 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 SetDeliveryAddressCustomTypeChangeBuilder 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 SetDeliveryAddressCustomTypeChangeBuilder 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 SetDeliveryAddressCustomTypeChangeBuilder 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 SetDeliveryAddressCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + * @return addressId + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                    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 SetDeliveryAddressCustomTypeChange with checking for non-null required values + * @return SetDeliveryAddressCustomTypeChange + */ + public SetDeliveryAddressCustomTypeChange build() { + Objects.requireNonNull(change, SetDeliveryAddressCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(deliveryId, SetDeliveryAddressCustomTypeChange.class + ": deliveryId is missing"); + Objects.requireNonNull(addressId, SetDeliveryAddressCustomTypeChange.class + ": addressId is missing"); + Objects.requireNonNull(previousValue, SetDeliveryAddressCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetDeliveryAddressCustomTypeChange.class + ": nextValue is missing"); + return new SetDeliveryAddressCustomTypeChangeImpl(change, deliveryId, addressId, previousValue, nextValue); + } + + /** + * builds SetDeliveryAddressCustomTypeChange without checking for non-null required values + * @return SetDeliveryAddressCustomTypeChange + */ + public SetDeliveryAddressCustomTypeChange buildUnchecked() { + return new SetDeliveryAddressCustomTypeChangeImpl(change, deliveryId, addressId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetDeliveryAddressCustomTypeChangeBuilder + * @return builder + */ + public static SetDeliveryAddressCustomTypeChangeBuilder of() { + return new SetDeliveryAddressCustomTypeChangeBuilder(); + } + + /** + * create builder for SetDeliveryAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryAddressCustomTypeChangeBuilder of(final SetDeliveryAddressCustomTypeChange template) { + SetDeliveryAddressCustomTypeChangeBuilder builder = new SetDeliveryAddressCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.deliveryId = template.getDeliveryId(); + builder.addressId = template.getAddressId(); + 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/SetDeliveryAddressCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeImpl.java new file mode 100644 index 00000000000..7b282a0ce1a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeImpl.java @@ -0,0 +1,179 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Set Delivery Address Custom Type update action.

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

                                                                                                    id of the updated Delivery.

                                                                                                    + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    id of the updated Address.

                                                                                                    + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                    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 setDeliveryId(final String deliveryId) { + this.deliveryId = deliveryId; + } + + public void setAddressId(final String addressId) { + this.addressId = addressId; + } + + 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; + + SetDeliveryAddressCustomTypeChangeImpl that = (SetDeliveryAddressCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(addressId, that.addressId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(addressId, that.addressId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(deliveryId) + .append(addressId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("deliveryId", deliveryId) + .append("addressId", addressId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetDeliveryAddressCustomTypeChange copyDeep() { + return SetDeliveryAddressCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChange.java new file mode 100644 index 00000000000..32be0cb5970 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChange.java @@ -0,0 +1,226 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Set Delivery CustomField update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryCustomFieldChange setDeliveryCustomFieldChange = SetDeliveryCustomFieldChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .name("{name}")
                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetDeliveryCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDeliveryCustomFieldChangeImpl.class) +public interface SetDeliveryCustomFieldChange extends Change { + + /** + * discriminator value for SetDeliveryCustomFieldChange + */ + String SET_DELIVERY_CUSTOM_FIELD_CHANGE = "SetDeliveryCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + @NotNull + @JsonProperty("deliveryId") + public String getDeliveryId(); + + /** + *

                                                                                                    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); + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    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 SetDeliveryCustomFieldChange + */ + public static SetDeliveryCustomFieldChange of() { + return new SetDeliveryCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetDeliveryCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetDeliveryCustomFieldChange of(final SetDeliveryCustomFieldChange template) { + SetDeliveryCustomFieldChangeImpl instance = new SetDeliveryCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetDeliveryCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetDeliveryCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDeliveryCustomFieldChange deepCopy(@Nullable final SetDeliveryCustomFieldChange template) { + if (template == null) { + return null; + } + SetDeliveryCustomFieldChangeImpl instance = new SetDeliveryCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetDeliveryCustomFieldChange + * @return builder + */ + public static SetDeliveryCustomFieldChangeBuilder builder() { + return SetDeliveryCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetDeliveryCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryCustomFieldChangeBuilder builder(final SetDeliveryCustomFieldChange template) { + return SetDeliveryCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDeliveryCustomFieldChange(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/SetDeliveryCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..80d1c44b75a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeBuilder.java @@ -0,0 +1,205 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetDeliveryCustomFieldChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryCustomFieldChange setDeliveryCustomFieldChange = SetDeliveryCustomFieldChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .name("{name}")
                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryCustomFieldChangeBuilder implements Builder { + + private String change; + + private String deliveryId; + + 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 SetDeliveryCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    Name of the Custom Field.

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

                                                                                                    id of the referenced Type.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    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 SetDeliveryCustomFieldChange with checking for non-null required values + * @return SetDeliveryCustomFieldChange + */ + public SetDeliveryCustomFieldChange build() { + Objects.requireNonNull(change, SetDeliveryCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(deliveryId, SetDeliveryCustomFieldChange.class + ": deliveryId is missing"); + Objects.requireNonNull(name, SetDeliveryCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetDeliveryCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetDeliveryCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetDeliveryCustomFieldChange.class + ": nextValue is missing"); + return new SetDeliveryCustomFieldChangeImpl(change, deliveryId, name, customTypeId, previousValue, nextValue); + } + + /** + * builds SetDeliveryCustomFieldChange without checking for non-null required values + * @return SetDeliveryCustomFieldChange + */ + public SetDeliveryCustomFieldChange buildUnchecked() { + return new SetDeliveryCustomFieldChangeImpl(change, deliveryId, name, customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetDeliveryCustomFieldChangeBuilder + * @return builder + */ + public static SetDeliveryCustomFieldChangeBuilder of() { + return new SetDeliveryCustomFieldChangeBuilder(); + } + + /** + * create builder for SetDeliveryCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryCustomFieldChangeBuilder of(final SetDeliveryCustomFieldChange template) { + SetDeliveryCustomFieldChangeBuilder builder = new SetDeliveryCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.deliveryId = template.getDeliveryId(); + 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/SetDeliveryCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeImpl.java new file mode 100644 index 00000000000..0a25253aaaf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeImpl.java @@ -0,0 +1,199 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Set Delivery CustomField update action.

                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryCustomFieldChangeImpl implements SetDeliveryCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String deliveryId; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetDeliveryCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("deliveryId") final String deliveryId, @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.deliveryId = deliveryId; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_DELIVERY_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetDeliveryCustomFieldChangeImpl() { + this.type = SET_DELIVERY_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    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 setDeliveryId(final String deliveryId) { + this.deliveryId = deliveryId; + } + + 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; + + SetDeliveryCustomFieldChangeImpl that = (SetDeliveryCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .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(deliveryId) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("deliveryId", deliveryId) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetDeliveryCustomFieldChange copyDeep() { + return SetDeliveryCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChange.java new file mode 100644 index 00000000000..d4a13427d20 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChange.java @@ -0,0 +1,197 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Set Delivery Custom Type update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryCustomTypeChange setDeliveryCustomTypeChange = SetDeliveryCustomTypeChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetDeliveryCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDeliveryCustomTypeChangeImpl.class) +public interface SetDeliveryCustomTypeChange extends Change { + + /** + * discriminator value for SetDeliveryCustomTypeChange + */ + String SET_DELIVERY_CUSTOM_TYPE_CHANGE = "SetDeliveryCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + @NotNull + @JsonProperty("deliveryId") + public String getDeliveryId(); + + /** + *

                                                                                                    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); + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    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 SetDeliveryCustomTypeChange + */ + public static SetDeliveryCustomTypeChange of() { + return new SetDeliveryCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetDeliveryCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetDeliveryCustomTypeChange of(final SetDeliveryCustomTypeChange template) { + SetDeliveryCustomTypeChangeImpl instance = new SetDeliveryCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetDeliveryCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetDeliveryCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDeliveryCustomTypeChange deepCopy(@Nullable final SetDeliveryCustomTypeChange template) { + if (template == null) { + return null; + } + SetDeliveryCustomTypeChangeImpl instance = new SetDeliveryCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setDeliveryId(template.getDeliveryId()); + 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 SetDeliveryCustomTypeChange + * @return builder + */ + public static SetDeliveryCustomTypeChangeBuilder builder() { + return SetDeliveryCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetDeliveryCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryCustomTypeChangeBuilder builder(final SetDeliveryCustomTypeChange template) { + return SetDeliveryCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDeliveryCustomTypeChange(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/SetDeliveryCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..3efbf761850 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeBuilder.java @@ -0,0 +1,208 @@ + +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; + +/** + * SetDeliveryCustomTypeChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDeliveryCustomTypeChange setDeliveryCustomTypeChange = SetDeliveryCustomTypeChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .deliveryId("{deliveryId}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetDeliveryCustomTypeChangeBuilder implements Builder { + + private String change; + + private String deliveryId; + + 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 SetDeliveryCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    id of the updated Delivery.

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

                                                                                                    Value before the change.

                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetDeliveryCustomTypeChangeBuilder 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 SetDeliveryCustomTypeChangeBuilder 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 SetDeliveryCustomTypeChangeBuilder 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 SetDeliveryCustomTypeChangeBuilder 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 SetDeliveryCustomTypeChangeBuilder 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 SetDeliveryCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                    id of the updated Delivery.

                                                                                                    + * @return deliveryId + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    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 SetDeliveryCustomTypeChange with checking for non-null required values + * @return SetDeliveryCustomTypeChange + */ + public SetDeliveryCustomTypeChange build() { + Objects.requireNonNull(change, SetDeliveryCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(deliveryId, SetDeliveryCustomTypeChange.class + ": deliveryId is missing"); + Objects.requireNonNull(previousValue, SetDeliveryCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetDeliveryCustomTypeChange.class + ": nextValue is missing"); + return new SetDeliveryCustomTypeChangeImpl(change, deliveryId, previousValue, nextValue); + } + + /** + * builds SetDeliveryCustomTypeChange without checking for non-null required values + * @return SetDeliveryCustomTypeChange + */ + public SetDeliveryCustomTypeChange buildUnchecked() { + return new SetDeliveryCustomTypeChangeImpl(change, deliveryId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetDeliveryCustomTypeChangeBuilder + * @return builder + */ + public static SetDeliveryCustomTypeChangeBuilder of() { + return new SetDeliveryCustomTypeChangeBuilder(); + } + + /** + * create builder for SetDeliveryCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDeliveryCustomTypeChangeBuilder of(final SetDeliveryCustomTypeChange template) { + SetDeliveryCustomTypeChangeBuilder builder = new SetDeliveryCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.deliveryId = template.getDeliveryId(); + 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/SetDeliveryCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeImpl.java new file mode 100644 index 00000000000..dc260b4d5b6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Set Delivery Custom Type update action.

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

                                                                                                    id of the updated Delivery.

                                                                                                    + */ + + public String getDeliveryId() { + return this.deliveryId; + } + + /** + *

                                                                                                    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 setDeliveryId(final String deliveryId) { + this.deliveryId = deliveryId; + } + + 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; + + SetDeliveryCustomTypeChangeImpl that = (SetDeliveryCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(deliveryId, that.deliveryId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(deliveryId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("deliveryId", deliveryId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetDeliveryCustomTypeChange copyDeep() { + return SetDeliveryCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChange.java new file mode 100644 index 00000000000..fa6344cf648 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChange.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.DiscountOnTotalPrice; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                    Change triggered by the Add DiscountCode, Remove DiscountCode, Add LineItem, or Remove LineItem update action.

                                                                                                    + * + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDiscountOnTotalPriceChange setDiscountOnTotalPriceChange = SetDiscountOnTotalPriceChange.builder()
                                                                                                    + *             .change("{change}")
                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                    + *             .build()
                                                                                                    + * 
                                                                                                    + *
                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetDiscountOnTotalPriceChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetDiscountOnTotalPriceChangeImpl.class) +public interface SetDiscountOnTotalPriceChange extends Change { + + /** + * discriminator value for SetDiscountOnTotalPriceChange + */ + String SET_DISCOUNT_ON_TOTAL_PRICE_CHANGE = "SetDiscountOnTotalPriceChange"; + + /** + * + * @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 DiscountOnTotalPrice getPreviousValue(); + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public DiscountOnTotalPrice 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 DiscountOnTotalPrice previousValue); + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + */ + + public void setNextValue(final DiscountOnTotalPrice nextValue); + + /** + * factory method + * @return instance of SetDiscountOnTotalPriceChange + */ + public static SetDiscountOnTotalPriceChange of() { + return new SetDiscountOnTotalPriceChangeImpl(); + } + + /** + * factory method to create a shallow copy SetDiscountOnTotalPriceChange + * @param template instance to be copied + * @return copy instance + */ + public static SetDiscountOnTotalPriceChange of(final SetDiscountOnTotalPriceChange template) { + SetDiscountOnTotalPriceChangeImpl instance = new SetDiscountOnTotalPriceChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetDiscountOnTotalPriceChange copyDeep(); + + /** + * factory method to create a deep copy of SetDiscountOnTotalPriceChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetDiscountOnTotalPriceChange deepCopy(@Nullable final SetDiscountOnTotalPriceChange template) { + if (template == null) { + return null; + } + SetDiscountOnTotalPriceChangeImpl instance = new SetDiscountOnTotalPriceChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.DiscountOnTotalPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.DiscountOnTotalPrice.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetDiscountOnTotalPriceChange + * @return builder + */ + public static SetDiscountOnTotalPriceChangeBuilder builder() { + return SetDiscountOnTotalPriceChangeBuilder.of(); + } + + /** + * create builder for SetDiscountOnTotalPriceChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDiscountOnTotalPriceChangeBuilder builder(final SetDiscountOnTotalPriceChange template) { + return SetDiscountOnTotalPriceChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetDiscountOnTotalPriceChange(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/SetDiscountOnTotalPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeBuilder.java new file mode 100644 index 00000000000..557ae147a40 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeBuilder.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; + +/** + * SetDiscountOnTotalPriceChangeBuilder + *
                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                    + *
                                                                                                    
                                                                                                    + *     SetDiscountOnTotalPriceChange setDiscountOnTotalPriceChange = SetDiscountOnTotalPriceChange.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 SetDiscountOnTotalPriceChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.DiscountOnTotalPrice previousValue; + + private com.commercetools.history.models.common.DiscountOnTotalPrice nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetDiscountOnTotalPriceChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

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

                                                                                                    Value after the change.

                                                                                                    + * @param nextValue value to be set + * @return Builder + */ + + public SetDiscountOnTotalPriceChangeBuilder nextValue( + final com.commercetools.history.models.common.DiscountOnTotalPrice 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.DiscountOnTotalPrice getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                    Value after the change.

                                                                                                    + * @return nextValue + */ + + public com.commercetools.history.models.common.DiscountOnTotalPrice getNextValue() { + return this.nextValue; + } + + /** + * builds SetDiscountOnTotalPriceChange with checking for non-null required values + * @return SetDiscountOnTotalPriceChange + */ + public SetDiscountOnTotalPriceChange build() { + Objects.requireNonNull(change, SetDiscountOnTotalPriceChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetDiscountOnTotalPriceChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetDiscountOnTotalPriceChange.class + ": nextValue is missing"); + return new SetDiscountOnTotalPriceChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetDiscountOnTotalPriceChange without checking for non-null required values + * @return SetDiscountOnTotalPriceChange + */ + public SetDiscountOnTotalPriceChange buildUnchecked() { + return new SetDiscountOnTotalPriceChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetDiscountOnTotalPriceChangeBuilder + * @return builder + */ + public static SetDiscountOnTotalPriceChangeBuilder of() { + return new SetDiscountOnTotalPriceChangeBuilder(); + } + + /** + * create builder for SetDiscountOnTotalPriceChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetDiscountOnTotalPriceChangeBuilder of(final SetDiscountOnTotalPriceChange template) { + SetDiscountOnTotalPriceChangeBuilder builder = new SetDiscountOnTotalPriceChangeBuilder(); + 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/SetDiscountOnTotalPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeImpl.java new file mode 100644 index 00000000000..48f088c5947 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                    Change triggered by the Add DiscountCode, Remove DiscountCode, Add LineItem, or Remove LineItem update action.

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

                                                                                                    Value before the change.

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

                                                                                                    Value after the change.

                                                                                                    + */ + + public com.commercetools.history.models.common.DiscountOnTotalPrice getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.DiscountOnTotalPrice previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.DiscountOnTotalPrice nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetDiscountOnTotalPriceChangeImpl that = (SetDiscountOnTotalPriceChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetDiscountOnTotalPriceChange copyDeep() { + return SetDiscountOnTotalPriceChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChange.java index 97a3edd908f..4d1bfb05389 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChange.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; +import com.commercetools.history.models.common.DiscountedPrice; import com.commercetools.history.models.common.Price; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -30,6 +31,7 @@ * .catalogData("{catalogData}") * .variant("{variant}") * .priceId("{priceId}") + * .price(priceBuilder -> priceBuilder) * .build() * * @@ -67,7 +69,7 @@ public interface SetDiscountedPriceChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public Price getPreviousValue(); + public DiscountedPrice getPreviousValue(); /** *

                                                                                                    Value after the change.

                                                                                                    @@ -76,9 +78,10 @@ public interface SetDiscountedPriceChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public Price getNextValue(); + public DiscountedPrice getNextValue(); /** + *

                                                                                                    Product data that was updated.

                                                                                                    *
                                                                                                      *
                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                    • *
                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                    • @@ -90,7 +93,8 @@ public interface SetDiscountedPriceChange extends Change { public String getCatalogData(); /** - *

                                                                                                      sku or key of the updated ProductVariant.

                                                                                                      + *

                                                                                                      Identifier of the updated Product Variant.

                                                                                                      + *

                                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                      * @return variant */ @NotNull @@ -105,6 +109,15 @@ public interface SetDiscountedPriceChange extends Change { @JsonProperty("priceId") public String getPriceId(); + /** + *

                                                                                                      Embedded Price of the ProductVariant.

                                                                                                      + * @return price + */ + @NotNull + @Valid + @JsonProperty("price") + public Price getPrice(); + /** * set change * @param change value to be set @@ -117,16 +130,17 @@ public interface SetDiscountedPriceChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final Price previousValue); + public void setPreviousValue(final DiscountedPrice previousValue); /** *

                                                                                                      Value after the change.

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

                                                                                                      Product data that was updated.

                                                                                                      *
                                                                                                        *
                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                      • *
                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                      • @@ -137,7 +151,8 @@ public interface SetDiscountedPriceChange extends Change { public void setCatalogData(final String catalogData); /** - *

                                                                                                        sku or key of the updated ProductVariant.

                                                                                                        + *

                                                                                                        Identifier of the updated Product Variant.

                                                                                                        + *

                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                        * @param variant value to be set */ @@ -150,6 +165,13 @@ public interface SetDiscountedPriceChange extends Change { public void setPriceId(final String priceId); + /** + *

                                                                                                        Embedded Price of the ProductVariant.

                                                                                                        + * @param price value to be set + */ + + public void setPrice(final Price price); + /** * factory method * @return instance of SetDiscountedPriceChange @@ -171,6 +193,7 @@ public static SetDiscountedPriceChange of(final SetDiscountedPriceChange templat instance.setCatalogData(template.getCatalogData()); instance.setVariant(template.getVariant()); instance.setPriceId(template.getPriceId()); + instance.setPrice(template.getPrice()); return instance; } @@ -188,11 +211,14 @@ public static SetDiscountedPriceChange deepCopy(@Nullable final SetDiscountedPri } SetDiscountedPriceChangeImpl instance = new SetDiscountedPriceChangeImpl(); instance.setChange(template.getChange()); - instance.setPreviousValue(com.commercetools.history.models.common.Price.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.Price.deepCopy(template.getNextValue())); + instance.setPreviousValue( + com.commercetools.history.models.common.DiscountedPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.DiscountedPrice.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); instance.setVariant(template.getVariant()); instance.setPriceId(template.getPriceId()); + instance.setPrice(com.commercetools.history.models.common.Price.deepCopy(template.getPrice())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeBuilder.java index 0a8c773d87a..09c59fe43fd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeBuilder.java @@ -20,6 +20,7 @@ * .catalogData("{catalogData}") * .variant("{variant}") * .priceId("{priceId}") + * .price(priceBuilder -> priceBuilder) * .build() * * @@ -29,9 +30,9 @@ public class SetDiscountedPriceChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()).build(); return this; } @@ -69,8 +72,8 @@ public SetDiscountedPriceChangeBuilder previousValue( */ public SetDiscountedPriceChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()); return this; } @@ -81,7 +84,7 @@ public SetDiscountedPriceChangeBuilder withPreviousValue( */ public SetDiscountedPriceChangeBuilder previousValue( - final com.commercetools.history.models.common.Price previousValue) { + final com.commercetools.history.models.common.DiscountedPrice previousValue) { this.previousValue = previousValue; return this; } @@ -93,8 +96,8 @@ public SetDiscountedPriceChangeBuilder previousValue( */ public SetDiscountedPriceChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()).build(); return this; } @@ -105,8 +108,8 @@ public SetDiscountedPriceChangeBuilder nextValue( */ public SetDiscountedPriceChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()); return this; } @@ -116,12 +119,14 @@ public SetDiscountedPriceChangeBuilder withNextValue( * @return Builder */ - public SetDiscountedPriceChangeBuilder nextValue(final com.commercetools.history.models.common.Price nextValue) { + public SetDiscountedPriceChangeBuilder nextValue( + final com.commercetools.history.models.common.DiscountedPrice nextValue) { this.nextValue = nextValue; return this; } /** + *

                                                                                                        Product data that was updated.

                                                                                                        *
                                                                                                          *
                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                        • *
                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                        • @@ -136,7 +141,8 @@ public SetDiscountedPriceChangeBuilder catalogData(final String catalogData) { } /** - *

                                                                                                          sku or key of the updated ProductVariant.

                                                                                                          + *

                                                                                                          Identifier of the updated Product Variant.

                                                                                                          + *

                                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                          * @param variant value to be set * @return Builder */ @@ -157,6 +163,41 @@ public SetDiscountedPriceChangeBuilder priceId(final String priceId) { return this; } + /** + *

                                                                                                          Embedded Price of the ProductVariant.

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

                                                                                                          Embedded Price of the ProductVariant.

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

                                                                                                          Embedded Price of the ProductVariant.

                                                                                                          + * @param price value to be set + * @return Builder + */ + + public SetDiscountedPriceChangeBuilder price(final com.commercetools.history.models.common.Price price) { + this.price = price; + return this; + } + /** * value of change} * @return change @@ -171,7 +212,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.Price getPreviousValue() { + public com.commercetools.history.models.common.DiscountedPrice getPreviousValue() { return this.previousValue; } @@ -180,11 +221,12 @@ public com.commercetools.history.models.common.Price getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.Price getNextValue() { + public com.commercetools.history.models.common.DiscountedPrice getNextValue() { return this.nextValue; } /** + *

                                                                                                          Product data that was updated.

                                                                                                          *
                                                                                                            *
                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                          • *
                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                          • @@ -197,7 +239,8 @@ public String getCatalogData() { } /** - *

                                                                                                            sku or key of the updated ProductVariant.

                                                                                                            + *

                                                                                                            Identifier of the updated Product Variant.

                                                                                                            + *

                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                            * @return variant */ @@ -214,6 +257,15 @@ public String getPriceId() { return this.priceId; } + /** + *

                                                                                                            Embedded Price of the ProductVariant.

                                                                                                            + * @return price + */ + + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + /** * builds SetDiscountedPriceChange with checking for non-null required values * @return SetDiscountedPriceChange @@ -225,7 +277,8 @@ public SetDiscountedPriceChange build() { Objects.requireNonNull(catalogData, SetDiscountedPriceChange.class + ": catalogData is missing"); Objects.requireNonNull(variant, SetDiscountedPriceChange.class + ": variant is missing"); Objects.requireNonNull(priceId, SetDiscountedPriceChange.class + ": priceId is missing"); - return new SetDiscountedPriceChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId); + Objects.requireNonNull(price, SetDiscountedPriceChange.class + ": price is missing"); + return new SetDiscountedPriceChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId, price); } /** @@ -233,7 +286,7 @@ public SetDiscountedPriceChange build() { * @return SetDiscountedPriceChange */ public SetDiscountedPriceChange buildUnchecked() { - return new SetDiscountedPriceChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId); + return new SetDiscountedPriceChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId, price); } /** @@ -257,6 +310,7 @@ public static SetDiscountedPriceChangeBuilder of(final SetDiscountedPriceChange builder.catalogData = template.getCatalogData(); builder.variant = template.getVariant(); builder.priceId = template.getPriceId(); + builder.price = template.getPrice(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeImpl.java index 8ccfb7148b8..0e045b8bb87 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeImpl.java @@ -26,9 +26,9 @@ public class SetDiscountedPriceChangeImpl implements SetDiscountedPriceChange, M private String change; - private com.commercetools.history.models.common.Price previousValue; + private com.commercetools.history.models.common.DiscountedPrice previousValue; - private com.commercetools.history.models.common.Price nextValue; + private com.commercetools.history.models.common.DiscountedPrice nextValue; private String catalogData; @@ -36,21 +36,25 @@ public class SetDiscountedPriceChangeImpl implements SetDiscountedPriceChange, M private String priceId; + private com.commercetools.history.models.common.Price price; + /** * create instance with all properties */ @JsonCreator SetDiscountedPriceChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Price previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Price nextValue, + @JsonProperty("previousValue") final com.commercetools.history.models.common.DiscountedPrice previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.DiscountedPrice nextValue, @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant, - @JsonProperty("priceId") final String priceId) { + @JsonProperty("priceId") final String priceId, + @JsonProperty("price") final com.commercetools.history.models.common.Price price) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; this.variant = variant; this.priceId = priceId; + this.price = price; this.type = SET_DISCOUNTED_PRICE_CHANGE; } @@ -81,7 +85,7 @@ public String getChange() { *

                                                                                                            Value before the change.

                                                                                                            */ - public com.commercetools.history.models.common.Price getPreviousValue() { + public com.commercetools.history.models.common.DiscountedPrice getPreviousValue() { return this.previousValue; } @@ -89,11 +93,12 @@ public com.commercetools.history.models.common.Price getPreviousValue() { *

                                                                                                            Value after the change.

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

                                                                                                            Product data that was updated.

                                                                                                            *
                                                                                                              *
                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                            • *
                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                            • @@ -105,7 +110,8 @@ public String getCatalogData() { } /** - *

                                                                                                              sku or key of the updated ProductVariant.

                                                                                                              + *

                                                                                                              Identifier of the updated Product Variant.

                                                                                                              + *

                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                              */ public String getVariant() { @@ -120,15 +126,23 @@ public String getPriceId() { return this.priceId; } + /** + *

                                                                                                              Embedded Price of the ProductVariant.

                                                                                                              + */ + + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.Price previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.DiscountedPrice previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.Price nextValue) { + public void setNextValue(final com.commercetools.history.models.common.DiscountedPrice nextValue) { this.nextValue = nextValue; } @@ -144,6 +158,10 @@ public void setPriceId(final String priceId) { this.priceId = priceId; } + public void setPrice(final com.commercetools.history.models.common.Price price) { + this.price = price; + } + @Override public boolean equals(Object o) { if (this == o) @@ -161,6 +179,7 @@ public boolean equals(Object o) { .append(catalogData, that.catalogData) .append(variant, that.variant) .append(priceId, that.priceId) + .append(price, that.price) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -168,6 +187,7 @@ public boolean equals(Object o) { .append(catalogData, that.catalogData) .append(variant, that.variant) .append(priceId, that.priceId) + .append(price, that.price) .isEquals(); } @@ -180,6 +200,7 @@ public int hashCode() { .append(catalogData) .append(variant) .append(priceId) + .append(price) .toHashCode(); } @@ -192,6 +213,7 @@ public String toString() { .append("catalogData", catalogData) .append("variant", variant) .append("priceId", priceId) + .append("price", price) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChange.java index 9b53c470bae..58f199816e6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChange.java @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetDistributionChannelsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetDistributionChannelsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reference... addedItems); + + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reference... removedItems); + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetDistributionChannelsChange @@ -131,6 +181,8 @@ public static SetDistributionChannelsChange of(final SetDistributionChannelsChan instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetDistributionChannelsChange deepCopy(@Nullable final SetDistribu .map(com.commercetools.history.models.common.Reference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeBuilder.java index 7a659d4b649..d443f839947 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetDistributionChannelsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -87,7 +93,7 @@ public SetDistributionChannelsChangeBuilder plusPreviousValue( */ public SetDistributionChannelsChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -102,34 +108,12 @@ public SetDistributionChannelsChangeBuilder plusPreviousValue( */ public SetDistributionChannelsChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                                                                              Value before the change.

                                                                                                              - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetDistributionChannelsChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                                                                              Value before the change.

                                                                                                              - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetDistributionChannelsChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                                                                              Value after the change.

                                                                                                              * @param nextValue value to be set @@ -176,7 +160,7 @@ public SetDistributionChannelsChangeBuilder plusNextValue( */ public SetDistributionChannelsChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -191,32 +175,144 @@ public SetDistributionChannelsChangeBuilder plusNextValue( */ public SetDistributionChannelsChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } /** - *

                                                                                                              Value after the change.

                                                                                                              - * @param builder function to build the nextValue value + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param addedItems value to be set * @return Builder */ - public SetDistributionChannelsChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetDistributionChannelsChangeBuilder addedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; } /** - *

                                                                                                              Value after the change.

                                                                                                              - * @param builder function to build the nextValue value + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param addedItems value to be set + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param addedItems value to be set + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param removedItems value to be set + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param removedItems value to be set + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param removedItems value to be set * @return Builder */ - public SetDistributionChannelsChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetDistributionChannelsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetDistributionChannelsChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; } /** @@ -246,6 +342,24 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetDistributionChannelsChange with checking for non-null required values * @return SetDistributionChannelsChange @@ -254,7 +368,9 @@ public SetDistributionChannelsChange build() { Objects.requireNonNull(change, SetDistributionChannelsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetDistributionChannelsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetDistributionChannelsChange.class + ": nextValue is missing"); - return new SetDistributionChannelsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetDistributionChannelsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetDistributionChannelsChange.class + ": removedItems is missing"); + return new SetDistributionChannelsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -262,7 +378,7 @@ public SetDistributionChannelsChange build() { * @return SetDistributionChannelsChange */ public SetDistributionChannelsChange buildUnchecked() { - return new SetDistributionChannelsChangeImpl(change, previousValue, nextValue); + return new SetDistributionChannelsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -283,6 +399,8 @@ public static SetDistributionChannelsChangeBuilder of(final SetDistributionChann builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeImpl.java index 3b173e7a656..ea47aae7b47 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeImpl.java @@ -30,16 +30,24 @@ public class SetDistributionChannelsChangeImpl implements SetDistributionChannel private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetDistributionChannelsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_DISTRIBUTION_CHANNELS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                              Elements added to the array.

                                                                                                              + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                              Elements removed from the array.

                                                                                                              + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,22 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +157,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +174,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +185,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChange.java index 77191465f4a..053aa50e8f8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChange.java @@ -28,6 +28,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -77,6 +78,7 @@ public interface SetImageLabelChange extends Change { public Image getNextValue(); /** + *

                                                                                                              Product data that was updated.

                                                                                                              *
                                                                                                                *
                                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                                              • *
                                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                                              • @@ -87,6 +89,15 @@ public interface SetImageLabelChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                                                Identifier of the updated Product Variant.

                                                                                                                + *

                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -109,6 +120,7 @@ public interface SetImageLabelChange extends Change { public void setNextValue(final Image nextValue); /** + *

                                                                                                                Product data that was updated.

                                                                                                                *
                                                                                                                  *
                                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                                • *
                                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                                • @@ -118,6 +130,14 @@ public interface SetImageLabelChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                                                  Identifier of the updated Product Variant.

                                                                                                                  + *

                                                                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                  + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetImageLabelChange @@ -137,6 +157,7 @@ public static SetImageLabelChange of(final SetImageLabelChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -157,6 +178,7 @@ public static SetImageLabelChange deepCopy(@Nullable final SetImageLabelChange t instance.setPreviousValue(com.commercetools.history.models.common.Image.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.Image.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeBuilder.java index 4ce7f4e184e..3c6aee12181 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeBuilder.java @@ -18,6 +18,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -33,6 +34,8 @@ public class SetImageLabelChangeBuilder implements Builder private String catalogData; + private String variant; + /** * set the value to the change * @param change value to be set @@ -115,6 +118,7 @@ public SetImageLabelChangeBuilder nextValue(final com.commercetools.history.mode } /** + *

                                                                                                                  Product data that was updated.

                                                                                                                  *
                                                                                                                    *
                                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                                  • *
                                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                                  • @@ -128,6 +132,18 @@ public SetImageLabelChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                                                                                                    Identifier of the updated Product Variant.

                                                                                                                    + *

                                                                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                    + * @param variant value to be set + * @return Builder + */ + + public SetImageLabelChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -156,6 +172,7 @@ public com.commercetools.history.models.common.Image getNextValue() { } /** + *

                                                                                                                    Product data that was updated.

                                                                                                                    *
                                                                                                                      *
                                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                                    • *
                                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                                    • @@ -167,6 +184,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                      Identifier of the updated Product Variant.

                                                                                                                      + *

                                                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                      + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetImageLabelChange with checking for non-null required values * @return SetImageLabelChange @@ -176,7 +203,8 @@ public SetImageLabelChange build() { Objects.requireNonNull(previousValue, SetImageLabelChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetImageLabelChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetImageLabelChange.class + ": catalogData is missing"); - return new SetImageLabelChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetImageLabelChange.class + ": variant is missing"); + return new SetImageLabelChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -184,7 +212,7 @@ public SetImageLabelChange build() { * @return SetImageLabelChange */ public SetImageLabelChange buildUnchecked() { - return new SetImageLabelChangeImpl(change, previousValue, nextValue, catalogData); + return new SetImageLabelChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -206,6 +234,7 @@ public static SetImageLabelChangeBuilder of(final SetImageLabelChange template) builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeImpl.java index f9bb2e02c80..59a3dce3c67 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetImageLabelChangeImpl.java @@ -32,6 +32,8 @@ public class SetImageLabelChangeImpl implements SetImageLabelChange, ModelBase { private String catalogData; + private String variant; + /** * create instance with all properties */ @@ -39,11 +41,12 @@ public class SetImageLabelChangeImpl implements SetImageLabelChange, ModelBase { SetImageLabelChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Image previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.Image nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = SET_IMAGE_LABEL_CHANGE; } @@ -87,6 +90,7 @@ public com.commercetools.history.models.common.Image getNextValue() { } /** + *

                                                                                                                      Product data that was updated.

                                                                                                                      *
                                                                                                                        *
                                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                                      • *
                                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                                      • @@ -97,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -113,6 +126,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -128,11 +145,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -143,6 +162,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -153,6 +173,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChange.java new file mode 100644 index 00000000000..64630d82c0c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChange.java @@ -0,0 +1,265 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.InheritedAssociate; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        This change is initiated by background processes after the Change Parent Unit or Set Unit Type update action is performed (if Associates are inherited).

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetInheritedAssociatesChange setInheritedAssociatesChange = SetInheritedAssociatesChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                                        + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                                        + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetInheritedAssociatesChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetInheritedAssociatesChangeImpl.class) +public interface SetInheritedAssociatesChange extends Change { + + /** + * discriminator value for SetInheritedAssociatesChange + */ + String SET_INHERITED_ASSOCIATES_CHANGE = "SetInheritedAssociatesChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final InheritedAssociate... addedItems); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final InheritedAssociate... removedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue values to be set + */ + + @JsonIgnore + public void setPreviousValue(final InheritedAssociate... previousValue); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue values to be set + */ + + @JsonIgnore + public void setNextValue(final InheritedAssociate... nextValue); + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue values to be set + */ + + public void setNextValue(final List nextValue); + + /** + * factory method + * @return instance of SetInheritedAssociatesChange + */ + public static SetInheritedAssociatesChange of() { + return new SetInheritedAssociatesChangeImpl(); + } + + /** + * factory method to create a shallow copy SetInheritedAssociatesChange + * @param template instance to be copied + * @return copy instance + */ + public static SetInheritedAssociatesChange of(final SetInheritedAssociatesChange template) { + SetInheritedAssociatesChangeImpl instance = new SetInheritedAssociatesChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetInheritedAssociatesChange copyDeep(); + + /** + * factory method to create a deep copy of SetInheritedAssociatesChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetInheritedAssociatesChange deepCopy(@Nullable final SetInheritedAssociatesChange template) { + if (template == null) { + return null; + } + SetInheritedAssociatesChangeImpl instance = new SetInheritedAssociatesChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.InheritedAssociate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.InheritedAssociate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.InheritedAssociate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setNextValue(Optional.ofNullable(template.getNextValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.InheritedAssociate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetInheritedAssociatesChange + * @return builder + */ + public static SetInheritedAssociatesChangeBuilder builder() { + return SetInheritedAssociatesChangeBuilder.of(); + } + + /** + * create builder for SetInheritedAssociatesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetInheritedAssociatesChangeBuilder builder(final SetInheritedAssociatesChange template) { + return SetInheritedAssociatesChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetInheritedAssociatesChange(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/SetInheritedAssociatesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeBuilder.java new file mode 100644 index 00000000000..e6e0479d89c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeBuilder.java @@ -0,0 +1,503 @@ + +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; + +/** + * SetInheritedAssociatesChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetInheritedAssociatesChange setInheritedAssociatesChange = SetInheritedAssociatesChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                                        + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                                        + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetInheritedAssociatesChangeBuilder implements Builder { + + private String change; + + private java.util.List addedItems; + + private java.util.List removedItems; + + private java.util.List previousValue; + + private java.util.List nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addedItems( + final com.commercetools.history.models.common.InheritedAssociate... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.InheritedAssociate... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder setAddedItems( + Function builder) { + return addedItems(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder removedItems( + final com.commercetools.history.models.common.InheritedAssociate... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.InheritedAssociate... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder previousValue( + final com.commercetools.history.models.common.InheritedAssociate... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder previousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusPreviousValue( + final com.commercetools.history.models.common.InheritedAssociate... previousValue) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.addAll(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusPreviousValue( + Function builder) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder withPreviousValue( + Function builder) { + this.previousValue = new ArrayList<>(); + this.previousValue + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addPreviousValue( + Function builder) { + return plusPreviousValue(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder nextValue( + final com.commercetools.history.models.common.InheritedAssociate... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder nextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusNextValue( + final com.commercetools.history.models.common.InheritedAssociate... nextValue) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.addAll(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder plusNextValue( + Function builder) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder withNextValue( + Function builder) { + this.nextValue = new ArrayList<>(); + this.nextValue + .add(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder addNextValue( + Function builder) { + return plusNextValue(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetInheritedAssociatesChangeBuilder setNextValue( + Function builder) { + return nextValue(builder.apply(com.commercetools.history.models.common.InheritedAssociateBuilder.of())); + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + /** + * builds SetInheritedAssociatesChange with checking for non-null required values + * @return SetInheritedAssociatesChange + */ + public SetInheritedAssociatesChange build() { + Objects.requireNonNull(change, SetInheritedAssociatesChange.class + ": change is missing"); + Objects.requireNonNull(addedItems, SetInheritedAssociatesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetInheritedAssociatesChange.class + ": removedItems is missing"); + Objects.requireNonNull(previousValue, SetInheritedAssociatesChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetInheritedAssociatesChange.class + ": nextValue is missing"); + return new SetInheritedAssociatesChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * builds SetInheritedAssociatesChange without checking for non-null required values + * @return SetInheritedAssociatesChange + */ + public SetInheritedAssociatesChange buildUnchecked() { + return new SetInheritedAssociatesChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * factory method for an instance of SetInheritedAssociatesChangeBuilder + * @return builder + */ + public static SetInheritedAssociatesChangeBuilder of() { + return new SetInheritedAssociatesChangeBuilder(); + } + + /** + * create builder for SetInheritedAssociatesChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetInheritedAssociatesChangeBuilder of(final SetInheritedAssociatesChange template) { + SetInheritedAssociatesChangeBuilder builder = new SetInheritedAssociatesChangeBuilder(); + builder.change = template.getChange(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); + 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/SetInheritedAssociatesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeImpl.java new file mode 100644 index 00000000000..a46a275d4f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeImpl.java @@ -0,0 +1,200 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        This change is initiated by background processes after the Change Parent Unit or Set Unit Type update action is performed (if Associates are inherited).

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

                                                                                                                        Elements added to the array.

                                                                                                                        + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + */ + + public java.util.List getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddedItems(final com.commercetools.history.models.common.InheritedAssociate... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.InheritedAssociate... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + + public void setPreviousValue(final com.commercetools.history.models.common.InheritedAssociate... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + } + + public void setPreviousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.InheritedAssociate... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + } + + public void setNextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetInheritedAssociatesChangeImpl that = (SetInheritedAssociatesChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addedItems) + .append(removedItems) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addedItems", addedItems) + .append("removedItems", removedItems) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetInheritedAssociatesChange copyDeep() { + return SetInheritedAssociatesChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChange.java new file mode 100644 index 00000000000..36d1c5ce6a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChange.java @@ -0,0 +1,265 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        This change is initiated by background processes after the Change Parent Unit or Set Unit Type update action is performed (if BusinessUnit storeMode is "FromParent").

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetInheritedStoresChange setInheritedStoresChange = SetInheritedStoresChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                                        + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                                        + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetInheritedStoresChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetInheritedStoresChangeImpl.class) +public interface SetInheritedStoresChange extends Change { + + /** + * discriminator value for SetInheritedStoresChange + */ + String SET_INHERITED_STORES_CHANGE = "SetInheritedStoresChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final KeyReference... addedItems); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final KeyReference... removedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue values to be set + */ + + @JsonIgnore + public void setNextValue(final KeyReference... nextValue); + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue values to be set + */ + + public void setNextValue(final List nextValue); + + /** + * factory method + * @return instance of SetInheritedStoresChange + */ + public static SetInheritedStoresChange of() { + return new SetInheritedStoresChangeImpl(); + } + + /** + * factory method to create a shallow copy SetInheritedStoresChange + * @param template instance to be copied + * @return copy instance + */ + public static SetInheritedStoresChange of(final SetInheritedStoresChange template) { + SetInheritedStoresChangeImpl instance = new SetInheritedStoresChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetInheritedStoresChange copyDeep(); + + /** + * factory method to create a deep copy of SetInheritedStoresChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetInheritedStoresChange deepCopy(@Nullable final SetInheritedStoresChange template) { + if (template == null) { + return null; + } + SetInheritedStoresChangeImpl instance = new SetInheritedStoresChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setNextValue(Optional.ofNullable(template.getNextValue()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for SetInheritedStoresChange + * @return builder + */ + public static SetInheritedStoresChangeBuilder builder() { + return SetInheritedStoresChangeBuilder.of(); + } + + /** + * create builder for SetInheritedStoresChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetInheritedStoresChangeBuilder builder(final SetInheritedStoresChange template) { + return SetInheritedStoresChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetInheritedStoresChange(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/SetInheritedStoresChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeBuilder.java new file mode 100644 index 00000000000..bd7206f705d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeBuilder.java @@ -0,0 +1,407 @@ + +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; + +/** + * SetInheritedStoresChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetInheritedStoresChange setInheritedStoresChange = SetInheritedStoresChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .plusAddedItems(addedItemsBuilder -> addedItemsBuilder)
                                                                                                                        + *             .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder)
                                                                                                                        + *             .plusPreviousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .plusNextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetInheritedStoresChangeBuilder implements Builder { + + private String change; + + private java.util.List addedItems; + + private java.util.List removedItems; + + private java.util.List previousValue; + + private java.util.List nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder addedItems( + final com.commercetools.history.models.common.KeyReference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.KeyReference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder removedItems( + final com.commercetools.history.models.common.KeyReference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.KeyReference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder previousValue( + final com.commercetools.history.models.common.KeyReference... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder previousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param previousValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusPreviousValue( + final com.commercetools.history.models.common.KeyReference... previousValue) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.addAll(Arrays.asList(previousValue)); + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusPreviousValue( + Function> builder) { + if (this.previousValue == null) { + this.previousValue = new ArrayList<>(); + } + this.previousValue.add(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 SetInheritedStoresChangeBuilder withPreviousValue( + Function> builder) { + this.previousValue = new ArrayList<>(); + this.previousValue.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder nextValue( + final com.commercetools.history.models.common.KeyReference... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder nextValue( + final java.util.List nextValue) { + this.nextValue = nextValue; + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusNextValue( + final com.commercetools.history.models.common.KeyReference... nextValue) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.addAll(Arrays.asList(nextValue)); + return this; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param builder function to build the nextValue value + * @return Builder + */ + + public SetInheritedStoresChangeBuilder plusNextValue( + Function> builder) { + if (this.nextValue == null) { + this.nextValue = new ArrayList<>(); + } + this.nextValue.add(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 SetInheritedStoresChangeBuilder withNextValue( + Function> builder) { + this.nextValue = new ArrayList<>(); + this.nextValue.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + /** + * builds SetInheritedStoresChange with checking for non-null required values + * @return SetInheritedStoresChange + */ + public SetInheritedStoresChange build() { + Objects.requireNonNull(change, SetInheritedStoresChange.class + ": change is missing"); + Objects.requireNonNull(addedItems, SetInheritedStoresChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetInheritedStoresChange.class + ": removedItems is missing"); + Objects.requireNonNull(previousValue, SetInheritedStoresChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetInheritedStoresChange.class + ": nextValue is missing"); + return new SetInheritedStoresChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * builds SetInheritedStoresChange without checking for non-null required values + * @return SetInheritedStoresChange + */ + public SetInheritedStoresChange buildUnchecked() { + return new SetInheritedStoresChangeImpl(change, addedItems, removedItems, previousValue, nextValue); + } + + /** + * factory method for an instance of SetInheritedStoresChangeBuilder + * @return builder + */ + public static SetInheritedStoresChangeBuilder of() { + return new SetInheritedStoresChangeBuilder(); + } + + /** + * create builder for SetInheritedStoresChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetInheritedStoresChangeBuilder of(final SetInheritedStoresChange template) { + SetInheritedStoresChangeBuilder builder = new SetInheritedStoresChangeBuilder(); + builder.change = template.getChange(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); + 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/SetInheritedStoresChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeImpl.java new file mode 100644 index 00000000000..18e38f492fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeImpl.java @@ -0,0 +1,198 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        This change is initiated by background processes after the Change Parent Unit or Set Unit Type update action is performed (if BusinessUnit storeMode is "FromParent").

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

                                                                                                                        Elements added to the array.

                                                                                                                        + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + */ + + public java.util.List getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + */ + + public java.util.List getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setAddedItems(final com.commercetools.history.models.common.KeyReference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.KeyReference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + + public void setPreviousValue(final com.commercetools.history.models.common.KeyReference... previousValue) { + this.previousValue = new ArrayList<>(Arrays.asList(previousValue)); + } + + public void setPreviousValue( + final java.util.List previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.KeyReference... nextValue) { + this.nextValue = new ArrayList<>(Arrays.asList(nextValue)); + } + + public void setNextValue(final java.util.List nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetInheritedStoresChangeImpl that = (SetInheritedStoresChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addedItems) + .append(removedItems) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addedItems", addedItems) + .append("removedItems", removedItems) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetInheritedStoresChange copyDeep() { + return SetInheritedStoresChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChange.java index 19ce08eb0e7..15679c64a50 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChange.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                                        Change triggered automatically due to a user-initiated change.

                                                                                                                        + *

                                                                                                                        This change is initiated by background processes after the Set Valid From, Set Valid Until, or Set Valid From and Until update action is performed.

                                                                                                                        * *
                                                                                                                        * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChangeImpl.java index 27e869b5157..65be8c7a7b6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetIsValidChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                                        Change triggered automatically due to a user-initiated change.

                                                                                                                        + *

                                                                                                                        This change is initiated by background processes after the Set Valid From, Set Valid Until, or Set Valid From and Until update action is performed.

                                                                                                                        */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetIsValidChangeImpl implements SetIsValidChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChange.java new file mode 100644 index 00000000000..127e619a6bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChange.java @@ -0,0 +1,229 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set ItemShipping Address CustomField update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetItemShippingAddressCustomFieldChange setItemShippingAddressCustomFieldChange = SetItemShippingAddressCustomFieldChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .addressId("{addressId}")
                                                                                                                        + *             .name("{name}")
                                                                                                                        + *             .customTypeId("{customTypeId}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetItemShippingAddressCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetItemShippingAddressCustomFieldChangeImpl.class) +public interface SetItemShippingAddressCustomFieldChange extends Change { + + /** + * discriminator value for SetItemShippingAddressCustomFieldChange + */ + String SET_ITEM_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE = "SetItemShippingAddressCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        id of the updated Address.

                                                                                                                        + * @return addressId + */ + @NotNull + @JsonProperty("addressId") + public String getAddressId(); + + /** + *

                                                                                                                        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); + + /** + *

                                                                                                                        id of the updated Address.

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

                                                                                                                        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 SetItemShippingAddressCustomFieldChange + */ + public static SetItemShippingAddressCustomFieldChange of() { + return new SetItemShippingAddressCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetItemShippingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetItemShippingAddressCustomFieldChange of(final SetItemShippingAddressCustomFieldChange template) { + SetItemShippingAddressCustomFieldChangeImpl instance = new SetItemShippingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddressId(template.getAddressId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetItemShippingAddressCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetItemShippingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetItemShippingAddressCustomFieldChange deepCopy( + @Nullable final SetItemShippingAddressCustomFieldChange template) { + if (template == null) { + return null; + } + SetItemShippingAddressCustomFieldChangeImpl instance = new SetItemShippingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddressId(template.getAddressId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetItemShippingAddressCustomFieldChange + * @return builder + */ + public static SetItemShippingAddressCustomFieldChangeBuilder builder() { + return SetItemShippingAddressCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetItemShippingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetItemShippingAddressCustomFieldChangeBuilder builder( + final SetItemShippingAddressCustomFieldChange template) { + return SetItemShippingAddressCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetItemShippingAddressCustomFieldChange( + 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/SetItemShippingAddressCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..4e124de5605 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeBuilder.java @@ -0,0 +1,211 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetItemShippingAddressCustomFieldChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetItemShippingAddressCustomFieldChange setItemShippingAddressCustomFieldChange = SetItemShippingAddressCustomFieldChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .addressId("{addressId}")
                                                                                                                        + *             .name("{name}")
                                                                                                                        + *             .customTypeId("{customTypeId}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetItemShippingAddressCustomFieldChangeBuilder + implements Builder { + + private String change; + + private String addressId; + + 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 SetItemShippingAddressCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        id of the updated Address.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        id of the updated Address.

                                                                                                                        + * @return addressId + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                                        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 SetItemShippingAddressCustomFieldChange with checking for non-null required values + * @return SetItemShippingAddressCustomFieldChange + */ + public SetItemShippingAddressCustomFieldChange build() { + Objects.requireNonNull(change, SetItemShippingAddressCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(addressId, SetItemShippingAddressCustomFieldChange.class + ": addressId is missing"); + Objects.requireNonNull(name, SetItemShippingAddressCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, + SetItemShippingAddressCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, + SetItemShippingAddressCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetItemShippingAddressCustomFieldChange.class + ": nextValue is missing"); + return new SetItemShippingAddressCustomFieldChangeImpl(change, addressId, name, customTypeId, previousValue, + nextValue); + } + + /** + * builds SetItemShippingAddressCustomFieldChange without checking for non-null required values + * @return SetItemShippingAddressCustomFieldChange + */ + public SetItemShippingAddressCustomFieldChange buildUnchecked() { + return new SetItemShippingAddressCustomFieldChangeImpl(change, addressId, name, customTypeId, previousValue, + nextValue); + } + + /** + * factory method for an instance of SetItemShippingAddressCustomFieldChangeBuilder + * @return builder + */ + public static SetItemShippingAddressCustomFieldChangeBuilder of() { + return new SetItemShippingAddressCustomFieldChangeBuilder(); + } + + /** + * create builder for SetItemShippingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetItemShippingAddressCustomFieldChangeBuilder of( + final SetItemShippingAddressCustomFieldChange template) { + SetItemShippingAddressCustomFieldChangeBuilder builder = new SetItemShippingAddressCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.addressId = template.getAddressId(); + 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/SetItemShippingAddressCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeImpl.java new file mode 100644 index 00000000000..ac95dbaae19 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeImpl.java @@ -0,0 +1,199 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set ItemShipping Address CustomField update action.

                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetItemShippingAddressCustomFieldChangeImpl implements SetItemShippingAddressCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String addressId; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetItemShippingAddressCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("addressId") final String addressId, @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.addressId = addressId; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_ITEM_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetItemShippingAddressCustomFieldChangeImpl() { + this.type = SET_ITEM_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                        id of the updated Address.

                                                                                                                        + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                                        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 setAddressId(final String addressId) { + this.addressId = addressId; + } + + 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; + + SetItemShippingAddressCustomFieldChangeImpl that = (SetItemShippingAddressCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addressId, that.addressId) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addressId, that.addressId) + .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(addressId) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addressId", addressId) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetItemShippingAddressCustomFieldChange copyDeep() { + return SetItemShippingAddressCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChange.java new file mode 100644 index 00000000000..f59df94819a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChange.java @@ -0,0 +1,200 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set ItemShipping Address Custom Type update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetItemShippingAddressCustomTypeChange setItemShippingAddressCustomTypeChange = SetItemShippingAddressCustomTypeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .addressId("{addressId}")
                                                                                                                        + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetItemShippingAddressCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetItemShippingAddressCustomTypeChangeImpl.class) +public interface SetItemShippingAddressCustomTypeChange extends Change { + + /** + * discriminator value for SetItemShippingAddressCustomTypeChange + */ + String SET_ITEM_SHIPPING_ADDRESS_CUSTOM_TYPE_CHANGE = "SetItemShippingAddressCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        id of the updated Address.

                                                                                                                        + * @return addressId + */ + @NotNull + @JsonProperty("addressId") + public String getAddressId(); + + /** + *

                                                                                                                        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); + + /** + *

                                                                                                                        id of the updated Address.

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

                                                                                                                        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 SetItemShippingAddressCustomTypeChange + */ + public static SetItemShippingAddressCustomTypeChange of() { + return new SetItemShippingAddressCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetItemShippingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetItemShippingAddressCustomTypeChange of(final SetItemShippingAddressCustomTypeChange template) { + SetItemShippingAddressCustomTypeChangeImpl instance = new SetItemShippingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddressId(template.getAddressId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetItemShippingAddressCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetItemShippingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetItemShippingAddressCustomTypeChange deepCopy( + @Nullable final SetItemShippingAddressCustomTypeChange template) { + if (template == null) { + return null; + } + SetItemShippingAddressCustomTypeChangeImpl instance = new SetItemShippingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setAddressId(template.getAddressId()); + 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 SetItemShippingAddressCustomTypeChange + * @return builder + */ + public static SetItemShippingAddressCustomTypeChangeBuilder builder() { + return SetItemShippingAddressCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetItemShippingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetItemShippingAddressCustomTypeChangeBuilder builder( + final SetItemShippingAddressCustomTypeChange template) { + return SetItemShippingAddressCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetItemShippingAddressCustomTypeChange( + 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/SetItemShippingAddressCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..8c4e3a6f1b3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeBuilder.java @@ -0,0 +1,210 @@ + +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; + +/** + * SetItemShippingAddressCustomTypeChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetItemShippingAddressCustomTypeChange setItemShippingAddressCustomTypeChange = SetItemShippingAddressCustomTypeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .addressId("{addressId}")
                                                                                                                        + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetItemShippingAddressCustomTypeChangeBuilder implements Builder { + + private String change; + + private String addressId; + + 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 SetItemShippingAddressCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        id of the updated Address.

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

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetItemShippingAddressCustomTypeChangeBuilder 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 SetItemShippingAddressCustomTypeChangeBuilder 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 SetItemShippingAddressCustomTypeChangeBuilder 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 SetItemShippingAddressCustomTypeChangeBuilder 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 SetItemShippingAddressCustomTypeChangeBuilder 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 SetItemShippingAddressCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                        id of the updated Address.

                                                                                                                        + * @return addressId + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                                        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 SetItemShippingAddressCustomTypeChange with checking for non-null required values + * @return SetItemShippingAddressCustomTypeChange + */ + public SetItemShippingAddressCustomTypeChange build() { + Objects.requireNonNull(change, SetItemShippingAddressCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(addressId, SetItemShippingAddressCustomTypeChange.class + ": addressId is missing"); + Objects.requireNonNull(previousValue, + SetItemShippingAddressCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetItemShippingAddressCustomTypeChange.class + ": nextValue is missing"); + return new SetItemShippingAddressCustomTypeChangeImpl(change, addressId, previousValue, nextValue); + } + + /** + * builds SetItemShippingAddressCustomTypeChange without checking for non-null required values + * @return SetItemShippingAddressCustomTypeChange + */ + public SetItemShippingAddressCustomTypeChange buildUnchecked() { + return new SetItemShippingAddressCustomTypeChangeImpl(change, addressId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetItemShippingAddressCustomTypeChangeBuilder + * @return builder + */ + public static SetItemShippingAddressCustomTypeChangeBuilder of() { + return new SetItemShippingAddressCustomTypeChangeBuilder(); + } + + /** + * create builder for SetItemShippingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetItemShippingAddressCustomTypeChangeBuilder of( + final SetItemShippingAddressCustomTypeChange template) { + SetItemShippingAddressCustomTypeChangeBuilder builder = new SetItemShippingAddressCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.addressId = template.getAddressId(); + 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/SetItemShippingAddressCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeImpl.java new file mode 100644 index 00000000000..fd1a333eff4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set ItemShipping Address Custom Type update action.

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

                                                                                                                        id of the updated Address.

                                                                                                                        + */ + + public String getAddressId() { + return this.addressId; + } + + /** + *

                                                                                                                        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 setAddressId(final String addressId) { + this.addressId = addressId; + } + + 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; + + SetItemShippingAddressCustomTypeChangeImpl that = (SetItemShippingAddressCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(addressId, that.addressId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(addressId, that.addressId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(addressId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("addressId", addressId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetItemShippingAddressCustomTypeChange copyDeep() { + return SetItemShippingAddressCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChange.java index ebb0203dd65..a678d36fae8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChange.java @@ -21,6 +21,8 @@ *
                                                                                                                      • Set Key on Categories.
                                                                                                                      • *
                                                                                                                      • Set Key on Customers.
                                                                                                                      • *
                                                                                                                      • Set Key on Customer Groups.
                                                                                                                      • + *
                                                                                                                      • Set Key on Discount Codes.
                                                                                                                      • + *
                                                                                                                      • Set Key on Inventories.
                                                                                                                      • *
                                                                                                                      • Set Key on Payments.
                                                                                                                      • *
                                                                                                                      • Set Key on Products.
                                                                                                                      • *
                                                                                                                      • Set Key on Product Discounts.
                                                                                                                      • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChangeImpl.java index 41585e69f07..3d9fd5db01d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetKeyChangeImpl.java @@ -23,6 +23,8 @@ *
                                                                                                                      • Set Key on Categories.
                                                                                                                      • *
                                                                                                                      • Set Key on Customers.
                                                                                                                      • *
                                                                                                                      • Set Key on Customer Groups.
                                                                                                                      • + *
                                                                                                                      • Set Key on Discount Codes.
                                                                                                                      • + *
                                                                                                                      • Set Key on Inventories.
                                                                                                                      • *
                                                                                                                      • Set Key on Payments.
                                                                                                                      • *
                                                                                                                      • Set Key on Products.
                                                                                                                      • *
                                                                                                                      • Set Key on Product Discounts.
                                                                                                                      • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChange.java index aa4de4b961b..e2fc7441329 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChange.java @@ -25,6 +25,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -71,6 +73,22 @@ public interface SetLanguagesChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + @NotNull + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + @NotNull + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -108,6 +126,36 @@ public interface SetLanguagesChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final String... addedItems); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final String... removedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetLanguagesChange @@ -126,6 +174,8 @@ public static SetLanguagesChange of(final SetLanguagesChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -145,6 +195,8 @@ public static SetLanguagesChange deepCopy(@Nullable final SetLanguagesChange tem instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()).map(ArrayList::new).orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeBuilder.java index 1fadebd77a5..0772d4a79a2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeBuilder.java @@ -16,6 +16,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -29,6 +31,10 @@ public class SetLanguagesChangeBuilder implements Builder { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -112,6 +118,78 @@ public SetLanguagesChangeBuilder plusNextValue(final String... nextValue) { return this; } + /** + *

                                                                                                                        Elements added to the array.

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

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetLanguagesChangeBuilder addedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetLanguagesChangeBuilder plusAddedItems(final String... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

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

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetLanguagesChangeBuilder removedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetLanguagesChangeBuilder plusRemovedItems(final String... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + /** * value of change} * @return change @@ -139,6 +217,24 @@ public java.util.List getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetLanguagesChange with checking for non-null required values * @return SetLanguagesChange @@ -147,7 +243,9 @@ public SetLanguagesChange build() { Objects.requireNonNull(change, SetLanguagesChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetLanguagesChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetLanguagesChange.class + ": nextValue is missing"); - return new SetLanguagesChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetLanguagesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetLanguagesChange.class + ": removedItems is missing"); + return new SetLanguagesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -155,7 +253,7 @@ public SetLanguagesChange build() { * @return SetLanguagesChange */ public SetLanguagesChange buildUnchecked() { - return new SetLanguagesChangeImpl(change, previousValue, nextValue); + return new SetLanguagesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -176,6 +274,8 @@ public static SetLanguagesChangeBuilder of(final SetLanguagesChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeImpl.java index 5ffd2e07bcf..bfd2f90b4d6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLanguagesChangeImpl.java @@ -30,16 +30,24 @@ public class SetLanguagesChangeImpl implements SetLanguagesChange, ModelBase { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetLanguagesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_LANGUAGES_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -102,6 +126,22 @@ public void setNextValue(final java.util.List nextValue) { this.nextValue = nextValue; } + public void setAddedItems(final String... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final String... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -116,10 +156,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -129,6 +173,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -138,6 +184,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChange.java index d429636eb76..d84baf2007b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * SetLineItemDeactivatedAtChange + *

                                                                                                                        This change is initiated by background processes after the Delete Product request or Remove ProductVariant update action is performed.

                                                                                                                        * *
                                                                                                                        * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChangeImpl.java index 9abb3dc293b..b07fe516c99 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDeactivatedAtChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * SetLineItemDeactivatedAtChange + *

                                                                                                                        This change is initiated by background processes after the Delete Product request or Remove ProductVariant update action is performed.

                                                                                                                        */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetLineItemDeactivatedAtChangeImpl implements SetLineItemDeactivatedAtChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChange.java index 435e9ba85af..f0ccbef3d07 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChange.java @@ -30,6 +30,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -88,13 +89,22 @@ public interface SetLineItemDiscountedPriceChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -124,12 +134,20 @@ public interface SetLineItemDiscountedPriceChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemDiscountedPriceChange @@ -150,6 +168,7 @@ public static SetLineItemDiscountedPriceChange of(final SetLineItemDiscountedPri instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -173,6 +192,7 @@ public static SetLineItemDiscountedPriceChange deepCopy(@Nullable final SetLineI com.commercetools.history.models.common.DiscountedLineItemPrice.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeBuilder.java index 5afdf0007f0..40cff979c76 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -36,6 +37,8 @@ public class SetLineItemDiscountedPriceChangeBuilder implements Buildersku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -168,6 +172,17 @@ public SetLineItemDiscountedPriceChangeBuilder variant(final String variant) { return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemDiscountedPriceChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -205,7 +220,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -213,6 +229,15 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemDiscountedPriceChange with checking for non-null required values * @return SetLineItemDiscountedPriceChange @@ -223,7 +248,9 @@ public SetLineItemDiscountedPriceChange build() { Objects.requireNonNull(nextValue, SetLineItemDiscountedPriceChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemDiscountedPriceChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetLineItemDiscountedPriceChange.class + ": variant is missing"); - return new SetLineItemDiscountedPriceChangeImpl(change, previousValue, nextValue, lineItem, variant); + Objects.requireNonNull(lineItemId, SetLineItemDiscountedPriceChange.class + ": lineItemId is missing"); + return new SetLineItemDiscountedPriceChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -231,7 +258,8 @@ public SetLineItemDiscountedPriceChange build() { * @return SetLineItemDiscountedPriceChange */ public SetLineItemDiscountedPriceChange buildUnchecked() { - return new SetLineItemDiscountedPriceChangeImpl(change, previousValue, nextValue, lineItem, variant); + return new SetLineItemDiscountedPriceChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -254,6 +282,7 @@ public static SetLineItemDiscountedPriceChangeBuilder of(final SetLineItemDiscou builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeImpl.java index 3d79d87b509..c86f52cd39b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeImpl.java @@ -34,6 +34,8 @@ public class SetLineItemDiscountedPriceChangeImpl implements SetLineItemDiscount private String variant; + private String lineItemId; + /** * create instance with all properties */ @@ -42,12 +44,13 @@ public class SetLineItemDiscountedPriceChangeImpl implements SetLineItemDiscount @JsonProperty("previousValue") final com.commercetools.history.models.common.DiscountedLineItemPrice previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.DiscountedLineItemPrice nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("variant") final String variant) { + @JsonProperty("variant") final String variant, @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_DISCOUNTED_PRICE_CHANGE; } @@ -99,13 +102,22 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -126,6 +138,10 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -142,12 +158,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -159,6 +177,7 @@ public int hashCode() { .append(nextValue) .append(lineItem) .append(variant) + .append(lineItemId) .toHashCode(); } @@ -170,6 +189,7 @@ public String toString() { .append("nextValue", nextValue) .append("lineItem", lineItem) .append("variant", variant) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChange.java index 8766f1bec5b..2ea1afcc4ac 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChange.java @@ -30,6 +30,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -88,13 +89,22 @@ public interface SetLineItemDiscountedPricePerQuantityChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -124,12 +134,20 @@ public interface SetLineItemDiscountedPricePerQuantityChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemDiscountedPricePerQuantityChange @@ -151,6 +169,7 @@ public static SetLineItemDiscountedPricePerQuantityChange of( instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -175,6 +194,7 @@ public static SetLineItemDiscountedPricePerQuantityChange deepCopy( .deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeBuilder.java index ffcb90b5541..296a91023dd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -37,6 +38,8 @@ public class SetLineItemDiscountedPricePerQuantityChangeBuilder private String variant; + private String lineItemId; + /** * set the value to the change * @param change value to be set @@ -163,7 +166,8 @@ public SetLineItemDiscountedPricePerQuantityChangeBuilder lineItem( } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -173,6 +177,17 @@ public SetLineItemDiscountedPricePerQuantityChangeBuilder variant(final String v return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemDiscountedPricePerQuantityChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -210,7 +225,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -218,6 +234,15 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemDiscountedPricePerQuantityChange with checking for non-null required values * @return SetLineItemDiscountedPricePerQuantityChange @@ -229,7 +254,10 @@ public SetLineItemDiscountedPricePerQuantityChange build() { Objects.requireNonNull(nextValue, SetLineItemDiscountedPricePerQuantityChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemDiscountedPricePerQuantityChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetLineItemDiscountedPricePerQuantityChange.class + ": variant is missing"); - return new SetLineItemDiscountedPricePerQuantityChangeImpl(change, previousValue, nextValue, lineItem, variant); + Objects.requireNonNull(lineItemId, + SetLineItemDiscountedPricePerQuantityChange.class + ": lineItemId is missing"); + return new SetLineItemDiscountedPricePerQuantityChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -237,7 +265,8 @@ public SetLineItemDiscountedPricePerQuantityChange build() { * @return SetLineItemDiscountedPricePerQuantityChange */ public SetLineItemDiscountedPricePerQuantityChange buildUnchecked() { - return new SetLineItemDiscountedPricePerQuantityChangeImpl(change, previousValue, nextValue, lineItem, variant); + return new SetLineItemDiscountedPricePerQuantityChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -261,6 +290,7 @@ public static SetLineItemDiscountedPricePerQuantityChangeBuilder of( builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeImpl.java index 7c777b39f03..408331b87ab 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeImpl.java @@ -35,6 +35,8 @@ public class SetLineItemDiscountedPricePerQuantityChangeImpl private String variant; + private String lineItemId; + /** * create instance with all properties */ @@ -43,12 +45,13 @@ public class SetLineItemDiscountedPricePerQuantityChangeImpl @JsonProperty("previousValue") final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("variant") final String variant) { + @JsonProperty("variant") final String variant, @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_DISCOUNTED_PRICE_PER_QUANTITY_CHANGE; } @@ -100,13 +103,22 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -129,6 +141,10 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -145,12 +161,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -162,6 +180,7 @@ public int hashCode() { .append(nextValue) .append(lineItem) .append(variant) + .append(lineItemId) .toHashCode(); } @@ -173,6 +192,7 @@ public String toString() { .append("nextValue", nextValue) .append("lineItem", lineItem) .append("variant", variant) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChange.java index 9db98cc6dc2..3a135b7b2be 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChange.java @@ -88,7 +88,8 @@ public interface SetLineItemDistributionChannelChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @@ -124,7 +125,8 @@ public interface SetLineItemDistributionChannelChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeBuilder.java index 7a4ce41fb95..38defd35ea2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeBuilder.java @@ -49,13 +49,13 @@ public SetLineItemDistributionChannelChangeBuilder change(final String change) { /** *

                                                                                                                        Value before the change.

                                                                                                                        - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetLineItemDistributionChannelChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -65,33 +65,21 @@ public SetLineItemDistributionChannelChangeBuilder previousValue( * @return Builder */ - public SetLineItemDistributionChannelChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                        Value before the change.

                                                                                                                        - * @param previousValue value to be set - * @return Builder - */ - public SetLineItemDistributionChannelChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                        Value after the change.

                                                                                                                        - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ public SetLineItemDistributionChannelChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -101,21 +89,9 @@ public SetLineItemDistributionChannelChangeBuilder nextValue( * @return Builder */ - public SetLineItemDistributionChannelChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                        Value after the change.

                                                                                                                        - * @param nextValue value to be set - * @return Builder - */ - public SetLineItemDistributionChannelChangeBuilder nextValue( - final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } @@ -156,7 +132,8 @@ public SetLineItemDistributionChannelChangeBuilder lineItem( } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -203,7 +180,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeImpl.java index 350cfdc96ad..956028115b9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemDistributionChannelChangeImpl.java @@ -99,7 +99,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChange.java index 56bb2d7401f..e29a08057cd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChange.java @@ -29,6 +29,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) + * .lineItemId("{lineItemId}") * .build() * * @@ -86,6 +87,14 @@ public interface SetLineItemPriceChange extends Change { @JsonProperty("lineItem") public LocalizedString getLineItem(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -114,6 +123,13 @@ public interface SetLineItemPriceChange extends Change { public void setLineItem(final LocalizedString lineItem); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemPriceChange @@ -133,6 +149,7 @@ public static SetLineItemPriceChange of(final SetLineItemPriceChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -153,6 +170,7 @@ public static SetLineItemPriceChange deepCopy(@Nullable final SetLineItemPriceCh instance.setPreviousValue(com.commercetools.history.models.common.Price.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.Price.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeBuilder.java index 5a11175bde2..917b7edd47c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeBuilder.java @@ -18,6 +18,7 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) + * .lineItemId("{lineItemId}") * .build() * * @@ -33,6 +34,8 @@ public class SetLineItemPriceChangeBuilder implements Builderid of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemPriceChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -187,6 +201,15 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { return this.lineItem; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemPriceChange with checking for non-null required values * @return SetLineItemPriceChange @@ -196,7 +219,8 @@ public SetLineItemPriceChange build() { Objects.requireNonNull(previousValue, SetLineItemPriceChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetLineItemPriceChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemPriceChange.class + ": lineItem is missing"); - return new SetLineItemPriceChangeImpl(change, previousValue, nextValue, lineItem); + Objects.requireNonNull(lineItemId, SetLineItemPriceChange.class + ": lineItemId is missing"); + return new SetLineItemPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId); } /** @@ -204,7 +228,7 @@ public SetLineItemPriceChange build() { * @return SetLineItemPriceChange */ public SetLineItemPriceChange buildUnchecked() { - return new SetLineItemPriceChangeImpl(change, previousValue, nextValue, lineItem); + return new SetLineItemPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId); } /** @@ -226,6 +250,7 @@ public static SetLineItemPriceChangeBuilder of(final SetLineItemPriceChange temp builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeImpl.java index 2ff91744c57..de912ee015f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeImpl.java @@ -32,6 +32,8 @@ public class SetLineItemPriceChangeImpl implements SetLineItemPriceChange, Model private com.commercetools.history.models.common.LocalizedString lineItem; + private String lineItemId; + /** * create instance with all properties */ @@ -39,11 +41,13 @@ public class SetLineItemPriceChangeImpl implements SetLineItemPriceChange, Model SetLineItemPriceChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Price previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.Price nextValue, - @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem) { + @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, + @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_PRICE_CHANGE; } @@ -94,6 +98,14 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { return this.lineItem; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -110,6 +122,10 @@ public void setLineItem(final com.commercetools.history.models.common.LocalizedS this.lineItem = lineItem; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -125,11 +141,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -140,6 +158,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(lineItem) + .append(lineItemId) .toHashCode(); } @@ -150,6 +169,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("lineItem", lineItem) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChange.java index 0b36096bee3..59e113e6762 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChange.java @@ -94,7 +94,8 @@ public interface SetLineItemProductKeyChange extends Change { public String getLineItemId(); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @@ -137,7 +138,8 @@ public interface SetLineItemProductKeyChange extends Change { public void setLineItemId(final String lineItemId); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeBuilder.java index 50db168cfb5..d6c376d6b80 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeBuilder.java @@ -120,7 +120,8 @@ public SetLineItemProductKeyChangeBuilder lineItemId(final String lineItemId) { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -176,7 +177,8 @@ public String getLineItemId() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeImpl.java index 3ebd1d42511..a00eadb081b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductKeyChangeImpl.java @@ -110,7 +110,8 @@ public String getLineItemId() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChange.java index d7dbe111813..a3e315124fc 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChange.java @@ -29,6 +29,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -87,13 +88,22 @@ public interface SetLineItemProductSlugChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -123,12 +133,20 @@ public interface SetLineItemProductSlugChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemProductSlugChange @@ -149,6 +167,7 @@ public static SetLineItemProductSlugChange of(final SetLineItemProductSlugChange instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -172,6 +191,7 @@ public static SetLineItemProductSlugChange deepCopy(@Nullable final SetLineItemP com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeBuilder.java index 2a094619d15..6f4ae9403ea 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -36,6 +37,8 @@ public class SetLineItemProductSlugChangeBuilder implements Buildersku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -166,6 +170,17 @@ public SetLineItemProductSlugChangeBuilder variant(final String variant) { return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemProductSlugChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -203,7 +218,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -211,6 +227,15 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemProductSlugChange with checking for non-null required values * @return SetLineItemProductSlugChange @@ -221,7 +246,8 @@ public SetLineItemProductSlugChange build() { Objects.requireNonNull(nextValue, SetLineItemProductSlugChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemProductSlugChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetLineItemProductSlugChange.class + ": variant is missing"); - return new SetLineItemProductSlugChangeImpl(change, previousValue, nextValue, lineItem, variant); + Objects.requireNonNull(lineItemId, SetLineItemProductSlugChange.class + ": lineItemId is missing"); + return new SetLineItemProductSlugChangeImpl(change, previousValue, nextValue, lineItem, variant, lineItemId); } /** @@ -229,7 +255,7 @@ public SetLineItemProductSlugChange build() { * @return SetLineItemProductSlugChange */ public SetLineItemProductSlugChange buildUnchecked() { - return new SetLineItemProductSlugChangeImpl(change, previousValue, nextValue, lineItem, variant); + return new SetLineItemProductSlugChangeImpl(change, previousValue, nextValue, lineItem, variant, lineItemId); } /** @@ -252,6 +278,7 @@ public static SetLineItemProductSlugChangeBuilder of(final SetLineItemProductSlu builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeImpl.java index d35d3eacb52..e75a4952417 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeImpl.java @@ -34,6 +34,8 @@ public class SetLineItemProductSlugChangeImpl implements SetLineItemProductSlugC private String variant; + private String lineItemId; + /** * create instance with all properties */ @@ -42,12 +44,13 @@ public class SetLineItemProductSlugChangeImpl implements SetLineItemProductSlugC @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("variant") final String variant) { + @JsonProperty("variant") final String variant, @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_PRODUCT_SLUG_CHANGE; } @@ -99,13 +102,22 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the updated ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -126,6 +138,10 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -142,12 +158,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -159,6 +177,7 @@ public int hashCode() { .append(nextValue) .append(lineItem) .append(variant) + .append(lineItemId) .toHashCode(); } @@ -170,6 +189,7 @@ public String toString() { .append("nextValue", nextValue) .append("lineItem", lineItem) .append("variant", variant) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChange.java index 97fe52ade83..f6d27b0fe02 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChange.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; import com.commercetools.history.models.common.ItemShippingDetails; +import com.commercetools.history.models.common.LocalizedString; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -32,6 +33,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItemId("{lineItemId}") + * .lineItem(lineItemBuilder -> lineItemBuilder) + * .variant("{variant}") * .build() * * @@ -88,6 +91,24 @@ public interface SetLineItemShippingDetailsChange extends Change { @JsonProperty("lineItemId") public String getLineItemId(); + /** + *

                                                                                                                        Name of the Product the updated Line Item is based on.

                                                                                                                        + * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public LocalizedString getLineItem(); + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -116,6 +137,21 @@ public interface SetLineItemShippingDetailsChange extends Change { public void setLineItemId(final String lineItemId); + /** + *

                                                                                                                        Name of the Product the updated Line Item is based on.

                                                                                                                        + * @param lineItem value to be set + */ + + public void setLineItem(final LocalizedString lineItem); + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetLineItemShippingDetailsChange @@ -135,6 +171,8 @@ public static SetLineItemShippingDetailsChange of(final SetLineItemShippingDetai instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setLineItemId(template.getLineItemId()); + instance.setLineItem(template.getLineItem()); + instance.setVariant(template.getVariant()); return instance; } @@ -157,6 +195,8 @@ public static SetLineItemShippingDetailsChange deepCopy(@Nullable final SetLineI instance.setNextValue( com.commercetools.history.models.common.ItemShippingDetails.deepCopy(template.getNextValue())); instance.setLineItemId(template.getLineItemId()); + instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeBuilder.java index 5e7819d3766..c7e36b5ee1c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItemId("{lineItemId}") + * .lineItem(lineItemBuilder -> lineItemBuilder) + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetLineItemShippingDetailsChangeBuilder implements BuilderName of the Product the updated Line Item is based on.

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

                                                                                                                        Name of the Product the updated Line Item is based on.

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

                                                                                                                        Name of the Product the updated Line Item is based on.

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

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + * @return Builder + */ + + public SetLineItemShippingDetailsChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -164,6 +218,25 @@ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                        Name of the Product the updated Line Item is based on.

                                                                                                                        + * @return lineItem + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetLineItemShippingDetailsChange with checking for non-null required values * @return SetLineItemShippingDetailsChange @@ -173,7 +246,10 @@ public SetLineItemShippingDetailsChange build() { Objects.requireNonNull(previousValue, SetLineItemShippingDetailsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetLineItemShippingDetailsChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItemId, SetLineItemShippingDetailsChange.class + ": lineItemId is missing"); - return new SetLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, lineItemId); + Objects.requireNonNull(lineItem, SetLineItemShippingDetailsChange.class + ": lineItem is missing"); + Objects.requireNonNull(variant, SetLineItemShippingDetailsChange.class + ": variant is missing"); + return new SetLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, lineItemId, lineItem, + variant); } /** @@ -181,7 +257,8 @@ public SetLineItemShippingDetailsChange build() { * @return SetLineItemShippingDetailsChange */ public SetLineItemShippingDetailsChange buildUnchecked() { - return new SetLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, lineItemId); + return new SetLineItemShippingDetailsChangeImpl(change, previousValue, nextValue, lineItemId, lineItem, + variant); } /** @@ -203,6 +280,8 @@ public static SetLineItemShippingDetailsChangeBuilder of(final SetLineItemShippi builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.lineItemId = template.getLineItemId(); + builder.lineItem = template.getLineItem(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeImpl.java index cf1a11f4b26..512ea5e39ac 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeImpl.java @@ -36,6 +36,10 @@ public class SetLineItemShippingDetailsChangeImpl implements SetLineItemShipping private String lineItemId; + private com.commercetools.history.models.common.LocalizedString lineItem; + + private String variant; + /** * create instance with all properties */ @@ -43,11 +47,15 @@ public class SetLineItemShippingDetailsChangeImpl implements SetLineItemShipping SetLineItemShippingDetailsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.ItemShippingDetails previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.ItemShippingDetails nextValue, - @JsonProperty("lineItemId") final String lineItemId) { + @JsonProperty("lineItemId") final String lineItemId, + @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, + @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItemId = lineItemId; + this.lineItem = lineItem; + this.variant = variant; this.type = SET_LINE_ITEM_SHIPPING_DETAILS_CHANGE; } @@ -98,6 +106,23 @@ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                        Name of the Product the updated Line Item is based on.

                                                                                                                        + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -114,6 +139,14 @@ public void setLineItemId(final String lineItemId) { this.lineItemId = lineItemId; } + public void setLineItem(final com.commercetools.history.models.common.LocalizedString lineItem) { + this.lineItem = lineItem; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -129,11 +162,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItemId, that.lineItemId) + .append(lineItem, that.lineItem) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItemId, that.lineItemId) + .append(lineItem, that.lineItem) + .append(variant, that.variant) .isEquals(); } @@ -144,6 +181,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(lineItemId) + .append(lineItem) + .append(variant) .toHashCode(); } @@ -154,6 +193,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("lineItemId", lineItemId) + .append("lineItem", lineItem) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChange.java index 16049dd8aeb..5b4fa021aed 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChange.java @@ -32,6 +32,7 @@ * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") * .taxMode(TaxMode.PLATFORM) + * .lineItemId("{lineItemId}") * .build() * * @@ -90,7 +91,8 @@ public interface SetLineItemTaxAmountChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @@ -105,6 +107,14 @@ public interface SetLineItemTaxAmountChange extends Change { @JsonProperty("taxMode") public TaxMode getTaxMode(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -134,7 +144,8 @@ public interface SetLineItemTaxAmountChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set */ @@ -147,6 +158,13 @@ public interface SetLineItemTaxAmountChange extends Change { public void setTaxMode(final TaxMode taxMode); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemTaxAmountChange @@ -168,6 +186,7 @@ public static SetLineItemTaxAmountChange of(final SetLineItemTaxAmountChange tem instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); instance.setTaxMode(template.getTaxMode()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -191,6 +210,7 @@ public static SetLineItemTaxAmountChange deepCopy(@Nullable final SetLineItemTax instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); instance.setTaxMode(template.getTaxMode()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeBuilder.java index 15ccde04825..0d09336a486 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeBuilder.java @@ -20,6 +20,7 @@ * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") * .taxMode(TaxMode.PLATFORM) + * .lineItemId("{lineItemId}") * .build() * * @@ -39,6 +40,8 @@ public class SetLineItemTaxAmountChangeBuilder implements Buildersku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -180,6 +184,17 @@ public SetLineItemTaxAmountChangeBuilder taxMode(final com.commercetools.history return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemTaxAmountChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -217,7 +232,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -234,6 +250,15 @@ public com.commercetools.history.models.common.TaxMode getTaxMode() { return this.taxMode; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemTaxAmountChange with checking for non-null required values * @return SetLineItemTaxAmountChange @@ -245,7 +270,9 @@ public SetLineItemTaxAmountChange build() { Objects.requireNonNull(lineItem, SetLineItemTaxAmountChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetLineItemTaxAmountChange.class + ": variant is missing"); Objects.requireNonNull(taxMode, SetLineItemTaxAmountChange.class + ": taxMode is missing"); - return new SetLineItemTaxAmountChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode); + Objects.requireNonNull(lineItemId, SetLineItemTaxAmountChange.class + ": lineItemId is missing"); + return new SetLineItemTaxAmountChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode, + lineItemId); } /** @@ -253,7 +280,8 @@ public SetLineItemTaxAmountChange build() { * @return SetLineItemTaxAmountChange */ public SetLineItemTaxAmountChange buildUnchecked() { - return new SetLineItemTaxAmountChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode); + return new SetLineItemTaxAmountChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode, + lineItemId); } /** @@ -277,6 +305,7 @@ public static SetLineItemTaxAmountChangeBuilder of(final SetLineItemTaxAmountCha builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); builder.taxMode = template.getTaxMode(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeImpl.java index 65618ea1a44..90bee4f03a8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeImpl.java @@ -36,6 +36,8 @@ public class SetLineItemTaxAmountChangeImpl implements SetLineItemTaxAmountChang private com.commercetools.history.models.common.TaxMode taxMode; + private String lineItemId; + /** * create instance with all properties */ @@ -45,13 +47,15 @@ public class SetLineItemTaxAmountChangeImpl implements SetLineItemTaxAmountChang @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxRate nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, @JsonProperty("variant") final String variant, - @JsonProperty("taxMode") final com.commercetools.history.models.common.TaxMode taxMode) { + @JsonProperty("taxMode") final com.commercetools.history.models.common.TaxMode taxMode, + @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; this.taxMode = taxMode; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_TAX_AMOUNT_CHANGE; } @@ -103,7 +107,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { @@ -118,6 +123,14 @@ public com.commercetools.history.models.common.TaxMode getTaxMode() { return this.taxMode; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -142,6 +155,10 @@ public void setTaxMode(final com.commercetools.history.models.common.TaxMode tax this.taxMode = taxMode; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -159,6 +176,7 @@ public boolean equals(Object o) { .append(lineItem, that.lineItem) .append(variant, that.variant) .append(taxMode, that.taxMode) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -166,6 +184,7 @@ public boolean equals(Object o) { .append(lineItem, that.lineItem) .append(variant, that.variant) .append(taxMode, that.taxMode) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -178,6 +197,7 @@ public int hashCode() { .append(lineItem) .append(variant) .append(taxMode) + .append(lineItemId) .toHashCode(); } @@ -190,6 +210,7 @@ public String toString() { .append("lineItem", lineItem) .append("variant", variant) .append("taxMode", taxMode) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChange.java index 88cc29be9b0..c06bac7b23b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChange.java @@ -32,6 +32,7 @@ * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") * .taxMode(TaxMode.PLATFORM) + * .lineItemId("{lineItemId}") * .build() * * @@ -90,7 +91,8 @@ public interface SetLineItemTaxRateChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @@ -105,6 +107,14 @@ public interface SetLineItemTaxRateChange extends Change { @JsonProperty("taxMode") public TaxMode getTaxMode(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -134,7 +144,8 @@ public interface SetLineItemTaxRateChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set */ @@ -147,6 +158,13 @@ public interface SetLineItemTaxRateChange extends Change { public void setTaxMode(final TaxMode taxMode); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetLineItemTaxRateChange @@ -168,6 +186,7 @@ public static SetLineItemTaxRateChange of(final SetLineItemTaxRateChange templat instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); instance.setTaxMode(template.getTaxMode()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -191,6 +210,7 @@ public static SetLineItemTaxRateChange deepCopy(@Nullable final SetLineItemTaxRa instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); instance.setTaxMode(template.getTaxMode()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeBuilder.java index ee2128e4059..68d19fd7e6c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeBuilder.java @@ -20,6 +20,7 @@ * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") * .taxMode(TaxMode.PLATFORM) + * .lineItemId("{lineItemId}") * .build() * * @@ -39,6 +40,8 @@ public class SetLineItemTaxRateChangeBuilder implements Buildersku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -179,6 +183,17 @@ public SetLineItemTaxRateChangeBuilder taxMode(final com.commercetools.history.m return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetLineItemTaxRateChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -216,7 +231,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -233,6 +249,15 @@ public com.commercetools.history.models.common.TaxMode getTaxMode() { return this.taxMode; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetLineItemTaxRateChange with checking for non-null required values * @return SetLineItemTaxRateChange @@ -244,7 +269,9 @@ public SetLineItemTaxRateChange build() { Objects.requireNonNull(lineItem, SetLineItemTaxRateChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetLineItemTaxRateChange.class + ": variant is missing"); Objects.requireNonNull(taxMode, SetLineItemTaxRateChange.class + ": taxMode is missing"); - return new SetLineItemTaxRateChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode); + Objects.requireNonNull(lineItemId, SetLineItemTaxRateChange.class + ": lineItemId is missing"); + return new SetLineItemTaxRateChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode, + lineItemId); } /** @@ -252,7 +279,8 @@ public SetLineItemTaxRateChange build() { * @return SetLineItemTaxRateChange */ public SetLineItemTaxRateChange buildUnchecked() { - return new SetLineItemTaxRateChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode); + return new SetLineItemTaxRateChangeImpl(change, previousValue, nextValue, lineItem, variant, taxMode, + lineItemId); } /** @@ -276,6 +304,7 @@ public static SetLineItemTaxRateChangeBuilder of(final SetLineItemTaxRateChange builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); builder.taxMode = template.getTaxMode(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeImpl.java index a7b44fb1394..e092a81e367 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeImpl.java @@ -36,6 +36,8 @@ public class SetLineItemTaxRateChangeImpl implements SetLineItemTaxRateChange, M private com.commercetools.history.models.common.TaxMode taxMode; + private String lineItemId; + /** * create instance with all properties */ @@ -45,13 +47,15 @@ public class SetLineItemTaxRateChangeImpl implements SetLineItemTaxRateChange, M @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxRate nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, @JsonProperty("variant") final String variant, - @JsonProperty("taxMode") final com.commercetools.history.models.common.TaxMode taxMode) { + @JsonProperty("taxMode") final com.commercetools.history.models.common.TaxMode taxMode, + @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; this.taxMode = taxMode; + this.lineItemId = lineItemId; this.type = SET_LINE_ITEM_TAX_RATE_CHANGE; } @@ -103,7 +107,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { @@ -118,6 +123,14 @@ public com.commercetools.history.models.common.TaxMode getTaxMode() { return this.taxMode; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -142,6 +155,10 @@ public void setTaxMode(final com.commercetools.history.models.common.TaxMode tax this.taxMode = taxMode; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -159,6 +176,7 @@ public boolean equals(Object o) { .append(lineItem, that.lineItem) .append(variant, that.variant) .append(taxMode, that.taxMode) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -166,6 +184,7 @@ public boolean equals(Object o) { .append(lineItem, that.lineItem) .append(variant, that.variant) .append(taxMode, that.taxMode) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -178,6 +197,7 @@ public int hashCode() { .append(lineItem) .append(variant) .append(taxMode) + .append(lineItemId) .toHashCode(); } @@ -190,6 +210,7 @@ public String toString() { .append("lineItem", lineItem) .append("variant", variant) .append("taxMode", taxMode) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChange.java index 60e702edf8e..09670fd7132 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChange.java @@ -30,6 +30,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .lineItemId("{lineItemId}") + * .variant("{variant}") * .build() * * @@ -95,6 +96,15 @@ public interface SetLineItemTaxedPriceChange extends Change { @JsonProperty("lineItemId") public String getLineItemId(); + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -130,6 +140,14 @@ public interface SetLineItemTaxedPriceChange extends Change { public void setLineItemId(final String lineItemId); + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetLineItemTaxedPriceChange @@ -150,6 +168,7 @@ public static SetLineItemTaxedPriceChange of(final SetLineItemTaxedPriceChange t instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); instance.setLineItemId(template.getLineItemId()); + instance.setVariant(template.getVariant()); return instance; } @@ -172,6 +191,7 @@ public static SetLineItemTaxedPriceChange deepCopy(@Nullable final SetLineItemTa instance.setNextValue(com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setLineItemId(template.getLineItemId()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeBuilder.java index 6332454e7da..45c0e678dc0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .lineItemId("{lineItemId}") + * .variant("{variant}") * .build() * * @@ -36,6 +37,8 @@ public class SetLineItemTaxedPriceChangeBuilder implements BuilderIdentifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + * @return Builder + */ + + public SetLineItemTaxedPriceChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -211,6 +226,16 @@ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetLineItemTaxedPriceChange with checking for non-null required values * @return SetLineItemTaxedPriceChange @@ -221,7 +246,8 @@ public SetLineItemTaxedPriceChange build() { Objects.requireNonNull(nextValue, SetLineItemTaxedPriceChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemTaxedPriceChange.class + ": lineItem is missing"); Objects.requireNonNull(lineItemId, SetLineItemTaxedPriceChange.class + ": lineItemId is missing"); - return new SetLineItemTaxedPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId); + Objects.requireNonNull(variant, SetLineItemTaxedPriceChange.class + ": variant is missing"); + return new SetLineItemTaxedPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId, variant); } /** @@ -229,7 +255,7 @@ public SetLineItemTaxedPriceChange build() { * @return SetLineItemTaxedPriceChange */ public SetLineItemTaxedPriceChange buildUnchecked() { - return new SetLineItemTaxedPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId); + return new SetLineItemTaxedPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId, variant); } /** @@ -252,6 +278,7 @@ public static SetLineItemTaxedPriceChangeBuilder of(final SetLineItemTaxedPriceC builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); builder.lineItemId = template.getLineItemId(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeImpl.java index e8ffaf21f1b..c94242909b6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeImpl.java @@ -34,6 +34,8 @@ public class SetLineItemTaxedPriceChangeImpl implements SetLineItemTaxedPriceCha private String lineItemId; + private String variant; + /** * create instance with all properties */ @@ -42,12 +44,13 @@ public class SetLineItemTaxedPriceChangeImpl implements SetLineItemTaxedPriceCha @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedItemPrice previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedItemPrice nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("lineItemId") final String lineItemId) { + @JsonProperty("lineItemId") final String lineItemId, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.lineItemId = lineItemId; + this.variant = variant; this.type = SET_LINE_ITEM_TAXED_PRICE_CHANGE; } @@ -106,6 +109,15 @@ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -126,6 +138,10 @@ public void setLineItemId(final String lineItemId) { this.lineItemId = lineItemId; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -142,12 +158,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(lineItemId, that.lineItemId) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(lineItemId, that.lineItemId) + .append(variant, that.variant) .isEquals(); } @@ -159,6 +177,7 @@ public int hashCode() { .append(nextValue) .append(lineItem) .append(lineItemId) + .append(variant) .toHashCode(); } @@ -170,6 +189,7 @@ public String toString() { .append("nextValue", nextValue) .append("lineItem", lineItem) .append("lineItemId", lineItemId) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChange.java index 631a6b99996..9f3cd09506f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChange.java @@ -29,6 +29,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) + * .lineItemId("{lineItemId}") + * .variant("{variant}") * .build() * * @@ -86,6 +88,23 @@ public interface SetLineItemTotalPriceChange extends Change { @JsonProperty("lineItem") public LocalizedString getLineItem(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -114,6 +133,21 @@ public interface SetLineItemTotalPriceChange extends Change { public void setLineItem(final LocalizedString lineItem); + /** + *

                                                                                                                        id of the updated LineItem.

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

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetLineItemTotalPriceChange @@ -133,6 +167,8 @@ public static SetLineItemTotalPriceChange of(final SetLineItemTotalPriceChange t instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); + instance.setLineItemId(template.getLineItemId()); + instance.setVariant(template.getVariant()); return instance; } @@ -153,6 +189,8 @@ public static SetLineItemTotalPriceChange deepCopy(@Nullable final SetLineItemTo instance.setPreviousValue(com.commercetools.history.models.common.Money.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.Money.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); + instance.setLineItemId(template.getLineItemId()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeBuilder.java index affb9881eba..749d22ac5e9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) + * .lineItemId("{lineItemId}") + * .variant("{variant}") * .build() * * @@ -33,6 +35,10 @@ public class SetLineItemTotalPriceChangeBuilder implements Builderid of the updated LineItem.

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

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @param variant value to be set + * @return Builder + */ + + public SetLineItemTotalPriceChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -187,6 +216,25 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { return this.lineItem; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetLineItemTotalPriceChange with checking for non-null required values * @return SetLineItemTotalPriceChange @@ -196,7 +244,9 @@ public SetLineItemTotalPriceChange build() { Objects.requireNonNull(previousValue, SetLineItemTotalPriceChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetLineItemTotalPriceChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetLineItemTotalPriceChange.class + ": lineItem is missing"); - return new SetLineItemTotalPriceChangeImpl(change, previousValue, nextValue, lineItem); + Objects.requireNonNull(lineItemId, SetLineItemTotalPriceChange.class + ": lineItemId is missing"); + Objects.requireNonNull(variant, SetLineItemTotalPriceChange.class + ": variant is missing"); + return new SetLineItemTotalPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId, variant); } /** @@ -204,7 +254,7 @@ public SetLineItemTotalPriceChange build() { * @return SetLineItemTotalPriceChange */ public SetLineItemTotalPriceChange buildUnchecked() { - return new SetLineItemTotalPriceChangeImpl(change, previousValue, nextValue, lineItem); + return new SetLineItemTotalPriceChangeImpl(change, previousValue, nextValue, lineItem, lineItemId, variant); } /** @@ -226,6 +276,8 @@ public static SetLineItemTotalPriceChangeBuilder of(final SetLineItemTotalPriceC builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); + builder.lineItemId = template.getLineItemId(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeImpl.java index efacc6c837c..44a2dd79082 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeImpl.java @@ -32,6 +32,10 @@ public class SetLineItemTotalPriceChangeImpl implements SetLineItemTotalPriceCha private com.commercetools.history.models.common.LocalizedString lineItem; + private String lineItemId; + + private String variant; + /** * create instance with all properties */ @@ -39,11 +43,14 @@ public class SetLineItemTotalPriceChangeImpl implements SetLineItemTotalPriceCha SetLineItemTotalPriceChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.Money previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.Money nextValue, - @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem) { + @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, + @JsonProperty("lineItemId") final String lineItemId, @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; + this.lineItemId = lineItemId; + this.variant = variant; this.type = SET_LINE_ITEM_TOTAL_PRICE_CHANGE; } @@ -94,6 +101,23 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { return this.lineItem; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -110,6 +134,14 @@ public void setLineItem(final com.commercetools.history.models.common.LocalizedS this.lineItem = lineItem; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -125,11 +157,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .append(variant, that.variant) .isEquals(); } @@ -140,6 +176,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(lineItem) + .append(lineItemId) + .append(variant) .toHashCode(); } @@ -150,6 +188,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("lineItem", lineItem) + .append("lineItemId", lineItemId) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChange.java new file mode 100644 index 00000000000..9754bb74c22 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChange.java @@ -0,0 +1,174 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set Inventory Limits update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetMaxCartQuantityChange setMaxCartQuantityChange = SetMaxCartQuantityChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(1)
                                                                                                                        + *             .nextValue(1)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetMaxCartQuantityChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetMaxCartQuantityChangeImpl.class) +public interface SetMaxCartQuantityChange extends Change { + + /** + * discriminator value for SetMaxCartQuantityChange + */ + String SET_MAX_CART_QUANTITY_CHANGE = "SetMaxCartQuantityChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public Integer 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 Integer previousValue); + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + */ + + public void setNextValue(final Integer nextValue); + + /** + * factory method + * @return instance of SetMaxCartQuantityChange + */ + public static SetMaxCartQuantityChange of() { + return new SetMaxCartQuantityChangeImpl(); + } + + /** + * factory method to create a shallow copy SetMaxCartQuantityChange + * @param template instance to be copied + * @return copy instance + */ + public static SetMaxCartQuantityChange of(final SetMaxCartQuantityChange template) { + SetMaxCartQuantityChangeImpl instance = new SetMaxCartQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetMaxCartQuantityChange copyDeep(); + + /** + * factory method to create a deep copy of SetMaxCartQuantityChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetMaxCartQuantityChange deepCopy(@Nullable final SetMaxCartQuantityChange template) { + if (template == null) { + return null; + } + SetMaxCartQuantityChangeImpl instance = new SetMaxCartQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetMaxCartQuantityChange + * @return builder + */ + public static SetMaxCartQuantityChangeBuilder builder() { + return SetMaxCartQuantityChangeBuilder.of(); + } + + /** + * create builder for SetMaxCartQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetMaxCartQuantityChangeBuilder builder(final SetMaxCartQuantityChange template) { + return SetMaxCartQuantityChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetMaxCartQuantityChange(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/SetMaxCartQuantityChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeBuilder.java new file mode 100644 index 00000000000..36fa44377d9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeBuilder.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; + +/** + * SetMaxCartQuantityChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetMaxCartQuantityChange setMaxCartQuantityChange = SetMaxCartQuantityChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(1)
                                                                                                                        + *             .nextValue(1)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetMaxCartQuantityChangeBuilder implements Builder { + + private String change; + + private Integer previousValue; + + private Integer nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetMaxCartQuantityChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + + public Integer getNextValue() { + return this.nextValue; + } + + /** + * builds SetMaxCartQuantityChange with checking for non-null required values + * @return SetMaxCartQuantityChange + */ + public SetMaxCartQuantityChange build() { + Objects.requireNonNull(change, SetMaxCartQuantityChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetMaxCartQuantityChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetMaxCartQuantityChange.class + ": nextValue is missing"); + return new SetMaxCartQuantityChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetMaxCartQuantityChange without checking for non-null required values + * @return SetMaxCartQuantityChange + */ + public SetMaxCartQuantityChange buildUnchecked() { + return new SetMaxCartQuantityChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetMaxCartQuantityChangeBuilder + * @return builder + */ + public static SetMaxCartQuantityChangeBuilder of() { + return new SetMaxCartQuantityChangeBuilder(); + } + + /** + * create builder for SetMaxCartQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetMaxCartQuantityChangeBuilder of(final SetMaxCartQuantityChange template) { + SetMaxCartQuantityChangeBuilder builder = new SetMaxCartQuantityChangeBuilder(); + 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/SetMaxCartQuantityChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeImpl.java new file mode 100644 index 00000000000..2fd5d10a967 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set Inventory Limits update action.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + */ + + public Integer getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final Integer previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final Integer nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetMaxCartQuantityChangeImpl that = (SetMaxCartQuantityChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetMaxCartQuantityChange copyDeep() { + return SetMaxCartQuantityChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChange.java index 600baa79b30..f66b632b343 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChange.java @@ -31,6 +31,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -79,6 +80,18 @@ public interface SetMetaDescriptionChange extends Change { @JsonProperty("nextValue") public LocalizedString getNextValue(); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -100,6 +113,17 @@ public interface SetMetaDescriptionChange extends Change { public void setNextValue(final LocalizedString nextValue); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of SetMetaDescriptionChange @@ -118,6 +142,7 @@ public static SetMetaDescriptionChange of(final SetMetaDescriptionChange templat instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -139,6 +164,7 @@ public static SetMetaDescriptionChange deepCopy(@Nullable final SetMetaDescripti com.commercetools.history.models.common.LocalizedString.deepCopy(template.getPreviousValue())); instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeBuilder.java index 211e20ef307..f28160c8df4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeBuilder.java @@ -17,6 +17,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -30,6 +31,8 @@ public class SetMetaDescriptionChangeBuilder implements BuilderProduct data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + * @return Builder + */ + + public SetMetaDescriptionChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; + return this; + } + /** * value of change} * @return change @@ -140,6 +158,19 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds SetMetaDescriptionChange with checking for non-null required values * @return SetMetaDescriptionChange @@ -148,7 +179,8 @@ public SetMetaDescriptionChange build() { Objects.requireNonNull(change, SetMetaDescriptionChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetMetaDescriptionChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetMetaDescriptionChange.class + ": nextValue is missing"); - return new SetMetaDescriptionChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, SetMetaDescriptionChange.class + ": catalogData is missing"); + return new SetMetaDescriptionChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -156,7 +188,7 @@ public SetMetaDescriptionChange build() { * @return SetMetaDescriptionChange */ public SetMetaDescriptionChange buildUnchecked() { - return new SetMetaDescriptionChangeImpl(change, previousValue, nextValue); + return new SetMetaDescriptionChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -177,6 +209,7 @@ public static SetMetaDescriptionChangeBuilder of(final SetMetaDescriptionChange builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeImpl.java index 64e9a36a8d5..0ca2e1f634d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeImpl.java @@ -34,16 +34,20 @@ public class SetMetaDescriptionChangeImpl implements SetMetaDescriptionChange, M private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * create instance with all properties */ @JsonCreator SetMetaDescriptionChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; this.type = SET_META_DESCRIPTION_CHANGE; } @@ -86,6 +90,18 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -98,6 +114,10 @@ public void setNextValue(final com.commercetools.history.models.common.Localized this.nextValue = nextValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -112,10 +132,12 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .isEquals(); } @@ -125,6 +147,7 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(catalogData) .toHashCode(); } @@ -134,6 +157,7 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChange.java index 6639a98194d..22424a9f31e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChange.java @@ -31,6 +31,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -79,6 +80,18 @@ public interface SetMetaKeywordsChange extends Change { @JsonProperty("nextValue") public LocalizedString getNextValue(); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -100,6 +113,17 @@ public interface SetMetaKeywordsChange extends Change { public void setNextValue(final LocalizedString nextValue); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of SetMetaKeywordsChange @@ -118,6 +142,7 @@ public static SetMetaKeywordsChange of(final SetMetaKeywordsChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -139,6 +164,7 @@ public static SetMetaKeywordsChange deepCopy(@Nullable final SetMetaKeywordsChan com.commercetools.history.models.common.LocalizedString.deepCopy(template.getPreviousValue())); instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeBuilder.java index 56520309df4..2890fccbbf9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeBuilder.java @@ -17,6 +17,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -30,6 +31,8 @@ public class SetMetaKeywordsChangeBuilder implements BuilderProduct data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + * @return Builder + */ + + public SetMetaKeywordsChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; + return this; + } + /** * value of change} * @return change @@ -140,6 +158,19 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds SetMetaKeywordsChange with checking for non-null required values * @return SetMetaKeywordsChange @@ -148,7 +179,8 @@ public SetMetaKeywordsChange build() { Objects.requireNonNull(change, SetMetaKeywordsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetMetaKeywordsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetMetaKeywordsChange.class + ": nextValue is missing"); - return new SetMetaKeywordsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, SetMetaKeywordsChange.class + ": catalogData is missing"); + return new SetMetaKeywordsChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -156,7 +188,7 @@ public SetMetaKeywordsChange build() { * @return SetMetaKeywordsChange */ public SetMetaKeywordsChange buildUnchecked() { - return new SetMetaKeywordsChangeImpl(change, previousValue, nextValue); + return new SetMetaKeywordsChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -177,6 +209,7 @@ public static SetMetaKeywordsChangeBuilder of(final SetMetaKeywordsChange templa builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeImpl.java index 005bee75727..debe35b3cd4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeImpl.java @@ -34,16 +34,20 @@ public class SetMetaKeywordsChangeImpl implements SetMetaKeywordsChange, ModelBa private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * create instance with all properties */ @JsonCreator SetMetaKeywordsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; this.type = SET_META_KEYWORDS_CHANGE; } @@ -86,6 +90,18 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -98,6 +114,10 @@ public void setNextValue(final com.commercetools.history.models.common.Localized this.nextValue = nextValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -112,10 +132,12 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .isEquals(); } @@ -125,6 +147,7 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(catalogData) .toHashCode(); } @@ -134,6 +157,7 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChange.java index 380c84d0230..ed1a15651a4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChange.java @@ -31,6 +31,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -79,6 +80,18 @@ public interface SetMetaTitleChange extends Change { @JsonProperty("nextValue") public LocalizedString getNextValue(); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + /** * set change * @param change value to be set @@ -100,6 +113,17 @@ public interface SetMetaTitleChange extends Change { public void setNextValue(final LocalizedString nextValue); + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + */ + + public void setCatalogData(final String catalogData); + /** * factory method * @return instance of SetMetaTitleChange @@ -118,6 +142,7 @@ public static SetMetaTitleChange of(final SetMetaTitleChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setCatalogData(template.getCatalogData()); return instance; } @@ -139,6 +164,7 @@ public static SetMetaTitleChange deepCopy(@Nullable final SetMetaTitleChange tem com.commercetools.history.models.common.LocalizedString.deepCopy(template.getPreviousValue())); instance.setNextValue( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getNextValue())); + instance.setCatalogData(template.getCatalogData()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeBuilder.java index 32908d04d06..4be181cf778 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeBuilder.java @@ -17,6 +17,7 @@ * .change("{change}") * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) + * .catalogData("{catalogData}") * .build() * * @@ -30,6 +31,8 @@ public class SetMetaTitleChangeBuilder implements Builder { private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * set the value to the change * @param change value to be set @@ -113,6 +116,21 @@ public SetMetaTitleChangeBuilder nextValue( return this; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @param catalogData value to be set + * @return Builder + */ + + public SetMetaTitleChangeBuilder catalogData(final String catalogData) { + this.catalogData = catalogData; + return this; + } + /** * value of change} * @return change @@ -140,6 +158,19 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + /** * builds SetMetaTitleChange with checking for non-null required values * @return SetMetaTitleChange @@ -148,7 +179,8 @@ public SetMetaTitleChange build() { Objects.requireNonNull(change, SetMetaTitleChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetMetaTitleChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetMetaTitleChange.class + ": nextValue is missing"); - return new SetMetaTitleChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(catalogData, SetMetaTitleChange.class + ": catalogData is missing"); + return new SetMetaTitleChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -156,7 +188,7 @@ public SetMetaTitleChange build() { * @return SetMetaTitleChange */ public SetMetaTitleChange buildUnchecked() { - return new SetMetaTitleChangeImpl(change, previousValue, nextValue); + return new SetMetaTitleChangeImpl(change, previousValue, nextValue, catalogData); } /** @@ -177,6 +209,7 @@ public static SetMetaTitleChangeBuilder of(final SetMetaTitleChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.catalogData = template.getCatalogData(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeImpl.java index c7ea4fec32d..22502baa650 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeImpl.java @@ -34,16 +34,20 @@ public class SetMetaTitleChangeImpl implements SetMetaTitleChange, ModelBase { private com.commercetools.history.models.common.LocalizedString nextValue; + private String catalogData; + /** * create instance with all properties */ @JsonCreator SetMetaTitleChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.LocalizedString previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue) { + @JsonProperty("nextValue") final com.commercetools.history.models.common.LocalizedString nextValue, + @JsonProperty("catalogData") final String catalogData) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.catalogData = catalogData; this.type = SET_META_TITLE_CHANGE; } @@ -86,6 +90,18 @@ public com.commercetools.history.models.common.LocalizedString getNextValue() { return this.nextValue; } + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + public void setChange(final String change) { this.change = change; } @@ -98,6 +114,10 @@ public void setNextValue(final com.commercetools.history.models.common.Localized this.nextValue = nextValue; } + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + @Override public boolean equals(Object o) { if (this == o) @@ -112,10 +132,12 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(catalogData, that.catalogData) .isEquals(); } @@ -125,6 +147,7 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(catalogData) .toHashCode(); } @@ -134,6 +157,7 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("catalogData", catalogData) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChange.java new file mode 100644 index 00000000000..619dbc7de59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChange.java @@ -0,0 +1,174 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set Inventory Limits update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetMinCartQuantityChange setMinCartQuantityChange = SetMinCartQuantityChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(1)
                                                                                                                        + *             .nextValue(1)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetMinCartQuantityChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetMinCartQuantityChangeImpl.class) +public interface SetMinCartQuantityChange extends Change { + + /** + * discriminator value for SetMinCartQuantityChange + */ + String SET_MIN_CART_QUANTITY_CHANGE = "SetMinCartQuantityChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public Integer 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 Integer previousValue); + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + */ + + public void setNextValue(final Integer nextValue); + + /** + * factory method + * @return instance of SetMinCartQuantityChange + */ + public static SetMinCartQuantityChange of() { + return new SetMinCartQuantityChangeImpl(); + } + + /** + * factory method to create a shallow copy SetMinCartQuantityChange + * @param template instance to be copied + * @return copy instance + */ + public static SetMinCartQuantityChange of(final SetMinCartQuantityChange template) { + SetMinCartQuantityChangeImpl instance = new SetMinCartQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetMinCartQuantityChange copyDeep(); + + /** + * factory method to create a deep copy of SetMinCartQuantityChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetMinCartQuantityChange deepCopy(@Nullable final SetMinCartQuantityChange template) { + if (template == null) { + return null; + } + SetMinCartQuantityChangeImpl instance = new SetMinCartQuantityChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetMinCartQuantityChange + * @return builder + */ + public static SetMinCartQuantityChangeBuilder builder() { + return SetMinCartQuantityChangeBuilder.of(); + } + + /** + * create builder for SetMinCartQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetMinCartQuantityChangeBuilder builder(final SetMinCartQuantityChange template) { + return SetMinCartQuantityChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetMinCartQuantityChange(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/SetMinCartQuantityChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeBuilder.java new file mode 100644 index 00000000000..837ef9de697 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeBuilder.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; + +/** + * SetMinCartQuantityChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetMinCartQuantityChange setMinCartQuantityChange = SetMinCartQuantityChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(1)
                                                                                                                        + *             .nextValue(1)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetMinCartQuantityChangeBuilder implements Builder { + + private String change; + + private Integer previousValue; + + private Integer nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetMinCartQuantityChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + + public Integer getNextValue() { + return this.nextValue; + } + + /** + * builds SetMinCartQuantityChange with checking for non-null required values + * @return SetMinCartQuantityChange + */ + public SetMinCartQuantityChange build() { + Objects.requireNonNull(change, SetMinCartQuantityChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetMinCartQuantityChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetMinCartQuantityChange.class + ": nextValue is missing"); + return new SetMinCartQuantityChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetMinCartQuantityChange without checking for non-null required values + * @return SetMinCartQuantityChange + */ + public SetMinCartQuantityChange buildUnchecked() { + return new SetMinCartQuantityChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetMinCartQuantityChangeBuilder + * @return builder + */ + public static SetMinCartQuantityChangeBuilder of() { + return new SetMinCartQuantityChangeBuilder(); + } + + /** + * create builder for SetMinCartQuantityChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetMinCartQuantityChangeBuilder of(final SetMinCartQuantityChange template) { + SetMinCartQuantityChangeBuilder builder = new SetMinCartQuantityChangeBuilder(); + 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/SetMinCartQuantityChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeImpl.java new file mode 100644 index 00000000000..97c128aada8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set Inventory Limits update action.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + */ + + public Integer getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final Integer previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final Integer nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetMinCartQuantityChangeImpl that = (SetMinCartQuantityChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetMinCartQuantityChange copyDeep() { + return SetMinCartQuantityChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChange.java index 12332d9a484..24357ed53f2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChange.java @@ -33,6 +33,7 @@ * .name("{name}") * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -105,13 +106,22 @@ public interface SetOrderLineItemCustomFieldChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -155,12 +165,20 @@ public interface SetOrderLineItemCustomFieldChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetOrderLineItemCustomFieldChange @@ -183,6 +201,7 @@ public static SetOrderLineItemCustomFieldChange of(final SetOrderLineItemCustomF instance.setName(template.getName()); instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -207,6 +226,7 @@ public static SetOrderLineItemCustomFieldChange deepCopy( instance.setName(template.getName()); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeBuilder.java index 6ab0ea346a6..0057966e7ee 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeBuilder.java @@ -19,6 +19,7 @@ * .name("{name}") * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -40,6 +41,8 @@ public class SetOrderLineItemCustomFieldChangeBuilder implements Buildersku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -142,6 +146,17 @@ public SetOrderLineItemCustomFieldChangeBuilder variant(final String variant) { return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetOrderLineItemCustomFieldChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -197,7 +212,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -205,6 +221,15 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetOrderLineItemCustomFieldChange with checking for non-null required values * @return SetOrderLineItemCustomFieldChange @@ -217,8 +242,9 @@ public SetOrderLineItemCustomFieldChange build() { Objects.requireNonNull(name, SetOrderLineItemCustomFieldChange.class + ": name is missing"); Objects.requireNonNull(lineItem, SetOrderLineItemCustomFieldChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetOrderLineItemCustomFieldChange.class + ": variant is missing"); + Objects.requireNonNull(lineItemId, SetOrderLineItemCustomFieldChange.class + ": lineItemId is missing"); return new SetOrderLineItemCustomFieldChangeImpl(change, previousValue, nextValue, customTypeId, name, lineItem, - variant); + variant, lineItemId); } /** @@ -227,7 +253,7 @@ public SetOrderLineItemCustomFieldChange build() { */ public SetOrderLineItemCustomFieldChange buildUnchecked() { return new SetOrderLineItemCustomFieldChangeImpl(change, previousValue, nextValue, customTypeId, name, lineItem, - variant); + variant, lineItemId); } /** @@ -252,6 +278,7 @@ public static SetOrderLineItemCustomFieldChangeBuilder of(final SetOrderLineItem builder.name = template.getName(); builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeImpl.java index c1661da6e37..b49572b750d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeImpl.java @@ -42,6 +42,8 @@ public class SetOrderLineItemCustomFieldChangeImpl implements SetOrderLineItemCu private String variant; + private String lineItemId; + /** * create instance with all properties */ @@ -51,7 +53,7 @@ public class SetOrderLineItemCustomFieldChangeImpl implements SetOrderLineItemCu @JsonProperty("nextValue") final java.lang.Object nextValue, @JsonProperty("customTypeId") final String customTypeId, @JsonProperty("name") final String name, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("variant") final String variant) { + @JsonProperty("variant") final String variant, @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; @@ -59,6 +61,7 @@ public class SetOrderLineItemCustomFieldChangeImpl implements SetOrderLineItemCu this.name = name; this.lineItem = lineItem; this.variant = variant; + this.lineItemId = lineItemId; this.type = SET_ORDER_LINE_ITEM_CUSTOM_FIELD_CHANGE; } @@ -126,13 +129,22 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -161,6 +173,10 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -179,6 +195,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) @@ -187,6 +204,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -200,6 +218,7 @@ public int hashCode() { .append(name) .append(lineItem) .append(variant) + .append(lineItemId) .toHashCode(); } @@ -213,6 +232,7 @@ public String toString() { .append("name", name) .append("lineItem", lineItem) .append("variant", variant) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChange.java index 2181f5a70bc..04afa9b56e1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChange.java @@ -34,6 +34,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -92,13 +93,22 @@ public interface SetOrderLineItemCustomTypeChange extends Change { public LocalizedString getLineItem(); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + /** * set change * @param change value to be set @@ -128,12 +138,20 @@ public interface SetOrderLineItemCustomTypeChange extends Change { public void setLineItem(final LocalizedString lineItem); /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + */ + + public void setLineItemId(final String lineItemId); + /** * factory method * @return instance of SetOrderLineItemCustomTypeChange @@ -154,6 +172,7 @@ public static SetOrderLineItemCustomTypeChange of(final SetOrderLineItemCustomTy instance.setNextValue(template.getNextValue()); instance.setLineItem(template.getLineItem()); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } @@ -176,6 +195,7 @@ public static SetOrderLineItemCustomTypeChange deepCopy(@Nullable final SetOrder instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); instance.setVariant(template.getVariant()); + instance.setLineItemId(template.getLineItemId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeBuilder.java index 0f3498d3230..34badb9a9fd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeBuilder.java @@ -19,6 +19,7 @@ * .nextValue(nextValueBuilder -> nextValueBuilder) * .lineItem(lineItemBuilder -> lineItemBuilder) * .variant("{variant}") + * .lineItemId("{lineItemId}") * .build() * * @@ -36,6 +37,8 @@ public class SetOrderLineItemCustomTypeChangeBuilder implements Buildersku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @param variant value to be set * @return Builder */ @@ -166,6 +170,17 @@ public SetOrderLineItemCustomTypeChangeBuilder variant(final String variant) { return this; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @param lineItemId value to be set + * @return Builder + */ + + public SetOrderLineItemCustomTypeChangeBuilder lineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + return this; + } + /** * value of change} * @return change @@ -203,7 +218,8 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        * @return variant */ @@ -211,6 +227,15 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + /** * builds SetOrderLineItemCustomTypeChange with checking for non-null required values * @return SetOrderLineItemCustomTypeChange @@ -221,7 +246,9 @@ public SetOrderLineItemCustomTypeChange build() { Objects.requireNonNull(nextValue, SetOrderLineItemCustomTypeChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItem, SetOrderLineItemCustomTypeChange.class + ": lineItem is missing"); Objects.requireNonNull(variant, SetOrderLineItemCustomTypeChange.class + ": variant is missing"); - return new SetOrderLineItemCustomTypeChangeImpl(change, previousValue, nextValue, lineItem, variant); + Objects.requireNonNull(lineItemId, SetOrderLineItemCustomTypeChange.class + ": lineItemId is missing"); + return new SetOrderLineItemCustomTypeChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -229,7 +256,8 @@ public SetOrderLineItemCustomTypeChange build() { * @return SetOrderLineItemCustomTypeChange */ public SetOrderLineItemCustomTypeChange buildUnchecked() { - return new SetOrderLineItemCustomTypeChangeImpl(change, previousValue, nextValue, lineItem, variant); + return new SetOrderLineItemCustomTypeChangeImpl(change, previousValue, nextValue, lineItem, variant, + lineItemId); } /** @@ -252,6 +280,7 @@ public static SetOrderLineItemCustomTypeChangeBuilder of(final SetOrderLineItemC builder.nextValue = template.getNextValue(); builder.lineItem = template.getLineItem(); builder.variant = template.getVariant(); + builder.lineItemId = template.getLineItemId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeImpl.java index a162d0bc419..0e7410c528e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeImpl.java @@ -38,6 +38,8 @@ public class SetOrderLineItemCustomTypeChangeImpl implements SetOrderLineItemCus private String variant; + private String lineItemId; + /** * create instance with all properties */ @@ -46,12 +48,13 @@ public class SetOrderLineItemCustomTypeChangeImpl implements SetOrderLineItemCus @JsonProperty("previousValue") final com.commercetools.history.models.common.CustomFields previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue, @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, - @JsonProperty("variant") final String variant) { + @JsonProperty("variant") final String variant, @JsonProperty("lineItemId") final String lineItemId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItem = lineItem; this.variant = variant; + this.lineItemId = lineItemId; this.type = SET_ORDER_LINE_ITEM_CUSTOM_TYPE_CHANGE; } @@ -103,13 +106,22 @@ public com.commercetools.history.models.common.LocalizedString getLineItem() { } /** - *

                                                                                                                        sku or key of the ProductVariant.

                                                                                                                        + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                        id of the updated LineItem.

                                                                                                                        + */ + + public String getLineItemId() { + return this.lineItemId; + } + public void setChange(final String change) { this.change = change; } @@ -130,6 +142,10 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -146,12 +162,14 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItem, that.lineItem) .append(variant, that.variant) + .append(lineItemId, that.lineItemId) .isEquals(); } @@ -163,6 +181,7 @@ public int hashCode() { .append(nextValue) .append(lineItem) .append(variant) + .append(lineItemId) .toHashCode(); } @@ -174,6 +193,7 @@ public String toString() { .append("nextValue", nextValue) .append("lineItem", lineItem) .append("variant", variant) + .append("lineItemId", lineItemId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChange.java index eff711c4f95..43a7960c3a1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChange.java @@ -8,7 +8,7 @@ import javax.annotation.Nullable; import com.commercetools.history.models.common.TaxMode; -import com.commercetools.history.models.common.TaxedItemPrice; +import com.commercetools.history.models.common.TaxedPrice; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -66,7 +66,7 @@ public interface SetOrderTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public TaxedItemPrice getPreviousValue(); + public TaxedPrice getPreviousValue(); /** *

                                                                                                                        Value after the change.

                                                                                                                        @@ -75,10 +75,10 @@ public interface SetOrderTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public TaxedItemPrice getNextValue(); + public TaxedPrice getNextValue(); /** - * + *

                                                                                                                        Indicates how taxes are set on the Cart.

                                                                                                                        * @return taxMode */ @NotNull @@ -97,17 +97,17 @@ public interface SetOrderTaxedPriceChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final TaxedItemPrice previousValue); + public void setPreviousValue(final TaxedPrice previousValue); /** *

                                                                                                                        Value after the change.

                                                                                                                        * @param nextValue value to be set */ - public void setNextValue(final TaxedItemPrice nextValue); + public void setNextValue(final TaxedPrice nextValue); /** - * set taxMode + *

                                                                                                                        Indicates how taxes are set on the Cart.

                                                                                                                        * @param taxMode value to be set */ @@ -150,8 +150,8 @@ public static SetOrderTaxedPriceChange deepCopy(@Nullable final SetOrderTaxedPri SetOrderTaxedPriceChangeImpl instance = new SetOrderTaxedPriceChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.TaxedPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.TaxedPrice.deepCopy(template.getNextValue())); instance.setTaxMode(template.getTaxMode()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeBuilder.java index a7dbc51b794..987811bcbfa 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeBuilder.java @@ -27,9 +27,9 @@ public class SetOrderTaxedPriceChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()).build(); return this; } @@ -63,8 +63,8 @@ public SetOrderTaxedPriceChangeBuilder previousValue( */ public SetOrderTaxedPriceChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()); return this; } @@ -75,7 +75,7 @@ public SetOrderTaxedPriceChangeBuilder withPreviousValue( */ public SetOrderTaxedPriceChangeBuilder previousValue( - final com.commercetools.history.models.common.TaxedItemPrice previousValue) { + final com.commercetools.history.models.common.TaxedPrice previousValue) { this.previousValue = previousValue; return this; } @@ -87,8 +87,8 @@ public SetOrderTaxedPriceChangeBuilder previousValue( */ public SetOrderTaxedPriceChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()).build(); return this; } @@ -99,8 +99,8 @@ public SetOrderTaxedPriceChangeBuilder nextValue( */ public SetOrderTaxedPriceChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()); return this; } @@ -111,13 +111,13 @@ public SetOrderTaxedPriceChangeBuilder withNextValue( */ public SetOrderTaxedPriceChangeBuilder nextValue( - final com.commercetools.history.models.common.TaxedItemPrice nextValue) { + final com.commercetools.history.models.common.TaxedPrice nextValue) { this.nextValue = nextValue; return this; } /** - * set the value to the taxMode + *

                                                                                                                        Indicates how taxes are set on the Cart.

                                                                                                                        * @param taxMode value to be set * @return Builder */ @@ -141,7 +141,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { + public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { return this.previousValue; } @@ -150,12 +150,12 @@ public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() * @return nextValue */ - public com.commercetools.history.models.common.TaxedItemPrice getNextValue() { + public com.commercetools.history.models.common.TaxedPrice getNextValue() { return this.nextValue; } /** - * value of taxMode} + *

                                                                                                                        Indicates how taxes are set on the Cart.

                                                                                                                        * @return taxMode */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeImpl.java index 7ba0e86992f..09f119ac604 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeImpl.java @@ -26,9 +26,9 @@ public class SetOrderTaxedPriceChangeImpl implements SetOrderTaxedPriceChange, M private String change; - private com.commercetools.history.models.common.TaxedItemPrice previousValue; + private com.commercetools.history.models.common.TaxedPrice previousValue; - private com.commercetools.history.models.common.TaxedItemPrice nextValue; + private com.commercetools.history.models.common.TaxedPrice nextValue; private com.commercetools.history.models.common.TaxMode taxMode; @@ -37,8 +37,8 @@ public class SetOrderTaxedPriceChangeImpl implements SetOrderTaxedPriceChange, M */ @JsonCreator SetOrderTaxedPriceChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedItemPrice previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedItemPrice nextValue, + @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedPrice previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedPrice nextValue, @JsonProperty("taxMode") final com.commercetools.history.models.common.TaxMode taxMode) { this.change = change; this.previousValue = previousValue; @@ -74,7 +74,7 @@ public String getChange() { *

                                                                                                                        Value before the change.

                                                                                                                        */ - public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { + public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { return this.previousValue; } @@ -82,12 +82,12 @@ public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() *

                                                                                                                        Value after the change.

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

                                                                                                                        Indicates how taxes are set on the Cart.

                                                                                                                        */ public com.commercetools.history.models.common.TaxMode getTaxMode() { @@ -98,11 +98,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.TaxedItemPrice previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.TaxedPrice previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.TaxedItemPrice nextValue) { + public void setNextValue(final com.commercetools.history.models.common.TaxedPrice nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChange.java new file mode 100644 index 00000000000..351a4f0a48e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChange.java @@ -0,0 +1,230 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.change_value.ParcelChangeValue; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set Parcel CustomField update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetParcelCustomFieldChange setParcelCustomFieldChange = SetParcelCustomFieldChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .parcel(parcelBuilder -> parcelBuilder)
                                                                                                                        + *             .customTypeId("{customTypeId}")
                                                                                                                        + *             .name("{name}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetParcelCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetParcelCustomFieldChangeImpl.class) +public interface SetParcelCustomFieldChange extends Change { + + /** + * discriminator value for SetParcelCustomFieldChange + */ + String SET_PARCEL_CUSTOM_FIELD_CHANGE = "SetParcelCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @return parcel + */ + @NotNull + @Valid + @JsonProperty("parcel") + public ParcelChangeValue getParcel(); + + /** + *

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        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); + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param parcel value to be set + */ + + public void setParcel(final ParcelChangeValue parcel); + + /** + *

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        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 SetParcelCustomFieldChange + */ + public static SetParcelCustomFieldChange of() { + return new SetParcelCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetParcelCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetParcelCustomFieldChange of(final SetParcelCustomFieldChange template) { + SetParcelCustomFieldChangeImpl instance = new SetParcelCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setParcel(template.getParcel()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setName(template.getName()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetParcelCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetParcelCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetParcelCustomFieldChange deepCopy(@Nullable final SetParcelCustomFieldChange template) { + if (template == null) { + return null; + } + SetParcelCustomFieldChangeImpl instance = new SetParcelCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setParcel( + com.commercetools.history.models.change_value.ParcelChangeValue.deepCopy(template.getParcel())); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setName(template.getName()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetParcelCustomFieldChange + * @return builder + */ + public static SetParcelCustomFieldChangeBuilder builder() { + return SetParcelCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetParcelCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetParcelCustomFieldChangeBuilder builder(final SetParcelCustomFieldChange template) { + return SetParcelCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetParcelCustomFieldChange(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/SetParcelCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..63cddd1c9dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeBuilder.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; + +/** + * SetParcelCustomFieldChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetParcelCustomFieldChange setParcelCustomFieldChange = SetParcelCustomFieldChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .parcel(parcelBuilder -> parcelBuilder)
                                                                                                                        + *             .customTypeId("{customTypeId}")
                                                                                                                        + *             .name("{name}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetParcelCustomFieldChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.ParcelChangeValue parcel; + + private String customTypeId; + + private String name; + + 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 SetParcelCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param builder function to build the parcel value + * @return Builder + */ + + public SetParcelCustomFieldChangeBuilder parcel( + Function builder) { + this.parcel = builder.apply(com.commercetools.history.models.change_value.ParcelChangeValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param builder function to build the parcel value + * @return Builder + */ + + public SetParcelCustomFieldChangeBuilder withParcel( + Function builder) { + this.parcel = builder.apply(com.commercetools.history.models.change_value.ParcelChangeValueBuilder.of()); + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param parcel value to be set + * @return Builder + */ + + public SetParcelCustomFieldChangeBuilder parcel( + final com.commercetools.history.models.change_value.ParcelChangeValue parcel) { + this.parcel = parcel; + return this; + } + + /** + *

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @return parcel + */ + + public com.commercetools.history.models.change_value.ParcelChangeValue getParcel() { + return this.parcel; + } + + /** + *

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        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 SetParcelCustomFieldChange with checking for non-null required values + * @return SetParcelCustomFieldChange + */ + public SetParcelCustomFieldChange build() { + Objects.requireNonNull(change, SetParcelCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(parcel, SetParcelCustomFieldChange.class + ": parcel is missing"); + Objects.requireNonNull(customTypeId, SetParcelCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(name, SetParcelCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(previousValue, SetParcelCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetParcelCustomFieldChange.class + ": nextValue is missing"); + return new SetParcelCustomFieldChangeImpl(change, parcel, customTypeId, name, previousValue, nextValue); + } + + /** + * builds SetParcelCustomFieldChange without checking for non-null required values + * @return SetParcelCustomFieldChange + */ + public SetParcelCustomFieldChange buildUnchecked() { + return new SetParcelCustomFieldChangeImpl(change, parcel, customTypeId, name, previousValue, nextValue); + } + + /** + * factory method for an instance of SetParcelCustomFieldChangeBuilder + * @return builder + */ + public static SetParcelCustomFieldChangeBuilder of() { + return new SetParcelCustomFieldChangeBuilder(); + } + + /** + * create builder for SetParcelCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetParcelCustomFieldChangeBuilder of(final SetParcelCustomFieldChange template) { + SetParcelCustomFieldChangeBuilder builder = new SetParcelCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.parcel = template.getParcel(); + builder.customTypeId = template.getCustomTypeId(); + builder.name = template.getName(); + 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/SetParcelCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeImpl.java new file mode 100644 index 00000000000..2b64adcaa95 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeImpl.java @@ -0,0 +1,199 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set Parcel CustomField update action.

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

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + */ + + public com.commercetools.history.models.change_value.ParcelChangeValue getParcel() { + return this.parcel; + } + + /** + *

                                                                                                                        id of the referenced Type.

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

                                                                                                                        Name of the Custom Field.

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

                                                                                                                        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 setParcel(final com.commercetools.history.models.change_value.ParcelChangeValue parcel) { + this.parcel = parcel; + } + + public void setCustomTypeId(final String customTypeId) { + this.customTypeId = customTypeId; + } + + public void setName(final String name) { + this.name = name; + } + + 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; + + SetParcelCustomFieldChangeImpl that = (SetParcelCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(parcel, that.parcel) + .append(customTypeId, that.customTypeId) + .append(name, that.name) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(parcel, that.parcel) + .append(customTypeId, that.customTypeId) + .append(name, that.name) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(parcel) + .append(customTypeId) + .append(name) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("parcel", parcel) + .append("customTypeId", customTypeId) + .append("name", name) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetParcelCustomFieldChange copyDeep() { + return SetParcelCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChange.java new file mode 100644 index 00000000000..b9ed1ad5072 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChange.java @@ -0,0 +1,200 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.change_value.ParcelChangeValue; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set Parcel Custom Type update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetParcelCustomTypeChange setParcelCustomTypeChange = SetParcelCustomTypeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .parcel(parcelBuilder -> parcelBuilder)
                                                                                                                        + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetParcelCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetParcelCustomTypeChangeImpl.class) +public interface SetParcelCustomTypeChange extends Change { + + /** + * discriminator value for SetParcelCustomTypeChange + */ + String SET_PARCEL_CUSTOM_TYPE_CHANGE = "SetParcelCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @return parcel + */ + @NotNull + @Valid + @JsonProperty("parcel") + public ParcelChangeValue getParcel(); + + /** + *

                                                                                                                        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); + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param parcel value to be set + */ + + public void setParcel(final ParcelChangeValue parcel); + + /** + *

                                                                                                                        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 SetParcelCustomTypeChange + */ + public static SetParcelCustomTypeChange of() { + return new SetParcelCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetParcelCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetParcelCustomTypeChange of(final SetParcelCustomTypeChange template) { + SetParcelCustomTypeChangeImpl instance = new SetParcelCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setParcel(template.getParcel()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetParcelCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetParcelCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetParcelCustomTypeChange deepCopy(@Nullable final SetParcelCustomTypeChange template) { + if (template == null) { + return null; + } + SetParcelCustomTypeChangeImpl instance = new SetParcelCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setParcel( + com.commercetools.history.models.change_value.ParcelChangeValue.deepCopy(template.getParcel())); + 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 SetParcelCustomTypeChange + * @return builder + */ + public static SetParcelCustomTypeChangeBuilder builder() { + return SetParcelCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetParcelCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetParcelCustomTypeChangeBuilder builder(final SetParcelCustomTypeChange template) { + return SetParcelCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetParcelCustomTypeChange(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/SetParcelCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..e470e7c5810 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeBuilder.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; + +/** + * SetParcelCustomTypeChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetParcelCustomTypeChange setParcelCustomTypeChange = SetParcelCustomTypeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .parcel(parcelBuilder -> parcelBuilder)
                                                                                                                        + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                        + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetParcelCustomTypeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.ParcelChangeValue parcel; + + 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 SetParcelCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param builder function to build the parcel value + * @return Builder + */ + + public SetParcelCustomTypeChangeBuilder parcel( + Function builder) { + this.parcel = builder.apply(com.commercetools.history.models.change_value.ParcelChangeValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param builder function to build the parcel value + * @return Builder + */ + + public SetParcelCustomTypeChangeBuilder withParcel( + Function builder) { + this.parcel = builder.apply(com.commercetools.history.models.change_value.ParcelChangeValueBuilder.of()); + return this; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @param parcel value to be set + * @return Builder + */ + + public SetParcelCustomTypeChangeBuilder parcel( + final com.commercetools.history.models.change_value.ParcelChangeValue parcel) { + this.parcel = parcel; + return this; + } + + /** + *

                                                                                                                        Value before the change.

                                                                                                                        + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetParcelCustomTypeChangeBuilder 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 SetParcelCustomTypeChangeBuilder 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 SetParcelCustomTypeChangeBuilder 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 SetParcelCustomTypeChangeBuilder 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 SetParcelCustomTypeChangeBuilder 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 SetParcelCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + * @return parcel + */ + + public com.commercetools.history.models.change_value.ParcelChangeValue getParcel() { + return this.parcel; + } + + /** + *

                                                                                                                        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 SetParcelCustomTypeChange with checking for non-null required values + * @return SetParcelCustomTypeChange + */ + public SetParcelCustomTypeChange build() { + Objects.requireNonNull(change, SetParcelCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(parcel, SetParcelCustomTypeChange.class + ": parcel is missing"); + Objects.requireNonNull(previousValue, SetParcelCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetParcelCustomTypeChange.class + ": nextValue is missing"); + return new SetParcelCustomTypeChangeImpl(change, parcel, previousValue, nextValue); + } + + /** + * builds SetParcelCustomTypeChange without checking for non-null required values + * @return SetParcelCustomTypeChange + */ + public SetParcelCustomTypeChange buildUnchecked() { + return new SetParcelCustomTypeChangeImpl(change, parcel, previousValue, nextValue); + } + + /** + * factory method for an instance of SetParcelCustomTypeChangeBuilder + * @return builder + */ + public static SetParcelCustomTypeChangeBuilder of() { + return new SetParcelCustomTypeChangeBuilder(); + } + + /** + * create builder for SetParcelCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetParcelCustomTypeChangeBuilder of(final SetParcelCustomTypeChange template) { + SetParcelCustomTypeChangeBuilder builder = new SetParcelCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.parcel = template.getParcel(); + 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/SetParcelCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeImpl.java new file mode 100644 index 00000000000..50b4654b266 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set Parcel Custom Type update action.

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

                                                                                                                        Information about the updated Parcel.

                                                                                                                        + */ + + public com.commercetools.history.models.change_value.ParcelChangeValue getParcel() { + return this.parcel; + } + + /** + *

                                                                                                                        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 setParcel(final com.commercetools.history.models.change_value.ParcelChangeValue parcel) { + this.parcel = parcel; + } + + 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; + + SetParcelCustomTypeChangeImpl that = (SetParcelCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(parcel, that.parcel) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(parcel, that.parcel) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(parcel) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("parcel", parcel) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetParcelCustomTypeChange copyDeep() { + return SetParcelCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChange.java new file mode 100644 index 00000000000..029faef2f88 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChange.java @@ -0,0 +1,138 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Change password of Customer or Change password of Customer in Store request.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPasswordChange setPasswordChange = SetPasswordChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetPasswordChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPasswordChangeImpl.class) +public interface SetPasswordChange extends Change { + + /** + * discriminator value for SetPasswordChange + */ + String SET_PASSWORD_CHANGE = "SetPasswordChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set change + * @param change value to be set + */ + + public void setChange(final String change); + + /** + * factory method + * @return instance of SetPasswordChange + */ + public static SetPasswordChange of() { + return new SetPasswordChangeImpl(); + } + + /** + * factory method to create a shallow copy SetPasswordChange + * @param template instance to be copied + * @return copy instance + */ + public static SetPasswordChange of(final SetPasswordChange template) { + SetPasswordChangeImpl instance = new SetPasswordChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + public SetPasswordChange copyDeep(); + + /** + * factory method to create a deep copy of SetPasswordChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPasswordChange deepCopy(@Nullable final SetPasswordChange template) { + if (template == null) { + return null; + } + SetPasswordChangeImpl instance = new SetPasswordChangeImpl(); + instance.setChange(template.getChange()); + return instance; + } + + /** + * builder factory method for SetPasswordChange + * @return builder + */ + public static SetPasswordChangeBuilder builder() { + return SetPasswordChangeBuilder.of(); + } + + /** + * create builder for SetPasswordChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPasswordChangeBuilder builder(final SetPasswordChange template) { + return SetPasswordChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPasswordChange(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/SetPasswordChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChangeBuilder.java new file mode 100644 index 00000000000..3b5b267a6b4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChangeBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetPasswordChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPasswordChange setPasswordChange = SetPasswordChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPasswordChangeBuilder implements Builder { + + private String change; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetPasswordChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + * value of change} + * @return change + */ + + public String getChange() { + return this.change; + } + + /** + * builds SetPasswordChange with checking for non-null required values + * @return SetPasswordChange + */ + public SetPasswordChange build() { + Objects.requireNonNull(change, SetPasswordChange.class + ": change is missing"); + return new SetPasswordChangeImpl(change); + } + + /** + * builds SetPasswordChange without checking for non-null required values + * @return SetPasswordChange + */ + public SetPasswordChange buildUnchecked() { + return new SetPasswordChangeImpl(change); + } + + /** + * factory method for an instance of SetPasswordChangeBuilder + * @return builder + */ + public static SetPasswordChangeBuilder of() { + return new SetPasswordChangeBuilder(); + } + + /** + * create builder for SetPasswordChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPasswordChangeBuilder of(final SetPasswordChange template) { + SetPasswordChangeBuilder builder = new SetPasswordChangeBuilder(); + builder.change = template.getChange(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChangeImpl.java new file mode 100644 index 00000000000..e5a1c8fd4d1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPasswordChangeImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Change password of Customer or Change password of Customer in Store request.

                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPasswordChangeImpl implements SetPasswordChange, ModelBase { + + private String type; + + private String change; + + /** + * create instance with all properties + */ + @JsonCreator + SetPasswordChangeImpl(@JsonProperty("change") final String change) { + this.change = change; + this.type = SET_PASSWORD_CHANGE; + } + + /** + * create empty instance + */ + public SetPasswordChangeImpl() { + this.type = SET_PASSWORD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + public void setChange(final String change) { + this.change = change; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetPasswordChangeImpl that = (SetPasswordChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(type, that.type) + .append(change, that.change) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(change).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .build(); + } + + @Override + public SetPasswordChange copyDeep() { + return SetPasswordChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChange.java index bf0fe048577..dee446adf75 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChange.java @@ -26,6 +26,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -72,6 +74,22 @@ public interface SetPermissionsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + @NotNull + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + @NotNull + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -109,6 +127,36 @@ public interface SetPermissionsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Permission... addedItems); + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Permission... removedItems); + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetPermissionsChange @@ -127,6 +175,8 @@ public static SetPermissionsChange of(final SetPermissionsChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -146,6 +196,8 @@ public static SetPermissionsChange deepCopy(@Nullable final SetPermissionsChange instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()).map(ArrayList::new).orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeBuilder.java index 7c846496d7f..d8fda61d6de 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeBuilder.java @@ -16,6 +16,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -29,6 +31,10 @@ public class SetPermissionsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -118,6 +124,84 @@ public SetPermissionsChangeBuilder plusNextValue( return this; } + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder addedItems( + final com.commercetools.history.models.common.Permission... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @param addedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Permission... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder removedItems( + final com.commercetools.history.models.common.Permission... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @param removedItems value to be set + * @return Builder + */ + + public SetPermissionsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Permission... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + /** * value of change} * @return change @@ -145,6 +229,24 @@ public java.util.List getNex return this.nextValue; } + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetPermissionsChange with checking for non-null required values * @return SetPermissionsChange @@ -153,7 +255,9 @@ public SetPermissionsChange build() { Objects.requireNonNull(change, SetPermissionsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetPermissionsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetPermissionsChange.class + ": nextValue is missing"); - return new SetPermissionsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetPermissionsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetPermissionsChange.class + ": removedItems is missing"); + return new SetPermissionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -161,7 +265,7 @@ public SetPermissionsChange build() { * @return SetPermissionsChange */ public SetPermissionsChange buildUnchecked() { - return new SetPermissionsChangeImpl(change, previousValue, nextValue); + return new SetPermissionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -182,6 +286,8 @@ public static SetPermissionsChangeBuilder of(final SetPermissionsChange template builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeImpl.java index 5eb0a371c1d..d62c295cf51 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPermissionsChangeImpl.java @@ -30,16 +30,24 @@ public class SetPermissionsChangeImpl implements SetPermissionsChange, ModelBase private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetPermissionsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_PERMISSIONS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNex return this.nextValue; } + /** + *

                                                                                                                        Elements added to the array.

                                                                                                                        + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                        Elements removed from the array.

                                                                                                                        + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,22 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Permission... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +157,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +174,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +185,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChange.java new file mode 100644 index 00000000000..6b29b966299 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChange.java @@ -0,0 +1,238 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set Price Key update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPriceKeyChange setPriceKeyChange = SetPriceKeyChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .catalogData("{catalogData}")
                                                                                                                        + *             .variant("{variant}")
                                                                                                                        + *             .priceId("{priceId}")
                                                                                                                        + *             .previousValue("{previousValue}")
                                                                                                                        + *             .nextValue("{nextValue}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetPriceKeyChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPriceKeyChangeImpl.class) +public interface SetPriceKeyChange extends Change { + + /** + * discriminator value for SetPriceKeyChange + */ + String SET_PRICE_KEY_CHANGE = "SetPriceKeyChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + + /** + *

                                                                                                                        id of the Embedded Price.

                                                                                                                        + * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

                                                                                                                        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); + + /** + *

                                                                                                                        Product data that was updated.

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

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the Embedded Price.

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

                                                                                                                        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 SetPriceKeyChange + */ + public static SetPriceKeyChange of() { + return new SetPriceKeyChangeImpl(); + } + + /** + * factory method to create a shallow copy SetPriceKeyChange + * @param template instance to be copied + * @return copy instance + */ + public static SetPriceKeyChange of(final SetPriceKeyChange template) { + SetPriceKeyChangeImpl instance = new SetPriceKeyChangeImpl(); + instance.setChange(template.getChange()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetPriceKeyChange copyDeep(); + + /** + * factory method to create a deep copy of SetPriceKeyChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPriceKeyChange deepCopy(@Nullable final SetPriceKeyChange template) { + if (template == null) { + return null; + } + SetPriceKeyChangeImpl instance = new SetPriceKeyChangeImpl(); + instance.setChange(template.getChange()); + instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetPriceKeyChange + * @return builder + */ + public static SetPriceKeyChangeBuilder builder() { + return SetPriceKeyChangeBuilder.of(); + } + + /** + * create builder for SetPriceKeyChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPriceKeyChangeBuilder builder(final SetPriceKeyChange template) { + return SetPriceKeyChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPriceKeyChange(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/SetPriceKeyChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeBuilder.java new file mode 100644 index 00000000000..c3e26cebbb9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeBuilder.java @@ -0,0 +1,217 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetPriceKeyChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPriceKeyChange setPriceKeyChange = SetPriceKeyChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .catalogData("{catalogData}")
                                                                                                                        + *             .variant("{variant}")
                                                                                                                        + *             .priceId("{priceId}")
                                                                                                                        + *             .previousValue("{previousValue}")
                                                                                                                        + *             .nextValue("{nextValue}")
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPriceKeyChangeBuilder implements Builder { + + private String change; + + private String catalogData; + + private String variant; + + private String priceId; + + private String previousValue; + + private String nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetPriceKeyChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Product data that was updated.

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

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                        id of the Embedded Price.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

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

                                                                                                                        Product data that was updated.

                                                                                                                        + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + * @return variant + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                        id of the Embedded Price.

                                                                                                                        + * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

                                                                                                                        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 SetPriceKeyChange with checking for non-null required values + * @return SetPriceKeyChange + */ + public SetPriceKeyChange build() { + Objects.requireNonNull(change, SetPriceKeyChange.class + ": change is missing"); + Objects.requireNonNull(catalogData, SetPriceKeyChange.class + ": catalogData is missing"); + Objects.requireNonNull(variant, SetPriceKeyChange.class + ": variant is missing"); + Objects.requireNonNull(priceId, SetPriceKeyChange.class + ": priceId is missing"); + Objects.requireNonNull(previousValue, SetPriceKeyChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetPriceKeyChange.class + ": nextValue is missing"); + return new SetPriceKeyChangeImpl(change, catalogData, variant, priceId, previousValue, nextValue); + } + + /** + * builds SetPriceKeyChange without checking for non-null required values + * @return SetPriceKeyChange + */ + public SetPriceKeyChange buildUnchecked() { + return new SetPriceKeyChangeImpl(change, catalogData, variant, priceId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetPriceKeyChangeBuilder + * @return builder + */ + public static SetPriceKeyChangeBuilder of() { + return new SetPriceKeyChangeBuilder(); + } + + /** + * create builder for SetPriceKeyChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPriceKeyChangeBuilder of(final SetPriceKeyChange template) { + SetPriceKeyChangeBuilder builder = new SetPriceKeyChangeBuilder(); + builder.change = template.getChange(); + builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); + builder.priceId = template.getPriceId(); + 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/SetPriceKeyChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeImpl.java new file mode 100644 index 00000000000..376c89c224e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeImpl.java @@ -0,0 +1,203 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set Price Key update action.

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

                                                                                                                        Product data that was updated.

                                                                                                                        + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                        + *

                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                        + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                        id of the Embedded Price.

                                                                                                                        + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

                                                                                                                        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 setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setVariant(final String variant) { + this.variant = variant; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + 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; + + SetPriceKeyChangeImpl that = (SetPriceKeyChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(catalogData) + .append(variant) + .append(priceId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("catalogData", catalogData) + .append("variant", variant) + .append("priceId", priceId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetPriceKeyChange copyDeep() { + return SetPriceKeyChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChange.java new file mode 100644 index 00000000000..237530c98e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChange.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 com.commercetools.history.models.common.ProductPriceModeEnum; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                        Change triggered by the Set PriceMode update action.

                                                                                                                        + * + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPriceModeChange setPriceModeChange = SetPriceModeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(ProductPriceModeEnum.EMBEDDED)
                                                                                                                        + *             .nextValue(ProductPriceModeEnum.EMBEDDED)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetPriceModeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetPriceModeChangeImpl.class) +public interface SetPriceModeChange extends Change { + + /** + * discriminator value for SetPriceModeChange + */ + String SET_PRICE_MODE_CHANGE = "SetPriceModeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + @NotNull + @JsonProperty("nextValue") + public ProductPriceModeEnum 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 ProductPriceModeEnum previousValue); + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + */ + + public void setNextValue(final ProductPriceModeEnum nextValue); + + /** + * factory method + * @return instance of SetPriceModeChange + */ + public static SetPriceModeChange of() { + return new SetPriceModeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetPriceModeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetPriceModeChange of(final SetPriceModeChange template) { + SetPriceModeChangeImpl instance = new SetPriceModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetPriceModeChange copyDeep(); + + /** + * factory method to create a deep copy of SetPriceModeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetPriceModeChange deepCopy(@Nullable final SetPriceModeChange template) { + if (template == null) { + return null; + } + SetPriceModeChangeImpl instance = new SetPriceModeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetPriceModeChange + * @return builder + */ + public static SetPriceModeChangeBuilder builder() { + return SetPriceModeChangeBuilder.of(); + } + + /** + * create builder for SetPriceModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPriceModeChangeBuilder builder(final SetPriceModeChange template) { + return SetPriceModeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetPriceModeChange(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/SetPriceModeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChangeBuilder.java new file mode 100644 index 00000000000..d31669d1c59 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChangeBuilder.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; + +/** + * SetPriceModeChangeBuilder + *
                                                                                                                        + * Example to create an instance using the builder pattern + *
                                                                                                                        + *
                                                                                                                        
                                                                                                                        + *     SetPriceModeChange setPriceModeChange = SetPriceModeChange.builder()
                                                                                                                        + *             .change("{change}")
                                                                                                                        + *             .previousValue(ProductPriceModeEnum.EMBEDDED)
                                                                                                                        + *             .nextValue(ProductPriceModeEnum.EMBEDDED)
                                                                                                                        + *             .build()
                                                                                                                        + * 
                                                                                                                        + *
                                                                                                                        + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetPriceModeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ProductPriceModeEnum previousValue; + + private com.commercetools.history.models.common.ProductPriceModeEnum nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetPriceModeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + * @param nextValue value to be set + * @return Builder + */ + + public SetPriceModeChangeBuilder nextValue( + final com.commercetools.history.models.common.ProductPriceModeEnum 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.ProductPriceModeEnum getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                                        Value after the change.

                                                                                                                        + * @return nextValue + */ + + public com.commercetools.history.models.common.ProductPriceModeEnum getNextValue() { + return this.nextValue; + } + + /** + * builds SetPriceModeChange with checking for non-null required values + * @return SetPriceModeChange + */ + public SetPriceModeChange build() { + Objects.requireNonNull(change, SetPriceModeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetPriceModeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetPriceModeChange.class + ": nextValue is missing"); + return new SetPriceModeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetPriceModeChange without checking for non-null required values + * @return SetPriceModeChange + */ + public SetPriceModeChange buildUnchecked() { + return new SetPriceModeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetPriceModeChangeBuilder + * @return builder + */ + public static SetPriceModeChangeBuilder of() { + return new SetPriceModeChangeBuilder(); + } + + /** + * create builder for SetPriceModeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetPriceModeChangeBuilder of(final SetPriceModeChange template) { + SetPriceModeChangeBuilder builder = new SetPriceModeChangeBuilder(); + 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/SetPriceModeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChangeImpl.java new file mode 100644 index 00000000000..e0aacbc1dc8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPriceModeChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                        Change triggered by the Set PriceMode update action.

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

                                                                                                                        Value before the change.

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

                                                                                                                        Value after the change.

                                                                                                                        + */ + + public com.commercetools.history.models.common.ProductPriceModeEnum getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ProductPriceModeEnum previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.ProductPriceModeEnum nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetPriceModeChangeImpl that = (SetPriceModeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetPriceModeChange copyDeep() { + return SetPriceModeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChange.java index c702dc3ac0e..28447d4e480 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChange.java @@ -30,6 +30,8 @@ * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .variant("{variant}") + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -79,6 +81,7 @@ public interface SetPricesChange extends Change { public List getNextValue(); /** + *

                                                                                                                        Product data that was updated.

                                                                                                                        *
                                                                                                                          *
                                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                                        • *
                                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                                        • @@ -90,13 +93,32 @@ public interface SetPricesChange extends Change { public String getCatalogData(); /** - *

                                                                                                                          sku or key of the ProductVariant.

                                                                                                                          + *

                                                                                                                          Identifier of the updated Product Variant.

                                                                                                                          + *

                                                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                          * @return variant */ @NotNull @JsonProperty("variant") public String getVariant(); + /** + *

                                                                                                                          Elements added to the array.

                                                                                                                          + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                          Elements removed from the array.

                                                                                                                          + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -135,6 +157,7 @@ public interface SetPricesChange extends Change { public void setNextValue(final List nextValue); /** + *

                                                                                                                          Product data that was updated.

                                                                                                                          *
                                                                                                                            *
                                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                                          • *
                                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                                          • @@ -145,12 +168,43 @@ public interface SetPricesChange extends Change { public void setCatalogData(final String catalogData); /** - *

                                                                                                                            sku or key of the ProductVariant.

                                                                                                                            + *

                                                                                                                            Identifier of the updated Product Variant.

                                                                                                                            + *

                                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                            Elements added to the array.

                                                                                                                            + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Price... addedItems); + + /** + *

                                                                                                                            Elements added to the array.

                                                                                                                            + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                            Elements removed from the array.

                                                                                                                            + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Price... removedItems); + + /** + *

                                                                                                                            Elements removed from the array.

                                                                                                                            + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetPricesChange @@ -171,6 +225,8 @@ public static SetPricesChange of(final SetPricesChange template) { instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); instance.setVariant(template.getVariant()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -200,6 +256,16 @@ public static SetPricesChange deepCopy(@Nullable final SetPricesChange template) .orElse(null)); instance.setCatalogData(template.getCatalogData()); instance.setVariant(template.getVariant()); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Price::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Price::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeBuilder.java index 99675440ca0..a09d040122a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeBuilder.java @@ -19,6 +19,8 @@ * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") * .variant("{variant}") + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -36,6 +38,10 @@ public class SetPricesChangeBuilder implements Builder { private String variant; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -223,6 +229,7 @@ public SetPricesChangeBuilder setNextValue( } /** + *

                                                                                                                            Product data that was updated.

                                                                                                                            *
                                                                                                                              *
                                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                                            • *
                                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                                            • @@ -237,7 +244,8 @@ public SetPricesChangeBuilder catalogData(final String catalogData) { } /** - *

                                                                                                                              sku or key of the ProductVariant.

                                                                                                                              + *

                                                                                                                              Identifier of the updated Product Variant.

                                                                                                                              + *

                                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                              * @param variant value to be set * @return Builder */ @@ -247,6 +255,181 @@ public SetPricesChangeBuilder variant(final String variant) { return this; } + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param addedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder addedItems(final com.commercetools.history.models.common.Price... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param addedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param addedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder plusAddedItems(final com.commercetools.history.models.common.Price... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetPricesChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetPricesChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetPricesChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                              Elements added to the array.

                                                                                                                              + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetPricesChangeBuilder setAddedItems( + Function builder) { + return addedItems(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param removedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder removedItems(final com.commercetools.history.models.common.Price... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param removedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param removedItems value to be set + * @return Builder + */ + + public SetPricesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Price... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetPricesChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetPricesChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetPricesChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                              Elements removed from the array.

                                                                                                                              + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetPricesChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + /** * value of change} * @return change @@ -275,6 +458,7 @@ public java.util.List getNextValu } /** + *

                                                                                                                              Product data that was updated.

                                                                                                                              *
                                                                                                                                *
                                                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                                                              • *
                                                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                                                              • @@ -287,7 +471,8 @@ public String getCatalogData() { } /** - *

                                                                                                                                sku or key of the ProductVariant.

                                                                                                                                + *

                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                + *

                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                * @return variant */ @@ -295,6 +480,24 @@ public String getVariant() { return this.variant; } + /** + *

                                                                                                                                Elements added to the array.

                                                                                                                                + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                Elements removed from the array.

                                                                                                                                + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetPricesChange with checking for non-null required values * @return SetPricesChange @@ -305,7 +508,10 @@ public SetPricesChange build() { Objects.requireNonNull(nextValue, SetPricesChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetPricesChange.class + ": catalogData is missing"); Objects.requireNonNull(variant, SetPricesChange.class + ": variant is missing"); - return new SetPricesChangeImpl(change, previousValue, nextValue, catalogData, variant); + Objects.requireNonNull(addedItems, SetPricesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetPricesChange.class + ": removedItems is missing"); + return new SetPricesChangeImpl(change, previousValue, nextValue, catalogData, variant, addedItems, + removedItems); } /** @@ -313,7 +519,8 @@ public SetPricesChange build() { * @return SetPricesChange */ public SetPricesChange buildUnchecked() { - return new SetPricesChangeImpl(change, previousValue, nextValue, catalogData, variant); + return new SetPricesChangeImpl(change, previousValue, nextValue, catalogData, variant, addedItems, + removedItems); } /** @@ -336,6 +543,8 @@ public static SetPricesChangeBuilder of(final SetPricesChange template) { builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); builder.variant = template.getVariant(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeImpl.java index ebedde581a8..cdf6b7817f2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetPricesChangeImpl.java @@ -34,6 +34,10 @@ public class SetPricesChangeImpl implements SetPricesChange, ModelBase { private String variant; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @@ -41,12 +45,16 @@ public class SetPricesChangeImpl implements SetPricesChange, ModelBase { SetPricesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; this.variant = variant; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_PRICES_CHANGE; } @@ -90,6 +98,7 @@ public java.util.List getNextValu } /** + *

                                                                                                                                Product data that was updated.

                                                                                                                                *
                                                                                                                                  *
                                                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                                                • *
                                                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                                                • @@ -101,13 +110,30 @@ public String getCatalogData() { } /** - *

                                                                                                                                  sku or key of the ProductVariant.

                                                                                                                                  + *

                                                                                                                                  Identifier of the updated Product Variant.

                                                                                                                                  + *

                                                                                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                  */ public String getVariant() { return this.variant; } + /** + *

                                                                                                                                  Elements added to the array.

                                                                                                                                  + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                  Elements removed from the array.

                                                                                                                                  + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -136,6 +162,22 @@ public void setVariant(final String variant) { this.variant = variant; } + public void setAddedItems(final com.commercetools.history.models.common.Price... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Price... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -152,12 +194,16 @@ public boolean equals(Object o) { .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(variant, that.variant) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) .append(variant, that.variant) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -169,6 +215,8 @@ public int hashCode() { .append(nextValue) .append(catalogData) .append(variant) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -180,6 +228,8 @@ public String toString() { .append("nextValue", nextValue) .append("catalogData", catalogData) .append("variant", variant) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChange.java new file mode 100644 index 00000000000..906513e6073 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChange.java @@ -0,0 +1,205 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.Attribute; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                  Change triggered by the Set Product Attribute update action.

                                                                                                                                  + * + *
                                                                                                                                  + * Example to create an instance using the builder pattern + *
                                                                                                                                  + *
                                                                                                                                  
                                                                                                                                  + *     SetProductAttributeChange setProductAttributeChange = SetProductAttributeChange.builder()
                                                                                                                                  + *             .change("{change}")
                                                                                                                                  + *             .catalogData("{catalogData}")
                                                                                                                                  + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                  + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                  + *             .build()
                                                                                                                                  + * 
                                                                                                                                  + *
                                                                                                                                  + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetProductAttributeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetProductAttributeChangeImpl.class) +public interface SetProductAttributeChange extends Change { + + /** + * discriminator value for SetProductAttributeChange + */ + String SET_PRODUCT_ATTRIBUTE_CHANGE = "SetProductAttributeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                  Product data that was updated.

                                                                                                                                  + * + * @return catalogData + */ + @NotNull + @JsonProperty("catalogData") + public String getCatalogData(); + + /** + *

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value after the change.

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

                                                                                                                                  Product data that was updated.

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

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value after the change.

                                                                                                                                  + * @param nextValue value to be set + */ + + public void setNextValue(final Attribute nextValue); + + /** + * factory method + * @return instance of SetProductAttributeChange + */ + public static SetProductAttributeChange of() { + return new SetProductAttributeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetProductAttributeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetProductAttributeChange of(final SetProductAttributeChange template) { + SetProductAttributeChangeImpl instance = new SetProductAttributeChangeImpl(); + instance.setChange(template.getChange()); + instance.setCatalogData(template.getCatalogData()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetProductAttributeChange copyDeep(); + + /** + * factory method to create a deep copy of SetProductAttributeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetProductAttributeChange deepCopy(@Nullable final SetProductAttributeChange template) { + if (template == null) { + return null; + } + SetProductAttributeChangeImpl instance = new SetProductAttributeChangeImpl(); + instance.setChange(template.getChange()); + instance.setCatalogData(template.getCatalogData()); + instance.setPreviousValue( + com.commercetools.history.models.common.Attribute.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.Attribute.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetProductAttributeChange + * @return builder + */ + public static SetProductAttributeChangeBuilder builder() { + return SetProductAttributeChangeBuilder.of(); + } + + /** + * create builder for SetProductAttributeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetProductAttributeChangeBuilder builder(final SetProductAttributeChange template) { + return SetProductAttributeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetProductAttributeChange(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/SetProductAttributeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeBuilder.java new file mode 100644 index 00000000000..508e5b54a48 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeBuilder.java @@ -0,0 +1,216 @@ + +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; + +/** + * SetProductAttributeChangeBuilder + *
                                                                                                                                  + * Example to create an instance using the builder pattern + *
                                                                                                                                  + *
                                                                                                                                  
                                                                                                                                  + *     SetProductAttributeChange setProductAttributeChange = SetProductAttributeChange.builder()
                                                                                                                                  + *             .change("{change}")
                                                                                                                                  + *             .catalogData("{catalogData}")
                                                                                                                                  + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                  + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                  + *             .build()
                                                                                                                                  + * 
                                                                                                                                  + *
                                                                                                                                  + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetProductAttributeChangeBuilder implements Builder { + + private String change; + + private String catalogData; + + private com.commercetools.history.models.common.Attribute previousValue; + + private com.commercetools.history.models.common.Attribute nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetProductAttributeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                  Product data that was updated.

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

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value after the change.

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

                                                                                                                                  Value after the change.

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

                                                                                                                                  Value after the change.

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

                                                                                                                                  Product data that was updated.

                                                                                                                                  + * + * @return catalogData + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value after the change.

                                                                                                                                  + * @return nextValue + */ + + public com.commercetools.history.models.common.Attribute getNextValue() { + return this.nextValue; + } + + /** + * builds SetProductAttributeChange with checking for non-null required values + * @return SetProductAttributeChange + */ + public SetProductAttributeChange build() { + Objects.requireNonNull(change, SetProductAttributeChange.class + ": change is missing"); + Objects.requireNonNull(catalogData, SetProductAttributeChange.class + ": catalogData is missing"); + Objects.requireNonNull(previousValue, SetProductAttributeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetProductAttributeChange.class + ": nextValue is missing"); + return new SetProductAttributeChangeImpl(change, catalogData, previousValue, nextValue); + } + + /** + * builds SetProductAttributeChange without checking for non-null required values + * @return SetProductAttributeChange + */ + public SetProductAttributeChange buildUnchecked() { + return new SetProductAttributeChangeImpl(change, catalogData, previousValue, nextValue); + } + + /** + * factory method for an instance of SetProductAttributeChangeBuilder + * @return builder + */ + public static SetProductAttributeChangeBuilder of() { + return new SetProductAttributeChangeBuilder(); + } + + /** + * create builder for SetProductAttributeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetProductAttributeChangeBuilder of(final SetProductAttributeChange template) { + SetProductAttributeChangeBuilder builder = new SetProductAttributeChangeBuilder(); + builder.change = template.getChange(); + builder.catalogData = template.getCatalogData(); + 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/SetProductAttributeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeImpl.java new file mode 100644 index 00000000000..ff60ec410fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeImpl.java @@ -0,0 +1,164 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                  Change triggered by the Set Product Attribute update action.

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

                                                                                                                                  Product data that was updated.

                                                                                                                                  + * + */ + + public String getCatalogData() { + return this.catalogData; + } + + /** + *

                                                                                                                                  Value before the change.

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

                                                                                                                                  Value after the change.

                                                                                                                                  + */ + + public com.commercetools.history.models.common.Attribute getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setCatalogData(final String catalogData) { + this.catalogData = catalogData; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Attribute previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Attribute nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetProductAttributeChangeImpl that = (SetProductAttributeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(catalogData, that.catalogData) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(catalogData, that.catalogData) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(catalogData) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("catalogData", catalogData) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetProductAttributeChange copyDeep() { + return SetProductAttributeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChange.java index 2c4db3fb343..de6d0c32fff 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChange.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                                                  Change triggered automatically by the Add Product or Remove Product update action.

                                                                                                                                  + *

                                                                                                                                  This change is initiated by background processes after the Add Product or Remove Product update action is performed.

                                                                                                                                  * *
                                                                                                                                  * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChangeImpl.java index d610d3bae43..3424acc686a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductCountChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                                                  Change triggered automatically by the Add Product or Remove Product update action.

                                                                                                                                  + *

                                                                                                                                  This change is initiated by background processes after the Add Product or Remove Product update action is performed.

                                                                                                                                  */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetProductCountChangeImpl implements SetProductCountChange, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChange.java index 49ed90c8ea1..61c4cc6a3d2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChange.java @@ -28,6 +28,10 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") + * .priceId("{priceId}") + * .customTypeId("{customTypeId}") + * .name("{name}") * .build() * * @@ -77,6 +81,7 @@ public interface SetProductPriceCustomFieldChange extends Change { public CustomFields getNextValue(); /** + *

                                                                                                                                  Product data that was updated.

                                                                                                                                  *
                                                                                                                                    *
                                                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                                                  • *
                                                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                                                  • @@ -87,6 +92,39 @@ public interface SetProductPriceCustomFieldChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                                                                    Identifier of the updated Product Variant.

                                                                                                                                    + *

                                                                                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                    + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + + /** + *

                                                                                                                                    id of the Embedded Price.

                                                                                                                                    + * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + + /** + *

                                                                                                                                    id of the referenced Type.

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

                                                                                                                                    Name of the Custom Field.

                                                                                                                                    + * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + /** * set change * @param change value to be set @@ -109,6 +147,7 @@ public interface SetProductPriceCustomFieldChange extends Change { public void setNextValue(final CustomFields nextValue); /** + *

                                                                                                                                    Product data that was updated.

                                                                                                                                    *
                                                                                                                                      *
                                                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                                                    • *
                                                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                                                    • @@ -118,6 +157,35 @@ public interface SetProductPriceCustomFieldChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                                                                      Identifier of the updated Product Variant.

                                                                                                                                      + *

                                                                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                      id of the Embedded Price.

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

                                                                                                                                      id of the referenced Type.

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

                                                                                                                                      Name of the Custom Field.

                                                                                                                                      + * @param name value to be set + */ + + public void setName(final String name); + /** * factory method * @return instance of SetProductPriceCustomFieldChange @@ -137,6 +205,10 @@ public static SetProductPriceCustomFieldChange of(final SetProductPriceCustomFie instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setName(template.getName()); return instance; } @@ -158,6 +230,10 @@ public static SetProductPriceCustomFieldChange deepCopy(@Nullable final SetProdu com.commercetools.history.models.common.CustomFields.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setName(template.getName()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeBuilder.java index 2ac9606958c..a422650abd3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeBuilder.java @@ -18,6 +18,10 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") + * .priceId("{priceId}") + * .customTypeId("{customTypeId}") + * .name("{name}") * .build() * * @@ -33,6 +37,14 @@ public class SetProductPriceCustomFieldChangeBuilder implements BuilderProduct data that was updated.

                                                                                                                                      *
                                                                                                                                        *
                                                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                                                      • *
                                                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                                                      • @@ -130,6 +143,51 @@ public SetProductPriceCustomFieldChangeBuilder catalogData(final String catalogD return this; } + /** + *

                                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                                        + *

                                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                        id of the Embedded Price.

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

                                                                                                                                        id of the referenced Type.

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

                                                                                                                                        Name of the Custom Field.

                                                                                                                                        + * @param name value to be set + * @return Builder + */ + + public SetProductPriceCustomFieldChangeBuilder name(final String name) { + this.name = name; + return this; + } + /** * value of change} * @return change @@ -158,6 +216,7 @@ public com.commercetools.history.models.common.CustomFields getNextValue() { } /** + *

                                                                                                                                        Product data that was updated.

                                                                                                                                        *
                                                                                                                                          *
                                                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                                                        • *
                                                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                                                        • @@ -169,6 +228,43 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                          Identifier of the updated Product Variant.

                                                                                                                                          + *

                                                                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                          + * @return variant + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                          id of the Embedded Price.

                                                                                                                                          + * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

                                                                                                                                          id of the referenced Type.

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

                                                                                                                                          Name of the Custom Field.

                                                                                                                                          + * @return name + */ + + public String getName() { + return this.name; + } + /** * builds SetProductPriceCustomFieldChange with checking for non-null required values * @return SetProductPriceCustomFieldChange @@ -178,7 +274,12 @@ public SetProductPriceCustomFieldChange build() { Objects.requireNonNull(previousValue, SetProductPriceCustomFieldChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetProductPriceCustomFieldChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetProductPriceCustomFieldChange.class + ": catalogData is missing"); - return new SetProductPriceCustomFieldChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetProductPriceCustomFieldChange.class + ": variant is missing"); + Objects.requireNonNull(priceId, SetProductPriceCustomFieldChange.class + ": priceId is missing"); + Objects.requireNonNull(customTypeId, SetProductPriceCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(name, SetProductPriceCustomFieldChange.class + ": name is missing"); + return new SetProductPriceCustomFieldChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId, + customTypeId, name); } /** @@ -186,7 +287,8 @@ public SetProductPriceCustomFieldChange build() { * @return SetProductPriceCustomFieldChange */ public SetProductPriceCustomFieldChange buildUnchecked() { - return new SetProductPriceCustomFieldChangeImpl(change, previousValue, nextValue, catalogData); + return new SetProductPriceCustomFieldChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId, + customTypeId, name); } /** @@ -208,6 +310,10 @@ public static SetProductPriceCustomFieldChangeBuilder of(final SetProductPriceCu builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); + builder.priceId = template.getPriceId(); + builder.customTypeId = template.getCustomTypeId(); + builder.name = template.getName(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeImpl.java index 6f3390ed149..5f03d2cf23f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeImpl.java @@ -32,6 +32,14 @@ public class SetProductPriceCustomFieldChangeImpl implements SetProductPriceCust private String catalogData; + private String variant; + + private String priceId; + + private String customTypeId; + + private String name; + /** * create instance with all properties */ @@ -39,11 +47,17 @@ public class SetProductPriceCustomFieldChangeImpl implements SetProductPriceCust SetProductPriceCustomFieldChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.CustomFields previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant, + @JsonProperty("priceId") final String priceId, @JsonProperty("customTypeId") final String customTypeId, + @JsonProperty("name") final String name) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; + this.priceId = priceId; + this.customTypeId = customTypeId; + this.name = name; this.type = SET_PRODUCT_PRICE_CUSTOM_FIELD_CHANGE; } @@ -87,6 +101,7 @@ public com.commercetools.history.models.common.CustomFields getNextValue() { } /** + *

                                                                                                                                          Product data that was updated.

                                                                                                                                          *
                                                                                                                                            *
                                                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                                                          • *
                                                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                                                          • @@ -97,6 +112,39 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                            Identifier of the updated Product Variant.

                                                                                                                                            + *

                                                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                            + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                            id of the Embedded Price.

                                                                                                                                            + */ + + public String getPriceId() { + return this.priceId; + } + + /** + *

                                                                                                                                            id of the referenced Type.

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

                                                                                                                                            Name of the Custom Field.

                                                                                                                                            + */ + + public String getName() { + return this.name; + } + public void setChange(final String change) { this.change = change; } @@ -113,6 +161,22 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + + public void setCustomTypeId(final String customTypeId) { + this.customTypeId = customTypeId; + } + + public void setName(final String name) { + this.name = name; + } + @Override public boolean equals(Object o) { if (this == o) @@ -128,11 +192,19 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) + .append(customTypeId, that.customTypeId) + .append(name, that.name) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) + .append(customTypeId, that.customTypeId) + .append(name, that.name) .isEquals(); } @@ -143,6 +215,10 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) + .append(priceId) + .append(customTypeId) + .append(name) .toHashCode(); } @@ -153,6 +229,10 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) + .append("priceId", priceId) + .append("customTypeId", customTypeId) + .append("name", name) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChange.java index c46cb58e8d0..fb55c9b94a7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChange.java @@ -28,6 +28,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") + * .priceId("{priceId}") * .build() * * @@ -77,6 +79,7 @@ public interface SetProductPriceCustomTypeChange extends Change { public CustomFields getNextValue(); /** + *

                                                                                                                                            Product data that was updated.

                                                                                                                                            *
                                                                                                                                              *
                                                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                                                            • *
                                                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                                                            • @@ -87,6 +90,23 @@ public interface SetProductPriceCustomTypeChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                                                                              Identifier of the updated Product Variant.

                                                                                                                                              + *

                                                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                              + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + + /** + *

                                                                                                                                              id of the Embedded Price.

                                                                                                                                              + * @return priceId + */ + @NotNull + @JsonProperty("priceId") + public String getPriceId(); + /** * set change * @param change value to be set @@ -109,6 +129,7 @@ public interface SetProductPriceCustomTypeChange extends Change { public void setNextValue(final CustomFields nextValue); /** + *

                                                                                                                                              Product data that was updated.

                                                                                                                                              *
                                                                                                                                                *
                                                                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                                                                              • *
                                                                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                                                                              • @@ -118,6 +139,21 @@ public interface SetProductPriceCustomTypeChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                + *

                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                id of the Embedded Price.

                                                                                                                                                + * @param priceId value to be set + */ + + public void setPriceId(final String priceId); + /** * factory method * @return instance of SetProductPriceCustomTypeChange @@ -137,6 +173,8 @@ public static SetProductPriceCustomTypeChange of(final SetProductPriceCustomType instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); return instance; } @@ -158,6 +196,8 @@ public static SetProductPriceCustomTypeChange deepCopy(@Nullable final SetProduc com.commercetools.history.models.common.CustomFields.deepCopy(template.getPreviousValue())); instance.setNextValue(com.commercetools.history.models.common.CustomFields.deepCopy(template.getNextValue())); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); + instance.setPriceId(template.getPriceId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeBuilder.java index d409c00ed34..8aa32deafa3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeBuilder.java @@ -18,6 +18,8 @@ * .previousValue(previousValueBuilder -> previousValueBuilder) * .nextValue(nextValueBuilder -> nextValueBuilder) * .catalogData("{catalogData}") + * .variant("{variant}") + * .priceId("{priceId}") * .build() * * @@ -33,6 +35,10 @@ public class SetProductPriceCustomTypeChangeBuilder implements BuilderProduct data that was updated.

                                                                                                                                                *
                                                                                                                                                  *
                                                                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                • *
                                                                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                                                                • @@ -130,6 +137,29 @@ public SetProductPriceCustomTypeChangeBuilder catalogData(final String catalogDa return this; } + /** + *

                                                                                                                                                  Identifier of the updated Product Variant.

                                                                                                                                                  + *

                                                                                                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                  id of the Embedded Price.

                                                                                                                                                  + * @param priceId value to be set + * @return Builder + */ + + public SetProductPriceCustomTypeChangeBuilder priceId(final String priceId) { + this.priceId = priceId; + return this; + } + /** * value of change} * @return change @@ -158,6 +188,7 @@ public com.commercetools.history.models.common.CustomFields getNextValue() { } /** + *

                                                                                                                                                  Product data that was updated.

                                                                                                                                                  *
                                                                                                                                                    *
                                                                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                  • *
                                                                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                                                                  • @@ -169,6 +200,25 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                    Identifier of the updated Product Variant.

                                                                                                                                                    + *

                                                                                                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                    + * @return variant + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                    id of the Embedded Price.

                                                                                                                                                    + * @return priceId + */ + + public String getPriceId() { + return this.priceId; + } + /** * builds SetProductPriceCustomTypeChange with checking for non-null required values * @return SetProductPriceCustomTypeChange @@ -178,7 +228,9 @@ public SetProductPriceCustomTypeChange build() { Objects.requireNonNull(previousValue, SetProductPriceCustomTypeChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetProductPriceCustomTypeChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetProductPriceCustomTypeChange.class + ": catalogData is missing"); - return new SetProductPriceCustomTypeChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetProductPriceCustomTypeChange.class + ": variant is missing"); + Objects.requireNonNull(priceId, SetProductPriceCustomTypeChange.class + ": priceId is missing"); + return new SetProductPriceCustomTypeChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId); } /** @@ -186,7 +238,7 @@ public SetProductPriceCustomTypeChange build() { * @return SetProductPriceCustomTypeChange */ public SetProductPriceCustomTypeChange buildUnchecked() { - return new SetProductPriceCustomTypeChangeImpl(change, previousValue, nextValue, catalogData); + return new SetProductPriceCustomTypeChangeImpl(change, previousValue, nextValue, catalogData, variant, priceId); } /** @@ -208,6 +260,8 @@ public static SetProductPriceCustomTypeChangeBuilder of(final SetProductPriceCus builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); + builder.priceId = template.getPriceId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeImpl.java index 669ecb114b6..a5135effc47 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeImpl.java @@ -32,6 +32,10 @@ public class SetProductPriceCustomTypeChangeImpl implements SetProductPriceCusto private String catalogData; + private String variant; + + private String priceId; + /** * create instance with all properties */ @@ -39,11 +43,14 @@ public class SetProductPriceCustomTypeChangeImpl implements SetProductPriceCusto SetProductPriceCustomTypeChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final com.commercetools.history.models.common.CustomFields previousValue, @JsonProperty("nextValue") final com.commercetools.history.models.common.CustomFields nextValue, - @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("catalogData") final String catalogData, @JsonProperty("variant") final String variant, + @JsonProperty("priceId") final String priceId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; + this.priceId = priceId; this.type = SET_PRODUCT_PRICE_CUSTOM_TYPE_CHANGE; } @@ -87,6 +94,7 @@ public com.commercetools.history.models.common.CustomFields getNextValue() { } /** + *

                                                                                                                                                    Product data that was updated.

                                                                                                                                                    *
                                                                                                                                                      *
                                                                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                    • *
                                                                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                                                                    • @@ -97,6 +105,23 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                      Identifier of the updated Product Variant.

                                                                                                                                                      + *

                                                                                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                      + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                      id of the Embedded Price.

                                                                                                                                                      + */ + + public String getPriceId() { + return this.priceId; + } + public void setChange(final String change) { this.change = change; } @@ -113,6 +138,14 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + + public void setPriceId(final String priceId) { + this.priceId = priceId; + } + @Override public boolean equals(Object o) { if (this == o) @@ -128,11 +161,15 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) + .append(priceId, that.priceId) .isEquals(); } @@ -143,6 +180,8 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) + .append(priceId) .toHashCode(); } @@ -153,6 +192,8 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) + .append("priceId", priceId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChange.java index fb75a6b1a18..328f980b2d7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChange.java @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetProductSelectionsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetProductSelectionsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final ProductSelectionSetting... addedItems); + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final ProductSelectionSetting... removedItems); + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetProductSelectionsChange @@ -131,6 +181,8 @@ public static SetProductSelectionsChange of(final SetProductSelectionsChange tem instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetProductSelectionsChange deepCopy(@Nullable final SetProductSele .map(com.commercetools.history.models.common.ProductSelectionSetting::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.ProductSelectionSetting::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.ProductSelectionSetting::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeBuilder.java index af105b9ab7c..cc5e9074022 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetProductSelectionsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -226,6 +232,190 @@ public SetProductSelectionsChangeBuilder setNextValue( return nextValue(builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of())); } + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param addedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder addedItems( + final com.commercetools.history.models.common.ProductSelectionSetting... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param addedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param addedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.ProductSelectionSetting... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                      Elements added to the array.

                                                                                                                                                      + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of())); + } + + /** + *

                                                                                                                                                      Elements added to the array.

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

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param removedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder removedItems( + final com.commercetools.history.models.common.ProductSelectionSetting... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param removedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param removedItems value to be set + * @return Builder + */ + + public SetProductSelectionsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.ProductSelectionSetting... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems( + builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of())); + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetProductSelectionsChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.ProductSelectionSettingBuilder.of())); + } + /** * value of change} * @return change @@ -253,6 +443,24 @@ public java.util.ListElements added to the array.

                                                                                                                                                      + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetProductSelectionsChange with checking for non-null required values * @return SetProductSelectionsChange @@ -261,7 +469,9 @@ public SetProductSelectionsChange build() { Objects.requireNonNull(change, SetProductSelectionsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetProductSelectionsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetProductSelectionsChange.class + ": nextValue is missing"); - return new SetProductSelectionsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetProductSelectionsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetProductSelectionsChange.class + ": removedItems is missing"); + return new SetProductSelectionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -269,7 +479,7 @@ public SetProductSelectionsChange build() { * @return SetProductSelectionsChange */ public SetProductSelectionsChange buildUnchecked() { - return new SetProductSelectionsChangeImpl(change, previousValue, nextValue); + return new SetProductSelectionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -290,6 +500,8 @@ public static SetProductSelectionsChangeBuilder of(final SetProductSelectionsCha builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeImpl.java index 976a1e15f96..f4f8735307a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeImpl.java @@ -30,16 +30,24 @@ public class SetProductSelectionsChangeImpl implements SetProductSelectionsChang private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetProductSelectionsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_PRODUCT_SELECTIONS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.ListElements added to the array.

                                                                                                                                                      + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                      Elements removed from the array.

                                                                                                                                                      + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -105,6 +129,24 @@ public void setNextValue( this.nextValue = nextValue; } + public void setAddedItems(final com.commercetools.history.models.common.ProductSelectionSetting... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + } + + public void setAddedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.ProductSelectionSetting... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -119,10 +161,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -132,6 +178,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -141,6 +189,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChange.java index 7da76477249..eb4cdb7f8ae 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChange.java @@ -26,6 +26,7 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -73,6 +74,7 @@ public interface SetProductVariantKeyChange extends Change { public String getNextValue(); /** + *

                                                                                                                                                      Product data that was updated.

                                                                                                                                                      *
                                                                                                                                                        *
                                                                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                      • *
                                                                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                                                                      • @@ -83,6 +85,15 @@ public interface SetProductVariantKeyChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                                                        + *

                                                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                        + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -105,6 +116,7 @@ public interface SetProductVariantKeyChange extends Change { public void setNextValue(final String nextValue); /** + *

                                                                                                                                                        Product data that was updated.

                                                                                                                                                        *
                                                                                                                                                          *
                                                                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                        • *
                                                                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                                                                        • @@ -114,6 +126,14 @@ public interface SetProductVariantKeyChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                                                                                          Identifier of the updated Product Variant.

                                                                                                                                                          + *

                                                                                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                          + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetProductVariantKeyChange @@ -133,6 +153,7 @@ public static SetProductVariantKeyChange of(final SetProductVariantKeyChange tem instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -153,6 +174,7 @@ public static SetProductVariantKeyChange deepCopy(@Nullable final SetProductVari instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeBuilder.java index e62ccc1fd3d..58cb9f9b4ce 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeBuilder.java @@ -17,6 +17,7 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -32,6 +33,8 @@ public class SetProductVariantKeyChangeBuilder implements BuilderProduct data that was updated.

                                                                                                                                                          *
                                                                                                                                                            *
                                                                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                          • *
                                                                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                                                                          • @@ -79,6 +83,18 @@ public SetProductVariantKeyChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                                                                                                                                            Identifier of the updated Product Variant.

                                                                                                                                                            + *

                                                                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                            + * @param variant value to be set + * @return Builder + */ + + public SetProductVariantKeyChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -107,6 +123,7 @@ public String getNextValue() { } /** + *

                                                                                                                                                            Product data that was updated.

                                                                                                                                                            *
                                                                                                                                                              *
                                                                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                            • *
                                                                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                                                                            • @@ -118,6 +135,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                              Identifier of the updated Product Variant.

                                                                                                                                                              + *

                                                                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                              + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetProductVariantKeyChange with checking for non-null required values * @return SetProductVariantKeyChange @@ -127,7 +154,8 @@ public SetProductVariantKeyChange build() { Objects.requireNonNull(previousValue, SetProductVariantKeyChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetProductVariantKeyChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetProductVariantKeyChange.class + ": catalogData is missing"); - return new SetProductVariantKeyChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetProductVariantKeyChange.class + ": variant is missing"); + return new SetProductVariantKeyChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -135,7 +163,7 @@ public SetProductVariantKeyChange build() { * @return SetProductVariantKeyChange */ public SetProductVariantKeyChange buildUnchecked() { - return new SetProductVariantKeyChangeImpl(change, previousValue, nextValue, catalogData); + return new SetProductVariantKeyChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -157,6 +185,7 @@ public static SetProductVariantKeyChangeBuilder of(final SetProductVariantKeyCha builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeImpl.java index fe0c1e2b041..1f3d0a37886 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeImpl.java @@ -32,17 +32,21 @@ public class SetProductVariantKeyChangeImpl implements SetProductVariantKeyChang private String catalogData; + private String variant; + /** * create instance with all properties */ @JsonCreator SetProductVariantKeyChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final String previousValue, - @JsonProperty("nextValue") final String nextValue, @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("nextValue") final String nextValue, @JsonProperty("catalogData") final String catalogData, + @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = SET_PRODUCT_VARIANT_KEY_CHANGE; } @@ -86,6 +90,7 @@ public String getNextValue() { } /** + *

                                                                                                                                                              Product data that was updated.

                                                                                                                                                              *
                                                                                                                                                                *
                                                                                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                              • *
                                                                                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                                                                                              • @@ -96,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -112,6 +126,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -127,11 +145,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -142,6 +162,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -152,6 +173,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChange.java index d7d8360e967..5605cee4255 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChange.java @@ -18,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * SetReservationsChange + *

                                                                                                                                                                This change is initiated by background processes after the Add Quantity, Remove Quantity, or Change Quantity update action is performed.

                                                                                                                                                                * *
                                                                                                                                                                * Example to create an instance using the builder pattern @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetReservationsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetReservationsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reservation... addedItems); + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reservation... removedItems); + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetReservationsChange @@ -131,6 +181,8 @@ public static SetReservationsChange of(final SetReservationsChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetReservationsChange deepCopy(@Nullable final SetReservationsChan .map(com.commercetools.history.models.common.Reservation::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reservation::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reservation::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeBuilder.java index 3423245fdb0..55ae9fedcf1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetReservationsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -219,6 +225,184 @@ public SetReservationsChangeBuilder setNextValue( return nextValue(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of())); } + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder addedItems( + final com.commercetools.history.models.common.Reservation... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param addedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reservation... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder plusAddedItems( + Function builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder withAddedItems( + Function builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder addAddedItems( + Function builder) { + return plusAddedItems(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of())); + } + + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder setAddedItems( + Function builder) { + return addedItems(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of())); + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reservation... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param removedItems value to be set + * @return Builder + */ + + public SetReservationsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reservation... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder plusRemovedItems( + Function builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder withRemovedItems( + Function builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder addRemovedItems( + Function builder) { + return plusRemovedItems(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of())); + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetReservationsChangeBuilder setRemovedItems( + Function builder) { + return removedItems(builder.apply(com.commercetools.history.models.common.ReservationBuilder.of())); + } + /** * value of change} * @return change @@ -246,6 +430,24 @@ public java.util.List getNe return this.nextValue; } + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetReservationsChange with checking for non-null required values * @return SetReservationsChange @@ -254,7 +456,9 @@ public SetReservationsChange build() { Objects.requireNonNull(change, SetReservationsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetReservationsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetReservationsChange.class + ": nextValue is missing"); - return new SetReservationsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetReservationsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetReservationsChange.class + ": removedItems is missing"); + return new SetReservationsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -262,7 +466,7 @@ public SetReservationsChange build() { * @return SetReservationsChange */ public SetReservationsChange buildUnchecked() { - return new SetReservationsChangeImpl(change, previousValue, nextValue); + return new SetReservationsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -283,6 +487,8 @@ public static SetReservationsChangeBuilder of(final SetReservationsChange templa builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeImpl.java index d6177d7372a..4a69834673e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReservationsChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * SetReservationsChange + *

                                                                                                                                                                This change is initiated by background processes after the Add Quantity, Remove Quantity, or Change Quantity update action is performed.

                                                                                                                                                                */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetReservationsChangeImpl implements SetReservationsChange, ModelBase { @@ -30,16 +30,24 @@ public class SetReservationsChangeImpl implements SetReservationsChange, ModelBa private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetReservationsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_RESERVATIONS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNe return this.nextValue; } + /** + *

                                                                                                                                                                Elements added to the array.

                                                                                                                                                                + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                Elements removed from the array.

                                                                                                                                                                + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,23 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reservation... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +158,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +175,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +186,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChange.java new file mode 100644 index 00000000000..609420d8779 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChange.java @@ -0,0 +1,179 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.ReturnInfo; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnInfo update action.

                                                                                                                                                                + * + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnInfoChange setReturnInfoChange = SetReturnInfoChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetReturnInfoChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetReturnInfoChangeImpl.class) +public interface SetReturnInfoChange extends Change { + + /** + * discriminator value for SetReturnInfoChange + */ + String SET_RETURN_INFO_CHANGE = "SetReturnInfoChange"; + + /** + * + * @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 ReturnInfo getPreviousValue(); + + /** + *

                                                                                                                                                                Value after the change.

                                                                                                                                                                + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public ReturnInfo 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 ReturnInfo previousValue); + + /** + *

                                                                                                                                                                Value after the change.

                                                                                                                                                                + * @param nextValue value to be set + */ + + public void setNextValue(final ReturnInfo nextValue); + + /** + * factory method + * @return instance of SetReturnInfoChange + */ + public static SetReturnInfoChange of() { + return new SetReturnInfoChangeImpl(); + } + + /** + * factory method to create a shallow copy SetReturnInfoChange + * @param template instance to be copied + * @return copy instance + */ + public static SetReturnInfoChange of(final SetReturnInfoChange template) { + SetReturnInfoChangeImpl instance = new SetReturnInfoChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetReturnInfoChange copyDeep(); + + /** + * factory method to create a deep copy of SetReturnInfoChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetReturnInfoChange deepCopy(@Nullable final SetReturnInfoChange template) { + if (template == null) { + return null; + } + SetReturnInfoChangeImpl instance = new SetReturnInfoChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.ReturnInfo.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.ReturnInfo.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetReturnInfoChange + * @return builder + */ + public static SetReturnInfoChangeBuilder builder() { + return SetReturnInfoChangeBuilder.of(); + } + + /** + * create builder for SetReturnInfoChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnInfoChangeBuilder builder(final SetReturnInfoChange template) { + return SetReturnInfoChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetReturnInfoChange(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/SetReturnInfoChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeBuilder.java new file mode 100644 index 00000000000..c31ce6ae26b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeBuilder.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; + +/** + * SetReturnInfoChangeBuilder + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnInfoChange setReturnInfoChange = SetReturnInfoChange.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 SetReturnInfoChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.ReturnInfo previousValue; + + private com.commercetools.history.models.common.ReturnInfo nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetReturnInfoChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value after the change.

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

                                                                                                                                                                Value after the change.

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

                                                                                                                                                                Value after the change.

                                                                                                                                                                + * @param nextValue value to be set + * @return Builder + */ + + public SetReturnInfoChangeBuilder nextValue(final com.commercetools.history.models.common.ReturnInfo 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.ReturnInfo getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                                                                                Value after the change.

                                                                                                                                                                + * @return nextValue + */ + + public com.commercetools.history.models.common.ReturnInfo getNextValue() { + return this.nextValue; + } + + /** + * builds SetReturnInfoChange with checking for non-null required values + * @return SetReturnInfoChange + */ + public SetReturnInfoChange build() { + Objects.requireNonNull(change, SetReturnInfoChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetReturnInfoChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetReturnInfoChange.class + ": nextValue is missing"); + return new SetReturnInfoChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetReturnInfoChange without checking for non-null required values + * @return SetReturnInfoChange + */ + public SetReturnInfoChange buildUnchecked() { + return new SetReturnInfoChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetReturnInfoChangeBuilder + * @return builder + */ + public static SetReturnInfoChangeBuilder of() { + return new SetReturnInfoChangeBuilder(); + } + + /** + * create builder for SetReturnInfoChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnInfoChangeBuilder of(final SetReturnInfoChange template) { + SetReturnInfoChangeBuilder builder = new SetReturnInfoChangeBuilder(); + 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/SetReturnInfoChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeImpl.java new file mode 100644 index 00000000000..164bc22e279 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnInfo update action.

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

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value after the change.

                                                                                                                                                                + */ + + public com.commercetools.history.models.common.ReturnInfo getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ReturnInfo previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.ReturnInfo nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetReturnInfoChangeImpl that = (SetReturnInfoChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetReturnInfoChange copyDeep() { + return SetReturnInfoChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChange.java new file mode 100644 index 00000000000..2537d23ae13 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChange.java @@ -0,0 +1,252 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem CustomField update action.

                                                                                                                                                                + * + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemCustomLineItemCustomFieldChange setReturnItemCustomLineItemCustomFieldChange = SetReturnItemCustomLineItemCustomFieldChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                                                                                + *             .customLineItemId("{customLineItemId}")
                                                                                                                                                                + *             .name("{name}")
                                                                                                                                                                + *             .customTypeId("{customTypeId}")
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetReturnItemCustomLineItemCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetReturnItemCustomLineItemCustomFieldChangeImpl.class) +public interface SetReturnItemCustomLineItemCustomFieldChange extends Change { + + /** + * discriminator value for SetReturnItemCustomLineItemCustomFieldChange + */ + String SET_RETURN_ITEM_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE = "SetReturnItemCustomLineItemCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItem + */ + @NotNull + @Valid + @JsonProperty("customLineItem") + public LocalizedString getCustomLineItem(); + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItemId + */ + @NotNull + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

                                                                                                                                                                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); + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @param customLineItem value to be set + */ + + public void setCustomLineItem(final LocalizedString customLineItem); + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

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

                                                                                                                                                                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 SetReturnItemCustomLineItemCustomFieldChange + */ + public static SetReturnItemCustomLineItemCustomFieldChange of() { + return new SetReturnItemCustomLineItemCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetReturnItemCustomLineItemCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetReturnItemCustomLineItemCustomFieldChange of( + final SetReturnItemCustomLineItemCustomFieldChange template) { + SetReturnItemCustomLineItemCustomFieldChangeImpl instance = new SetReturnItemCustomLineItemCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem(template.getCustomLineItem()); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetReturnItemCustomLineItemCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetReturnItemCustomLineItemCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetReturnItemCustomLineItemCustomFieldChange deepCopy( + @Nullable final SetReturnItemCustomLineItemCustomFieldChange template) { + if (template == null) { + return null; + } + SetReturnItemCustomLineItemCustomFieldChangeImpl instance = new SetReturnItemCustomLineItemCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetReturnItemCustomLineItemCustomFieldChange + * @return builder + */ + public static SetReturnItemCustomLineItemCustomFieldChangeBuilder builder() { + return SetReturnItemCustomLineItemCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetReturnItemCustomLineItemCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomFieldChangeBuilder builder( + final SetReturnItemCustomLineItemCustomFieldChange template) { + return SetReturnItemCustomLineItemCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetReturnItemCustomLineItemCustomFieldChange( + 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/SetReturnItemCustomLineItemCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..0daeedab465 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeBuilder.java @@ -0,0 +1,266 @@ + +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; + +/** + * SetReturnItemCustomLineItemCustomFieldChangeBuilder + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemCustomLineItemCustomFieldChange setReturnItemCustomLineItemCustomFieldChange = SetReturnItemCustomLineItemCustomFieldChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                                                                                + *             .customLineItemId("{customLineItemId}")
                                                                                                                                                                + *             .name("{name}")
                                                                                                                                                                + *             .customTypeId("{customTypeId}")
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemCustomLineItemCustomFieldChangeBuilder + implements Builder { + + private String change; + + private com.commercetools.history.models.common.LocalizedString customLineItem; + + private String customLineItemId; + + 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 SetReturnItemCustomLineItemCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                id of the updated CustomLineItem.

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

                                                                                                                                                                Name of the Custom Field.

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

                                                                                                                                                                id of the referenced Type.

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

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value after the change.

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

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItem + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItemId + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                                                                                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 SetReturnItemCustomLineItemCustomFieldChange with checking for non-null required values + * @return SetReturnItemCustomLineItemCustomFieldChange + */ + public SetReturnItemCustomLineItemCustomFieldChange build() { + Objects.requireNonNull(change, SetReturnItemCustomLineItemCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(customLineItem, + SetReturnItemCustomLineItemCustomFieldChange.class + ": customLineItem is missing"); + Objects.requireNonNull(customLineItemId, + SetReturnItemCustomLineItemCustomFieldChange.class + ": customLineItemId is missing"); + Objects.requireNonNull(name, SetReturnItemCustomLineItemCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, + SetReturnItemCustomLineItemCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, + SetReturnItemCustomLineItemCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, + SetReturnItemCustomLineItemCustomFieldChange.class + ": nextValue is missing"); + return new SetReturnItemCustomLineItemCustomFieldChangeImpl(change, customLineItem, customLineItemId, name, + customTypeId, previousValue, nextValue); + } + + /** + * builds SetReturnItemCustomLineItemCustomFieldChange without checking for non-null required values + * @return SetReturnItemCustomLineItemCustomFieldChange + */ + public SetReturnItemCustomLineItemCustomFieldChange buildUnchecked() { + return new SetReturnItemCustomLineItemCustomFieldChangeImpl(change, customLineItem, customLineItemId, name, + customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetReturnItemCustomLineItemCustomFieldChangeBuilder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomFieldChangeBuilder of() { + return new SetReturnItemCustomLineItemCustomFieldChangeBuilder(); + } + + /** + * create builder for SetReturnItemCustomLineItemCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomFieldChangeBuilder of( + final SetReturnItemCustomLineItemCustomFieldChange template) { + SetReturnItemCustomLineItemCustomFieldChangeBuilder builder = new SetReturnItemCustomLineItemCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.customLineItem = template.getCustomLineItem(); + builder.customLineItemId = template.getCustomLineItemId(); + 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/SetReturnItemCustomLineItemCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeImpl.java new file mode 100644 index 00000000000..438cfbd9895 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeImpl.java @@ -0,0 +1,220 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem CustomField update action.

                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemCustomLineItemCustomFieldChangeImpl + implements SetReturnItemCustomLineItemCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.common.LocalizedString customLineItem; + + private String customLineItemId; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetReturnItemCustomLineItemCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("customLineItem") final com.commercetools.history.models.common.LocalizedString customLineItem, + @JsonProperty("customLineItemId") final String customLineItemId, @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.customLineItem = customLineItem; + this.customLineItemId = customLineItemId; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_RETURN_ITEM_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetReturnItemCustomLineItemCustomFieldChangeImpl() { + this.type = SET_RETURN_ITEM_CUSTOM_LINE_ITEM_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                                                                                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 setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + 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; + + SetReturnItemCustomLineItemCustomFieldChangeImpl that = (SetReturnItemCustomLineItemCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .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(customLineItem) + .append(customLineItemId) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("customLineItem", customLineItem) + .append("customLineItemId", customLineItemId) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetReturnItemCustomLineItemCustomFieldChange copyDeep() { + return SetReturnItemCustomLineItemCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChange.java new file mode 100644 index 00000000000..2d7733f9858 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChange.java @@ -0,0 +1,222 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.CustomFields; +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem Custom Type update action.

                                                                                                                                                                + * + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemCustomLineItemCustomTypeChange setReturnItemCustomLineItemCustomTypeChange = SetReturnItemCustomLineItemCustomTypeChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                                                                                + *             .customLineItemId("{customLineItemId}")
                                                                                                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetReturnItemCustomLineItemCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetReturnItemCustomLineItemCustomTypeChangeImpl.class) +public interface SetReturnItemCustomLineItemCustomTypeChange extends Change { + + /** + * discriminator value for SetReturnItemCustomLineItemCustomTypeChange + */ + String SET_RETURN_ITEM_CUSTOM_LINE_ITEM_CUSTOM_TYPE_CHANGE = "SetReturnItemCustomLineItemCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItem + */ + @NotNull + @Valid + @JsonProperty("customLineItem") + public LocalizedString getCustomLineItem(); + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItemId + */ + @NotNull + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + + /** + *

                                                                                                                                                                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); + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @param customLineItem value to be set + */ + + public void setCustomLineItem(final LocalizedString customLineItem); + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

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

                                                                                                                                                                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 SetReturnItemCustomLineItemCustomTypeChange + */ + public static SetReturnItemCustomLineItemCustomTypeChange of() { + return new SetReturnItemCustomLineItemCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetReturnItemCustomLineItemCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetReturnItemCustomLineItemCustomTypeChange of( + final SetReturnItemCustomLineItemCustomTypeChange template) { + SetReturnItemCustomLineItemCustomTypeChangeImpl instance = new SetReturnItemCustomLineItemCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem(template.getCustomLineItem()); + instance.setCustomLineItemId(template.getCustomLineItemId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetReturnItemCustomLineItemCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetReturnItemCustomLineItemCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetReturnItemCustomLineItemCustomTypeChange deepCopy( + @Nullable final SetReturnItemCustomLineItemCustomTypeChange template) { + if (template == null) { + return null; + } + SetReturnItemCustomLineItemCustomTypeChangeImpl instance = new SetReturnItemCustomLineItemCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setCustomLineItem( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getCustomLineItem())); + instance.setCustomLineItemId(template.getCustomLineItemId()); + 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 SetReturnItemCustomLineItemCustomTypeChange + * @return builder + */ + public static SetReturnItemCustomLineItemCustomTypeChangeBuilder builder() { + return SetReturnItemCustomLineItemCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetReturnItemCustomLineItemCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomTypeChangeBuilder builder( + final SetReturnItemCustomLineItemCustomTypeChange template) { + return SetReturnItemCustomLineItemCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetReturnItemCustomLineItemCustomTypeChange( + 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/SetReturnItemCustomLineItemCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..a719f525a5e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeBuilder.java @@ -0,0 +1,266 @@ + +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; + +/** + * SetReturnItemCustomLineItemCustomTypeChangeBuilder + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemCustomLineItemCustomTypeChange setReturnItemCustomLineItemCustomTypeChange = SetReturnItemCustomLineItemCustomTypeChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .customLineItem(customLineItemBuilder -> customLineItemBuilder)
                                                                                                                                                                + *             .customLineItemId("{customLineItemId}")
                                                                                                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemCustomLineItemCustomTypeChangeBuilder + implements Builder { + + private String change; + + private com.commercetools.history.models.common.LocalizedString customLineItem; + + private String customLineItemId; + + 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                Name of the updated CustomLineItem.

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

                                                                                                                                                                id of the updated CustomLineItem.

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

                                                                                                                                                                Value before the change.

                                                                                                                                                                + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetReturnItemCustomLineItemCustomTypeChangeBuilder 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder 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 SetReturnItemCustomLineItemCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItem + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + * @return customLineItemId + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                                                                                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 SetReturnItemCustomLineItemCustomTypeChange with checking for non-null required values + * @return SetReturnItemCustomLineItemCustomTypeChange + */ + public SetReturnItemCustomLineItemCustomTypeChange build() { + Objects.requireNonNull(change, SetReturnItemCustomLineItemCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(customLineItem, + SetReturnItemCustomLineItemCustomTypeChange.class + ": customLineItem is missing"); + Objects.requireNonNull(customLineItemId, + SetReturnItemCustomLineItemCustomTypeChange.class + ": customLineItemId is missing"); + Objects.requireNonNull(previousValue, + SetReturnItemCustomLineItemCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetReturnItemCustomLineItemCustomTypeChange.class + ": nextValue is missing"); + return new SetReturnItemCustomLineItemCustomTypeChangeImpl(change, customLineItem, customLineItemId, + previousValue, nextValue); + } + + /** + * builds SetReturnItemCustomLineItemCustomTypeChange without checking for non-null required values + * @return SetReturnItemCustomLineItemCustomTypeChange + */ + public SetReturnItemCustomLineItemCustomTypeChange buildUnchecked() { + return new SetReturnItemCustomLineItemCustomTypeChangeImpl(change, customLineItem, customLineItemId, + previousValue, nextValue); + } + + /** + * factory method for an instance of SetReturnItemCustomLineItemCustomTypeChangeBuilder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomTypeChangeBuilder of() { + return new SetReturnItemCustomLineItemCustomTypeChangeBuilder(); + } + + /** + * create builder for SetReturnItemCustomLineItemCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemCustomLineItemCustomTypeChangeBuilder of( + final SetReturnItemCustomLineItemCustomTypeChange template) { + SetReturnItemCustomLineItemCustomTypeChangeBuilder builder = new SetReturnItemCustomLineItemCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.customLineItem = template.getCustomLineItem(); + builder.customLineItemId = template.getCustomLineItemId(); + 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/SetReturnItemCustomLineItemCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeImpl.java new file mode 100644 index 00000000000..6b04d3de151 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeImpl.java @@ -0,0 +1,181 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem Custom Type update action.

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

                                                                                                                                                                Name of the updated CustomLineItem.

                                                                                                                                                                + */ + + public com.commercetools.history.models.common.LocalizedString getCustomLineItem() { + return this.customLineItem; + } + + /** + *

                                                                                                                                                                id of the updated CustomLineItem.

                                                                                                                                                                + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + + /** + *

                                                                                                                                                                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 setCustomLineItem(final com.commercetools.history.models.common.LocalizedString customLineItem) { + this.customLineItem = customLineItem; + } + + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + + 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; + + SetReturnItemCustomLineItemCustomTypeChangeImpl that = (SetReturnItemCustomLineItemCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(customLineItem, that.customLineItem) + .append(customLineItemId, that.customLineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(customLineItem) + .append(customLineItemId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("customLineItem", customLineItem) + .append("customLineItemId", customLineItemId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetReturnItemCustomLineItemCustomTypeChange copyDeep() { + return SetReturnItemCustomLineItemCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChange.java new file mode 100644 index 00000000000..cd6b6fbfe2d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChange.java @@ -0,0 +1,270 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem CustomField update action.

                                                                                                                                                                + * + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemLineItemCustomFieldChange setReturnItemLineItemCustomFieldChange = SetReturnItemLineItemCustomFieldChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .variant("{variant}")
                                                                                                                                                                + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                                                                                                                                                + *             .lineItemId("{lineItemId}")
                                                                                                                                                                + *             .name("{name}")
                                                                                                                                                                + *             .customTypeId("{customTypeId}")
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetReturnItemLineItemCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetReturnItemLineItemCustomFieldChangeImpl.class) +public interface SetReturnItemLineItemCustomFieldChange extends Change { + + /** + * discriminator value for SetReturnItemLineItemCustomFieldChange + */ + String SET_RETURN_ITEM_LINE_ITEM_CUSTOM_FIELD_CHANGE = "SetReturnItemLineItemCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public LocalizedString getLineItem(); + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + + /** + *

                                                                                                                                                                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); + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @param lineItem value to be set + */ + + public void setLineItem(final LocalizedString lineItem); + + /** + *

                                                                                                                                                                id of the updated LineItem.

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

                                                                                                                                                                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 SetReturnItemLineItemCustomFieldChange + */ + public static SetReturnItemLineItemCustomFieldChange of() { + return new SetReturnItemLineItemCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetReturnItemLineItemCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetReturnItemLineItemCustomFieldChange of(final SetReturnItemLineItemCustomFieldChange template) { + SetReturnItemLineItemCustomFieldChangeImpl instance = new SetReturnItemLineItemCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariant(template.getVariant()); + instance.setLineItem(template.getLineItem()); + instance.setLineItemId(template.getLineItemId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetReturnItemLineItemCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetReturnItemLineItemCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetReturnItemLineItemCustomFieldChange deepCopy( + @Nullable final SetReturnItemLineItemCustomFieldChange template) { + if (template == null) { + return null; + } + SetReturnItemLineItemCustomFieldChangeImpl instance = new SetReturnItemLineItemCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariant(template.getVariant()); + instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); + instance.setLineItemId(template.getLineItemId()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetReturnItemLineItemCustomFieldChange + * @return builder + */ + public static SetReturnItemLineItemCustomFieldChangeBuilder builder() { + return SetReturnItemLineItemCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetReturnItemLineItemCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemLineItemCustomFieldChangeBuilder builder( + final SetReturnItemLineItemCustomFieldChange template) { + return SetReturnItemLineItemCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetReturnItemLineItemCustomFieldChange( + 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/SetReturnItemLineItemCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..2622cebae02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeBuilder.java @@ -0,0 +1,288 @@ + +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; + +/** + * SetReturnItemLineItemCustomFieldChangeBuilder + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemLineItemCustomFieldChange setReturnItemLineItemCustomFieldChange = SetReturnItemLineItemCustomFieldChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .variant("{variant}")
                                                                                                                                                                + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                                                                                                                                                + *             .lineItemId("{lineItemId}")
                                                                                                                                                                + *             .name("{name}")
                                                                                                                                                                + *             .customTypeId("{customTypeId}")
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemLineItemCustomFieldChangeBuilder implements Builder { + + private String change; + + private String variant; + + private com.commercetools.history.models.common.LocalizedString lineItem; + + private String lineItemId; + + 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 SetReturnItemLineItemCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                id of the updated LineItem.

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

                                                                                                                                                                Name of the Custom Field.

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

                                                                                                                                                                id of the referenced Type.

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

                                                                                                                                                                Value before the change.

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

                                                                                                                                                                Value after the change.

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

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @return lineItem + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                                                                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 SetReturnItemLineItemCustomFieldChange with checking for non-null required values + * @return SetReturnItemLineItemCustomFieldChange + */ + public SetReturnItemLineItemCustomFieldChange build() { + Objects.requireNonNull(change, SetReturnItemLineItemCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(variant, SetReturnItemLineItemCustomFieldChange.class + ": variant is missing"); + Objects.requireNonNull(lineItem, SetReturnItemLineItemCustomFieldChange.class + ": lineItem is missing"); + Objects.requireNonNull(lineItemId, SetReturnItemLineItemCustomFieldChange.class + ": lineItemId is missing"); + Objects.requireNonNull(name, SetReturnItemLineItemCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, + SetReturnItemLineItemCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, + SetReturnItemLineItemCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetReturnItemLineItemCustomFieldChange.class + ": nextValue is missing"); + return new SetReturnItemLineItemCustomFieldChangeImpl(change, variant, lineItem, lineItemId, name, customTypeId, + previousValue, nextValue); + } + + /** + * builds SetReturnItemLineItemCustomFieldChange without checking for non-null required values + * @return SetReturnItemLineItemCustomFieldChange + */ + public SetReturnItemLineItemCustomFieldChange buildUnchecked() { + return new SetReturnItemLineItemCustomFieldChangeImpl(change, variant, lineItem, lineItemId, name, customTypeId, + previousValue, nextValue); + } + + /** + * factory method for an instance of SetReturnItemLineItemCustomFieldChangeBuilder + * @return builder + */ + public static SetReturnItemLineItemCustomFieldChangeBuilder of() { + return new SetReturnItemLineItemCustomFieldChangeBuilder(); + } + + /** + * create builder for SetReturnItemLineItemCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemLineItemCustomFieldChangeBuilder of( + final SetReturnItemLineItemCustomFieldChange template) { + SetReturnItemLineItemCustomFieldChangeBuilder builder = new SetReturnItemLineItemCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.variant = template.getVariant(); + builder.lineItem = template.getLineItem(); + builder.lineItemId = template.getLineItemId(); + 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/SetReturnItemLineItemCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeImpl.java new file mode 100644 index 00000000000..8ec67dadb89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeImpl.java @@ -0,0 +1,240 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem CustomField update action.

                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemLineItemCustomFieldChangeImpl implements SetReturnItemLineItemCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String variant; + + private com.commercetools.history.models.common.LocalizedString lineItem; + + private String lineItemId; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetReturnItemLineItemCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("variant") final String variant, + @JsonProperty("lineItem") final com.commercetools.history.models.common.LocalizedString lineItem, + @JsonProperty("lineItemId") final String lineItemId, @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.variant = variant; + this.lineItem = lineItem; + this.lineItemId = lineItemId; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_RETURN_ITEM_LINE_ITEM_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetReturnItemLineItemCustomFieldChangeImpl() { + this.type = SET_RETURN_ITEM_LINE_ITEM_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                                                                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 setVariant(final String variant) { + this.variant = variant; + } + + public void setLineItem(final com.commercetools.history.models.common.LocalizedString lineItem) { + this.lineItem = lineItem; + } + + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + + 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; + + SetReturnItemLineItemCustomFieldChangeImpl that = (SetReturnItemLineItemCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(variant, that.variant) + .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(variant, that.variant) + .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .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(variant) + .append(lineItem) + .append(lineItemId) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("variant", variant) + .append("lineItem", lineItem) + .append("lineItemId", lineItemId) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetReturnItemLineItemCustomFieldChange copyDeep() { + return SetReturnItemLineItemCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChange.java new file mode 100644 index 00000000000..43d0fa32645 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChange.java @@ -0,0 +1,239 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.CustomFields; +import com.commercetools.history.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem Custom Type update action.

                                                                                                                                                                + * + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemLineItemCustomTypeChange setReturnItemLineItemCustomTypeChange = SetReturnItemLineItemCustomTypeChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .variant("{variant}")
                                                                                                                                                                + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                                                                                                                                                + *             .lineItemId("{lineItemId}")
                                                                                                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetReturnItemLineItemCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetReturnItemLineItemCustomTypeChangeImpl.class) +public interface SetReturnItemLineItemCustomTypeChange extends Change { + + /** + * discriminator value for SetReturnItemLineItemCustomTypeChange + */ + String SET_RETURN_ITEM_LINE_ITEM_CUSTOM_TYPE_CHANGE = "SetReturnItemLineItemCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @return lineItem + */ + @NotNull + @Valid + @JsonProperty("lineItem") + public LocalizedString getLineItem(); + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + * @return lineItemId + */ + @NotNull + @JsonProperty("lineItemId") + public String getLineItemId(); + + /** + *

                                                                                                                                                                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); + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @param lineItem value to be set + */ + + public void setLineItem(final LocalizedString lineItem); + + /** + *

                                                                                                                                                                id of the updated LineItem.

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

                                                                                                                                                                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 SetReturnItemLineItemCustomTypeChange + */ + public static SetReturnItemLineItemCustomTypeChange of() { + return new SetReturnItemLineItemCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetReturnItemLineItemCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetReturnItemLineItemCustomTypeChange of(final SetReturnItemLineItemCustomTypeChange template) { + SetReturnItemLineItemCustomTypeChangeImpl instance = new SetReturnItemLineItemCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariant(template.getVariant()); + instance.setLineItem(template.getLineItem()); + instance.setLineItemId(template.getLineItemId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetReturnItemLineItemCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetReturnItemLineItemCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetReturnItemLineItemCustomTypeChange deepCopy( + @Nullable final SetReturnItemLineItemCustomTypeChange template) { + if (template == null) { + return null; + } + SetReturnItemLineItemCustomTypeChangeImpl instance = new SetReturnItemLineItemCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setVariant(template.getVariant()); + instance.setLineItem(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLineItem())); + instance.setLineItemId(template.getLineItemId()); + 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 SetReturnItemLineItemCustomTypeChange + * @return builder + */ + public static SetReturnItemLineItemCustomTypeChangeBuilder builder() { + return SetReturnItemLineItemCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetReturnItemLineItemCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemLineItemCustomTypeChangeBuilder builder( + final SetReturnItemLineItemCustomTypeChange template) { + return SetReturnItemLineItemCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetReturnItemLineItemCustomTypeChange(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/SetReturnItemLineItemCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..88d7a02c1cc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeBuilder.java @@ -0,0 +1,289 @@ + +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; + +/** + * SetReturnItemLineItemCustomTypeChangeBuilder + *
                                                                                                                                                                + * Example to create an instance using the builder pattern + *
                                                                                                                                                                + *
                                                                                                                                                                
                                                                                                                                                                + *     SetReturnItemLineItemCustomTypeChange setReturnItemLineItemCustomTypeChange = SetReturnItemLineItemCustomTypeChange.builder()
                                                                                                                                                                + *             .change("{change}")
                                                                                                                                                                + *             .variant("{variant}")
                                                                                                                                                                + *             .lineItem(lineItemBuilder -> lineItemBuilder)
                                                                                                                                                                + *             .lineItemId("{lineItemId}")
                                                                                                                                                                + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                + *             .build()
                                                                                                                                                                + * 
                                                                                                                                                                + *
                                                                                                                                                                + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetReturnItemLineItemCustomTypeChangeBuilder implements Builder { + + private String change; + + private String variant; + + private com.commercetools.history.models.common.LocalizedString lineItem; + + private String lineItemId; + + 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 SetReturnItemLineItemCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                Name of the Product the updated Line Item is based on.

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

                                                                                                                                                                id of the updated LineItem.

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

                                                                                                                                                                Value before the change.

                                                                                                                                                                + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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 SetReturnItemLineItemCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + * @return variant + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + * @return lineItem + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + * @return lineItemId + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                                                                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 SetReturnItemLineItemCustomTypeChange with checking for non-null required values + * @return SetReturnItemLineItemCustomTypeChange + */ + public SetReturnItemLineItemCustomTypeChange build() { + Objects.requireNonNull(change, SetReturnItemLineItemCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(variant, SetReturnItemLineItemCustomTypeChange.class + ": variant is missing"); + Objects.requireNonNull(lineItem, SetReturnItemLineItemCustomTypeChange.class + ": lineItem is missing"); + Objects.requireNonNull(lineItemId, SetReturnItemLineItemCustomTypeChange.class + ": lineItemId is missing"); + Objects.requireNonNull(previousValue, + SetReturnItemLineItemCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetReturnItemLineItemCustomTypeChange.class + ": nextValue is missing"); + return new SetReturnItemLineItemCustomTypeChangeImpl(change, variant, lineItem, lineItemId, previousValue, + nextValue); + } + + /** + * builds SetReturnItemLineItemCustomTypeChange without checking for non-null required values + * @return SetReturnItemLineItemCustomTypeChange + */ + public SetReturnItemLineItemCustomTypeChange buildUnchecked() { + return new SetReturnItemLineItemCustomTypeChangeImpl(change, variant, lineItem, lineItemId, previousValue, + nextValue); + } + + /** + * factory method for an instance of SetReturnItemLineItemCustomTypeChangeBuilder + * @return builder + */ + public static SetReturnItemLineItemCustomTypeChangeBuilder of() { + return new SetReturnItemLineItemCustomTypeChangeBuilder(); + } + + /** + * create builder for SetReturnItemLineItemCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetReturnItemLineItemCustomTypeChangeBuilder of( + final SetReturnItemLineItemCustomTypeChange template) { + SetReturnItemLineItemCustomTypeChangeBuilder builder = new SetReturnItemLineItemCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.variant = template.getVariant(); + builder.lineItem = template.getLineItem(); + builder.lineItemId = template.getLineItemId(); + 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/SetReturnItemLineItemCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeImpl.java new file mode 100644 index 00000000000..ecd45a56630 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeImpl.java @@ -0,0 +1,201 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                Change triggered by the Set ReturnItem Custom Type update action.

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

                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                + *

                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                + */ + + public String getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                Name of the Product the updated Line Item is based on.

                                                                                                                                                                + */ + + public com.commercetools.history.models.common.LocalizedString getLineItem() { + return this.lineItem; + } + + /** + *

                                                                                                                                                                id of the updated LineItem.

                                                                                                                                                                + */ + + public String getLineItemId() { + return this.lineItemId; + } + + /** + *

                                                                                                                                                                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 setVariant(final String variant) { + this.variant = variant; + } + + public void setLineItem(final com.commercetools.history.models.common.LocalizedString lineItem) { + this.lineItem = lineItem; + } + + public void setLineItemId(final String lineItemId) { + this.lineItemId = lineItemId; + } + + 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; + + SetReturnItemLineItemCustomTypeChangeImpl that = (SetReturnItemLineItemCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(variant, that.variant) + .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(variant, that.variant) + .append(lineItem, that.lineItem) + .append(lineItemId, that.lineItemId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(variant) + .append(lineItem) + .append(lineItemId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("variant", variant) + .append("lineItem", lineItem) + .append("lineItemId", lineItemId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetReturnItemLineItemCustomTypeChange copyDeep() { + return SetReturnItemLineItemCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChange.java index 55f7812bb7f..3c1fad5b64b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChange.java @@ -77,6 +77,7 @@ public interface SetSearchKeywordsChange extends Change { public SearchKeywords getNextValue(); /** + *

                                                                                                                                                                Product data that was updated.

                                                                                                                                                                *
                                                                                                                                                                  *
                                                                                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                • *
                                                                                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                                                                                • @@ -109,6 +110,7 @@ public interface SetSearchKeywordsChange extends Change { public void setNextValue(final SearchKeywords nextValue); /** + *

                                                                                                                                                                  Product data that was updated.

                                                                                                                                                                  *
                                                                                                                                                                    *
                                                                                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                  • *
                                                                                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                                                                                  • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeBuilder.java index 4da12859fef..ece5528488a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeBuilder.java @@ -117,6 +117,7 @@ public SetSearchKeywordsChangeBuilder nextValue( } /** + *

                                                                                                                                                                    Product data that was updated.

                                                                                                                                                                    *
                                                                                                                                                                      *
                                                                                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                    • *
                                                                                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                                                                                    • @@ -158,6 +159,7 @@ public com.commercetools.history.models.common.SearchKeywords getNextValue() { } /** + *

                                                                                                                                                                      Product data that was updated.

                                                                                                                                                                      *
                                                                                                                                                                        *
                                                                                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                      • *
                                                                                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                                                                                      • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeImpl.java index f3a1e0d3101..983c882867c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSearchKeywordsChangeImpl.java @@ -87,6 +87,7 @@ public com.commercetools.history.models.common.SearchKeywords getNextValue() { } /** + *

                                                                                                                                                                        Product data that was updated.

                                                                                                                                                                        *
                                                                                                                                                                          *
                                                                                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                        • *
                                                                                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                                                                                        • diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChange.java new file mode 100644 index 00000000000..38b5d33ea94 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChange.java @@ -0,0 +1,210 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Address CustomField update action.

                                                                                                                                                                          + * + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingAddressCustomFieldChange setShippingAddressCustomFieldChange = SetShippingAddressCustomFieldChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .name("{name}")
                                                                                                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetShippingAddressCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetShippingAddressCustomFieldChangeImpl.class) +public interface SetShippingAddressCustomFieldChange extends Change { + + /** + * discriminator value for SetShippingAddressCustomFieldChange + */ + String SET_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE = "SetShippingAddressCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                          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); + + /** + *

                                                                                                                                                                          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 SetShippingAddressCustomFieldChange + */ + public static SetShippingAddressCustomFieldChange of() { + return new SetShippingAddressCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetShippingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetShippingAddressCustomFieldChange of(final SetShippingAddressCustomFieldChange template) { + SetShippingAddressCustomFieldChangeImpl instance = new SetShippingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetShippingAddressCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetShippingAddressCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetShippingAddressCustomFieldChange deepCopy( + @Nullable final SetShippingAddressCustomFieldChange template) { + if (template == null) { + return null; + } + SetShippingAddressCustomFieldChangeImpl instance = new SetShippingAddressCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetShippingAddressCustomFieldChange + * @return builder + */ + public static SetShippingAddressCustomFieldChangeBuilder builder() { + return SetShippingAddressCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetShippingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressCustomFieldChangeBuilder builder( + final SetShippingAddressCustomFieldChange template) { + return SetShippingAddressCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetShippingAddressCustomFieldChange(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/SetShippingAddressCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..41667f671ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeBuilder.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetShippingAddressCustomFieldChangeBuilder + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingAddressCustomFieldChange setShippingAddressCustomFieldChange = SetShippingAddressCustomFieldChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .name("{name}")
                                                                                                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingAddressCustomFieldChangeBuilder implements Builder { + + private String change; + + 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 SetShippingAddressCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                          Name of the Custom Field.

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

                                                                                                                                                                          id of the referenced Type.

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

                                                                                                                                                                          Value before the change.

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

                                                                                                                                                                          Value after the change.

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

                                                                                                                                                                          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 SetShippingAddressCustomFieldChange with checking for non-null required values + * @return SetShippingAddressCustomFieldChange + */ + public SetShippingAddressCustomFieldChange build() { + Objects.requireNonNull(change, SetShippingAddressCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(name, SetShippingAddressCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetShippingAddressCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetShippingAddressCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetShippingAddressCustomFieldChange.class + ": nextValue is missing"); + return new SetShippingAddressCustomFieldChangeImpl(change, name, customTypeId, previousValue, nextValue); + } + + /** + * builds SetShippingAddressCustomFieldChange without checking for non-null required values + * @return SetShippingAddressCustomFieldChange + */ + public SetShippingAddressCustomFieldChange buildUnchecked() { + return new SetShippingAddressCustomFieldChangeImpl(change, name, customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetShippingAddressCustomFieldChangeBuilder + * @return builder + */ + public static SetShippingAddressCustomFieldChangeBuilder of() { + return new SetShippingAddressCustomFieldChangeBuilder(); + } + + /** + * create builder for SetShippingAddressCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressCustomFieldChangeBuilder of(final SetShippingAddressCustomFieldChange template) { + SetShippingAddressCustomFieldChangeBuilder builder = new SetShippingAddressCustomFieldChangeBuilder(); + builder.change = template.getChange(); + 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/SetShippingAddressCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeImpl.java new file mode 100644 index 00000000000..e59a0540fef --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeImpl.java @@ -0,0 +1,179 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Address CustomField update action.

                                                                                                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingAddressCustomFieldChangeImpl implements SetShippingAddressCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetShippingAddressCustomFieldChangeImpl(@JsonProperty("change") final String change, + @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.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetShippingAddressCustomFieldChangeImpl() { + this.type = SET_SHIPPING_ADDRESS_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                                                                          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 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; + + SetShippingAddressCustomFieldChangeImpl that = (SetShippingAddressCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .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(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetShippingAddressCustomFieldChange copyDeep() { + return SetShippingAddressCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChange.java new file mode 100644 index 00000000000..7ec4a56a81f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChange.java @@ -0,0 +1,180 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Address Custom Type update action.

                                                                                                                                                                          + * + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingAddressCustomTypeChange setShippingAddressCustomTypeChange = SetShippingAddressCustomTypeChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                          + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetShippingAddressCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetShippingAddressCustomTypeChangeImpl.class) +public interface SetShippingAddressCustomTypeChange extends Change { + + /** + * discriminator value for SetShippingAddressCustomTypeChange + */ + String SET_SHIPPING_ADDRESS_CUSTOM_TYPE_CHANGE = "SetShippingAddressCustomTypeChange"; + + /** + * + * @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 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); + + /** + *

                                                                                                                                                                          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 SetShippingAddressCustomTypeChange + */ + public static SetShippingAddressCustomTypeChange of() { + return new SetShippingAddressCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetShippingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetShippingAddressCustomTypeChange of(final SetShippingAddressCustomTypeChange template) { + SetShippingAddressCustomTypeChangeImpl instance = new SetShippingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetShippingAddressCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetShippingAddressCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetShippingAddressCustomTypeChange deepCopy( + @Nullable final SetShippingAddressCustomTypeChange template) { + if (template == null) { + return null; + } + SetShippingAddressCustomTypeChangeImpl instance = new SetShippingAddressCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + 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 SetShippingAddressCustomTypeChange + * @return builder + */ + public static SetShippingAddressCustomTypeChangeBuilder builder() { + return SetShippingAddressCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetShippingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressCustomTypeChangeBuilder builder(final SetShippingAddressCustomTypeChange template) { + return SetShippingAddressCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetShippingAddressCustomTypeChange(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/SetShippingAddressCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..610e0d98cf3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeBuilder.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; + +/** + * SetShippingAddressCustomTypeChangeBuilder + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingAddressCustomTypeChange setShippingAddressCustomTypeChange = SetShippingAddressCustomTypeChange.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 SetShippingAddressCustomTypeChangeBuilder implements Builder { + + private String change; + + 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 SetShippingAddressCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                          Value before the change.

                                                                                                                                                                          + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetShippingAddressCustomTypeChangeBuilder 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 SetShippingAddressCustomTypeChangeBuilder 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 SetShippingAddressCustomTypeChangeBuilder 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 SetShippingAddressCustomTypeChangeBuilder 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 SetShippingAddressCustomTypeChangeBuilder 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 SetShippingAddressCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                                                                          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 SetShippingAddressCustomTypeChange with checking for non-null required values + * @return SetShippingAddressCustomTypeChange + */ + public SetShippingAddressCustomTypeChange build() { + Objects.requireNonNull(change, SetShippingAddressCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, SetShippingAddressCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetShippingAddressCustomTypeChange.class + ": nextValue is missing"); + return new SetShippingAddressCustomTypeChangeImpl(change, previousValue, nextValue); + } + + /** + * builds SetShippingAddressCustomTypeChange without checking for non-null required values + * @return SetShippingAddressCustomTypeChange + */ + public SetShippingAddressCustomTypeChange buildUnchecked() { + return new SetShippingAddressCustomTypeChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of SetShippingAddressCustomTypeChangeBuilder + * @return builder + */ + public static SetShippingAddressCustomTypeChangeBuilder of() { + return new SetShippingAddressCustomTypeChangeBuilder(); + } + + /** + * create builder for SetShippingAddressCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingAddressCustomTypeChangeBuilder of(final SetShippingAddressCustomTypeChange template) { + SetShippingAddressCustomTypeChangeBuilder builder = new SetShippingAddressCustomTypeChangeBuilder(); + 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/SetShippingAddressCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeImpl.java new file mode 100644 index 00000000000..7c2282cafdf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Address Custom Type update action.

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

                                                                                                                                                                          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 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; + + SetShippingAddressCustomTypeChangeImpl that = (SetShippingAddressCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetShippingAddressCustomTypeChange copyDeep() { + return SetShippingAddressCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChange.java new file mode 100644 index 00000000000..8d618e7f9cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChange.java @@ -0,0 +1,226 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping CustomField update action.

                                                                                                                                                                          + * + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingCustomFieldChange setShippingCustomFieldChange = SetShippingCustomFieldChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .shippingKey("{shippingKey}")
                                                                                                                                                                          + *             .name("{name}")
                                                                                                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetShippingCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetShippingCustomFieldChangeImpl.class) +public interface SetShippingCustomFieldChange extends Change { + + /** + * discriminator value for SetShippingCustomFieldChange + */ + String SET_SHIPPING_CUSTOM_FIELD_CHANGE = "SetShippingCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + * @return shippingKey + */ + @NotNull + @JsonProperty("shippingKey") + public String getShippingKey(); + + /** + *

                                                                                                                                                                          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); + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

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

                                                                                                                                                                          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 SetShippingCustomFieldChange + */ + public static SetShippingCustomFieldChange of() { + return new SetShippingCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetShippingCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetShippingCustomFieldChange of(final SetShippingCustomFieldChange template) { + SetShippingCustomFieldChangeImpl instance = new SetShippingCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setShippingKey(template.getShippingKey()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetShippingCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetShippingCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetShippingCustomFieldChange deepCopy(@Nullable final SetShippingCustomFieldChange template) { + if (template == null) { + return null; + } + SetShippingCustomFieldChangeImpl instance = new SetShippingCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setShippingKey(template.getShippingKey()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetShippingCustomFieldChange + * @return builder + */ + public static SetShippingCustomFieldChangeBuilder builder() { + return SetShippingCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetShippingCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingCustomFieldChangeBuilder builder(final SetShippingCustomFieldChange template) { + return SetShippingCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetShippingCustomFieldChange(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/SetShippingCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..9689b681455 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeBuilder.java @@ -0,0 +1,205 @@ + +package com.commercetools.history.models.change; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SetShippingCustomFieldChangeBuilder + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingCustomFieldChange setShippingCustomFieldChange = SetShippingCustomFieldChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .shippingKey("{shippingKey}")
                                                                                                                                                                          + *             .name("{name}")
                                                                                                                                                                          + *             .customTypeId("{customTypeId}")
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingCustomFieldChangeBuilder implements Builder { + + private String change; + + private String shippingKey; + + 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 SetShippingCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

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

                                                                                                                                                                          Name of the Custom Field.

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

                                                                                                                                                                          id of the referenced Type.

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

                                                                                                                                                                          Value before the change.

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

                                                                                                                                                                          Value after the change.

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

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + * @return shippingKey + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                          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 SetShippingCustomFieldChange with checking for non-null required values + * @return SetShippingCustomFieldChange + */ + public SetShippingCustomFieldChange build() { + Objects.requireNonNull(change, SetShippingCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(shippingKey, SetShippingCustomFieldChange.class + ": shippingKey is missing"); + Objects.requireNonNull(name, SetShippingCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetShippingCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetShippingCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetShippingCustomFieldChange.class + ": nextValue is missing"); + return new SetShippingCustomFieldChangeImpl(change, shippingKey, name, customTypeId, previousValue, nextValue); + } + + /** + * builds SetShippingCustomFieldChange without checking for non-null required values + * @return SetShippingCustomFieldChange + */ + public SetShippingCustomFieldChange buildUnchecked() { + return new SetShippingCustomFieldChangeImpl(change, shippingKey, name, customTypeId, previousValue, nextValue); + } + + /** + * factory method for an instance of SetShippingCustomFieldChangeBuilder + * @return builder + */ + public static SetShippingCustomFieldChangeBuilder of() { + return new SetShippingCustomFieldChangeBuilder(); + } + + /** + * create builder for SetShippingCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingCustomFieldChangeBuilder of(final SetShippingCustomFieldChange template) { + SetShippingCustomFieldChangeBuilder builder = new SetShippingCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.shippingKey = template.getShippingKey(); + 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/SetShippingCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeImpl.java new file mode 100644 index 00000000000..0360f882319 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeImpl.java @@ -0,0 +1,199 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping CustomField update action.

                                                                                                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingCustomFieldChangeImpl implements SetShippingCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private String shippingKey; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetShippingCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("shippingKey") final String shippingKey, @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.shippingKey = shippingKey; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_SHIPPING_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetShippingCustomFieldChangeImpl() { + this.type = SET_SHIPPING_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                          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 setShippingKey(final String shippingKey) { + this.shippingKey = shippingKey; + } + + 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; + + SetShippingCustomFieldChangeImpl that = (SetShippingCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(shippingKey, that.shippingKey) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(shippingKey, that.shippingKey) + .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(shippingKey) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("shippingKey", shippingKey) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetShippingCustomFieldChange copyDeep() { + return SetShippingCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChange.java new file mode 100644 index 00000000000..768931a3288 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChange.java @@ -0,0 +1,197 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Custom Type update action.

                                                                                                                                                                          + * + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingCustomTypeChange setShippingCustomTypeChange = SetShippingCustomTypeChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .shippingKey("{shippingKey}")
                                                                                                                                                                          + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                          + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetShippingCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetShippingCustomTypeChangeImpl.class) +public interface SetShippingCustomTypeChange extends Change { + + /** + * discriminator value for SetShippingCustomTypeChange + */ + String SET_SHIPPING_CUSTOM_TYPE_CHANGE = "SetShippingCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + * @return shippingKey + */ + @NotNull + @JsonProperty("shippingKey") + public String getShippingKey(); + + /** + *

                                                                                                                                                                          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); + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

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

                                                                                                                                                                          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 SetShippingCustomTypeChange + */ + public static SetShippingCustomTypeChange of() { + return new SetShippingCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetShippingCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetShippingCustomTypeChange of(final SetShippingCustomTypeChange template) { + SetShippingCustomTypeChangeImpl instance = new SetShippingCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setShippingKey(template.getShippingKey()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetShippingCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetShippingCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetShippingCustomTypeChange deepCopy(@Nullable final SetShippingCustomTypeChange template) { + if (template == null) { + return null; + } + SetShippingCustomTypeChangeImpl instance = new SetShippingCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setShippingKey(template.getShippingKey()); + 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 SetShippingCustomTypeChange + * @return builder + */ + public static SetShippingCustomTypeChangeBuilder builder() { + return SetShippingCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetShippingCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingCustomTypeChangeBuilder builder(final SetShippingCustomTypeChange template) { + return SetShippingCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetShippingCustomTypeChange(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/SetShippingCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..03d2e68cb31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeBuilder.java @@ -0,0 +1,208 @@ + +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; + +/** + * SetShippingCustomTypeChangeBuilder + *
                                                                                                                                                                          + * Example to create an instance using the builder pattern + *
                                                                                                                                                                          + *
                                                                                                                                                                          
                                                                                                                                                                          + *     SetShippingCustomTypeChange setShippingCustomTypeChange = SetShippingCustomTypeChange.builder()
                                                                                                                                                                          + *             .change("{change}")
                                                                                                                                                                          + *             .shippingKey("{shippingKey}")
                                                                                                                                                                          + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                          + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                          + *             .build()
                                                                                                                                                                          + * 
                                                                                                                                                                          + *
                                                                                                                                                                          + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetShippingCustomTypeChangeBuilder implements Builder { + + private String change; + + private String shippingKey; + + 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 SetShippingCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

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

                                                                                                                                                                          Value before the change.

                                                                                                                                                                          + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetShippingCustomTypeChangeBuilder 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 SetShippingCustomTypeChangeBuilder 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 SetShippingCustomTypeChangeBuilder 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 SetShippingCustomTypeChangeBuilder 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 SetShippingCustomTypeChangeBuilder 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 SetShippingCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + * @return shippingKey + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                          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 SetShippingCustomTypeChange with checking for non-null required values + * @return SetShippingCustomTypeChange + */ + public SetShippingCustomTypeChange build() { + Objects.requireNonNull(change, SetShippingCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(shippingKey, SetShippingCustomTypeChange.class + ": shippingKey is missing"); + Objects.requireNonNull(previousValue, SetShippingCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetShippingCustomTypeChange.class + ": nextValue is missing"); + return new SetShippingCustomTypeChangeImpl(change, shippingKey, previousValue, nextValue); + } + + /** + * builds SetShippingCustomTypeChange without checking for non-null required values + * @return SetShippingCustomTypeChange + */ + public SetShippingCustomTypeChange buildUnchecked() { + return new SetShippingCustomTypeChangeImpl(change, shippingKey, previousValue, nextValue); + } + + /** + * factory method for an instance of SetShippingCustomTypeChangeBuilder + * @return builder + */ + public static SetShippingCustomTypeChangeBuilder of() { + return new SetShippingCustomTypeChangeBuilder(); + } + + /** + * create builder for SetShippingCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetShippingCustomTypeChangeBuilder of(final SetShippingCustomTypeChange template) { + SetShippingCustomTypeChangeBuilder builder = new SetShippingCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.shippingKey = template.getShippingKey(); + 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/SetShippingCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeImpl.java new file mode 100644 index 00000000000..2026062e84d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                          Change triggered by the Set Shipping Custom Type update action.

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

                                                                                                                                                                          shippingKey of the updated Shipping.

                                                                                                                                                                          + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                          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 setShippingKey(final String shippingKey) { + this.shippingKey = shippingKey; + } + + 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; + + SetShippingCustomTypeChangeImpl that = (SetShippingCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(shippingKey, that.shippingKey) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(shippingKey, that.shippingKey) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(shippingKey) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("shippingKey", shippingKey) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetShippingCustomTypeChange copyDeep() { + return SetShippingCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChange.java index d2952cdec81..e2fa67af1a3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.TaxedPrice; +import com.commercetools.history.models.common.TaxedItemPrice; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface SetShippingInfoTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public TaxedPrice getPreviousValue(); + public TaxedItemPrice getPreviousValue(); /** *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          @@ -73,7 +73,7 @@ public interface SetShippingInfoTaxedPriceChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public TaxedPrice getNextValue(); + public TaxedItemPrice getNextValue(); /** * set change @@ -87,14 +87,14 @@ public interface SetShippingInfoTaxedPriceChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final TaxedPrice previousValue); + public void setPreviousValue(final TaxedItemPrice previousValue); /** *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          * @param nextValue value to be set */ - public void setNextValue(final TaxedPrice nextValue); + public void setNextValue(final TaxedItemPrice nextValue); /** * factory method @@ -132,8 +132,8 @@ public static SetShippingInfoTaxedPriceChange deepCopy(@Nullable final SetShippi SetShippingInfoTaxedPriceChangeImpl instance = new SetShippingInfoTaxedPriceChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.TaxedPrice.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.TaxedPrice.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeBuilder.java index 4568dbe1798..b4655454e31 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeBuilder.java @@ -26,9 +26,9 @@ public class SetShippingInfoTaxedPriceChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); return this; } @@ -60,8 +60,8 @@ public SetShippingInfoTaxedPriceChangeBuilder previousValue( */ public SetShippingInfoTaxedPriceChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); return this; } @@ -72,7 +72,7 @@ public SetShippingInfoTaxedPriceChangeBuilder withPreviousValue( */ public SetShippingInfoTaxedPriceChangeBuilder previousValue( - final com.commercetools.history.models.common.TaxedPrice previousValue) { + final com.commercetools.history.models.common.TaxedItemPrice previousValue) { this.previousValue = previousValue; return this; } @@ -84,8 +84,8 @@ public SetShippingInfoTaxedPriceChangeBuilder previousValue( */ public SetShippingInfoTaxedPriceChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); return this; } @@ -96,8 +96,8 @@ public SetShippingInfoTaxedPriceChangeBuilder nextValue( */ public SetShippingInfoTaxedPriceChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedPriceBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); return this; } @@ -108,7 +108,7 @@ public SetShippingInfoTaxedPriceChangeBuilder withNextValue( */ public SetShippingInfoTaxedPriceChangeBuilder nextValue( - final com.commercetools.history.models.common.TaxedPrice nextValue) { + final com.commercetools.history.models.common.TaxedItemPrice nextValue) { this.nextValue = nextValue; return this; } @@ -127,7 +127,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { + public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { return this.previousValue; } @@ -136,7 +136,7 @@ public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.TaxedPrice getNextValue() { + public com.commercetools.history.models.common.TaxedItemPrice getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeImpl.java index 63df22b8112..c943529298a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeImpl.java @@ -26,17 +26,17 @@ public class SetShippingInfoTaxedPriceChangeImpl implements SetShippingInfoTaxed private String change; - private com.commercetools.history.models.common.TaxedPrice previousValue; + private com.commercetools.history.models.common.TaxedItemPrice previousValue; - private com.commercetools.history.models.common.TaxedPrice nextValue; + private com.commercetools.history.models.common.TaxedItemPrice nextValue; /** * create instance with all properties */ @JsonCreator SetShippingInfoTaxedPriceChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedPrice previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedPrice nextValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.TaxedItemPrice previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.TaxedItemPrice nextValue) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; @@ -70,7 +70,7 @@ public String getChange() { *

                                                                                                                                                                          Value before the change.

                                                                                                                                                                          */ - public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { + public com.commercetools.history.models.common.TaxedItemPrice getPreviousValue() { return this.previousValue; } @@ -78,7 +78,7 @@ public com.commercetools.history.models.common.TaxedPrice getPreviousValue() { *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          */ - public com.commercetools.history.models.common.TaxedPrice getNextValue() { + public com.commercetools.history.models.common.TaxedItemPrice getNextValue() { return this.nextValue; } @@ -86,11 +86,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.TaxedPrice previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.TaxedItemPrice previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.TaxedPrice nextValue) { + public void setNextValue(final com.commercetools.history.models.common.TaxedItemPrice nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChange.java index 3d8910d4be7..8198cef9d95 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.Money; +import com.commercetools.history.models.common.ShippingRate; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -64,7 +64,7 @@ public interface SetShippingRateChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public Money getPreviousValue(); + public ShippingRate getPreviousValue(); /** *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          @@ -73,7 +73,7 @@ public interface SetShippingRateChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public Money getNextValue(); + public ShippingRate getNextValue(); /** * set change @@ -87,14 +87,14 @@ public interface SetShippingRateChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final Money previousValue); + public void setPreviousValue(final ShippingRate previousValue); /** *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          * @param nextValue value to be set */ - public void setNextValue(final Money nextValue); + public void setNextValue(final ShippingRate nextValue); /** * factory method @@ -131,8 +131,9 @@ public static SetShippingRateChange deepCopy(@Nullable final SetShippingRateChan } SetShippingRateChangeImpl instance = new SetShippingRateChangeImpl(); instance.setChange(template.getChange()); - instance.setPreviousValue(com.commercetools.history.models.common.Money.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.Money.deepCopy(template.getNextValue())); + instance.setPreviousValue( + com.commercetools.history.models.common.ShippingRate.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.ShippingRate.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeBuilder.java index fd151e7ef75..4370f79e8ba 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeBuilder.java @@ -26,9 +26,9 @@ public class SetShippingRateChangeBuilder implements Builder builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()).build(); return this; } @@ -60,8 +60,8 @@ public SetShippingRateChangeBuilder previousValue( */ public SetShippingRateChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()); return this; } @@ -72,7 +72,7 @@ public SetShippingRateChangeBuilder withPreviousValue( */ public SetShippingRateChangeBuilder previousValue( - final com.commercetools.history.models.common.Money previousValue) { + final com.commercetools.history.models.common.ShippingRate previousValue) { this.previousValue = previousValue; return this; } @@ -84,8 +84,8 @@ public SetShippingRateChangeBuilder previousValue( */ public SetShippingRateChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()).build(); return this; } @@ -96,8 +96,8 @@ public SetShippingRateChangeBuilder nextValue( */ public SetShippingRateChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()); return this; } @@ -107,7 +107,8 @@ public SetShippingRateChangeBuilder withNextValue( * @return Builder */ - public SetShippingRateChangeBuilder nextValue(final com.commercetools.history.models.common.Money nextValue) { + public SetShippingRateChangeBuilder nextValue( + final com.commercetools.history.models.common.ShippingRate nextValue) { this.nextValue = nextValue; return this; } @@ -126,7 +127,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.Money getPreviousValue() { + public com.commercetools.history.models.common.ShippingRate getPreviousValue() { return this.previousValue; } @@ -135,7 +136,7 @@ public com.commercetools.history.models.common.Money getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.Money getNextValue() { + public com.commercetools.history.models.common.ShippingRate getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeImpl.java index 4f44769fd94..deddea6ce5a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetShippingRateChangeImpl.java @@ -26,17 +26,17 @@ public class SetShippingRateChangeImpl implements SetShippingRateChange, ModelBa private String change; - private com.commercetools.history.models.common.Money previousValue; + private com.commercetools.history.models.common.ShippingRate previousValue; - private com.commercetools.history.models.common.Money nextValue; + private com.commercetools.history.models.common.ShippingRate nextValue; /** * create instance with all properties */ @JsonCreator SetShippingRateChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Money previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Money nextValue) { + @JsonProperty("previousValue") final com.commercetools.history.models.common.ShippingRate previousValue, + @JsonProperty("nextValue") final com.commercetools.history.models.common.ShippingRate nextValue) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; @@ -70,7 +70,7 @@ public String getChange() { *

                                                                                                                                                                          Value before the change.

                                                                                                                                                                          */ - public com.commercetools.history.models.common.Money getPreviousValue() { + public com.commercetools.history.models.common.ShippingRate getPreviousValue() { return this.previousValue; } @@ -78,7 +78,7 @@ public com.commercetools.history.models.common.Money getPreviousValue() { *

                                                                                                                                                                          Value after the change.

                                                                                                                                                                          */ - public com.commercetools.history.models.common.Money getNextValue() { + public com.commercetools.history.models.common.ShippingRate getNextValue() { return this.nextValue; } @@ -86,11 +86,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.Money previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.ShippingRate previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.Money nextValue) { + public void setNextValue(final com.commercetools.history.models.common.ShippingRate nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChange.java index e3df7a5ba1b..9d8681ed932 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChange.java @@ -26,6 +26,7 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -73,6 +74,7 @@ public interface SetSkuChange extends Change { public String getNextValue(); /** + *

                                                                                                                                                                          Product data that was updated.

                                                                                                                                                                          *
                                                                                                                                                                            *
                                                                                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                          • *
                                                                                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                                                                                          • @@ -83,6 +85,15 @@ public interface SetSkuChange extends Change { @JsonProperty("catalogData") public String getCatalogData(); + /** + *

                                                                                                                                                                            Identifier of the updated Product Variant.

                                                                                                                                                                            + *

                                                                                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                            + * @return variant + */ + @NotNull + @JsonProperty("variant") + public String getVariant(); + /** * set change * @param change value to be set @@ -105,6 +116,7 @@ public interface SetSkuChange extends Change { public void setNextValue(final String nextValue); /** + *

                                                                                                                                                                            Product data that was updated.

                                                                                                                                                                            *
                                                                                                                                                                              *
                                                                                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                            • *
                                                                                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                                                                                            • @@ -114,6 +126,14 @@ public interface SetSkuChange extends Change { public void setCatalogData(final String catalogData); + /** + *

                                                                                                                                                                              Identifier of the updated Product Variant.

                                                                                                                                                                              + *

                                                                                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                              + * @param variant value to be set + */ + + public void setVariant(final String variant); + /** * factory method * @return instance of SetSkuChange @@ -133,6 +153,7 @@ public static SetSkuChange of(final SetSkuChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } @@ -153,6 +174,7 @@ public static SetSkuChange deepCopy(@Nullable final SetSkuChange template) { instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setCatalogData(template.getCatalogData()); + instance.setVariant(template.getVariant()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeBuilder.java index 4658bce98db..a84289dfa7e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeBuilder.java @@ -17,6 +17,7 @@ * .previousValue("{previousValue}") * .nextValue("{nextValue}") * .catalogData("{catalogData}") + * .variant("{variant}") * .build() * * @@ -32,6 +33,8 @@ public class SetSkuChangeBuilder implements Builder { private String catalogData; + private String variant; + /** * set the value to the change * @param change value to be set @@ -66,6 +69,7 @@ public SetSkuChangeBuilder nextValue(final String nextValue) { } /** + *

                                                                                                                                                                              Product data that was updated.

                                                                                                                                                                              *
                                                                                                                                                                                *
                                                                                                                                                                              • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                              • *
                                                                                                                                                                              • current, if the current ProductCatalogData was updated.
                                                                                                                                                                              • @@ -79,6 +83,18 @@ public SetSkuChangeBuilder catalogData(final String catalogData) { return this; } + /** + *

                                                                                                                                                                                Identifier of the updated Product Variant.

                                                                                                                                                                                + *

                                                                                                                                                                                This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                + * @param variant value to be set + * @return Builder + */ + + public SetSkuChangeBuilder variant(final String variant) { + this.variant = variant; + return this; + } + /** * value of change} * @return change @@ -107,6 +123,7 @@ public String getNextValue() { } /** + *

                                                                                                                                                                                Product data that was updated.

                                                                                                                                                                                *
                                                                                                                                                                                  *
                                                                                                                                                                                • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                • *
                                                                                                                                                                                • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                • @@ -118,6 +135,16 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                                                  Identifier of the updated Product Variant.

                                                                                                                                                                                  + *

                                                                                                                                                                                  This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                  + * @return variant + */ + + public String getVariant() { + return this.variant; + } + /** * builds SetSkuChange with checking for non-null required values * @return SetSkuChange @@ -127,7 +154,8 @@ public SetSkuChange build() { Objects.requireNonNull(previousValue, SetSkuChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetSkuChange.class + ": nextValue is missing"); Objects.requireNonNull(catalogData, SetSkuChange.class + ": catalogData is missing"); - return new SetSkuChangeImpl(change, previousValue, nextValue, catalogData); + Objects.requireNonNull(variant, SetSkuChange.class + ": variant is missing"); + return new SetSkuChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -135,7 +163,7 @@ public SetSkuChange build() { * @return SetSkuChange */ public SetSkuChange buildUnchecked() { - return new SetSkuChangeImpl(change, previousValue, nextValue, catalogData); + return new SetSkuChangeImpl(change, previousValue, nextValue, catalogData, variant); } /** @@ -157,6 +185,7 @@ public static SetSkuChangeBuilder of(final SetSkuChange template) { builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.catalogData = template.getCatalogData(); + builder.variant = template.getVariant(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeImpl.java index d64ef984ac3..2cfa2f22018 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSkuChangeImpl.java @@ -32,17 +32,21 @@ public class SetSkuChangeImpl implements SetSkuChange, ModelBase { private String catalogData; + private String variant; + /** * create instance with all properties */ @JsonCreator SetSkuChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final String previousValue, - @JsonProperty("nextValue") final String nextValue, @JsonProperty("catalogData") final String catalogData) { + @JsonProperty("nextValue") final String nextValue, @JsonProperty("catalogData") final String catalogData, + @JsonProperty("variant") final String variant) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.catalogData = catalogData; + this.variant = variant; this.type = SET_SKU_CHANGE; } @@ -86,6 +90,7 @@ public String getNextValue() { } /** + *

                                                                                                                                                                                  Product data that was updated.

                                                                                                                                                                                  *
                                                                                                                                                                                    *
                                                                                                                                                                                  • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                  • *
                                                                                                                                                                                  • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                  • @@ -96,6 +101,15 @@ public String getCatalogData() { return this.catalogData; } + /** + *

                                                                                                                                                                                    Identifier of the updated Product Variant.

                                                                                                                                                                                    + *

                                                                                                                                                                                    This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                    + */ + + public String getVariant() { + return this.variant; + } + public void setChange(final String change) { this.change = change; } @@ -112,6 +126,10 @@ public void setCatalogData(final String catalogData) { this.catalogData = catalogData; } + public void setVariant(final String variant) { + this.variant = variant; + } + @Override public boolean equals(Object o) { if (this == o) @@ -127,11 +145,13 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(catalogData, that.catalogData) + .append(variant, that.variant) .isEquals(); } @@ -142,6 +162,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(catalogData) + .append(variant) .toHashCode(); } @@ -152,6 +173,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("catalogData", catalogData) + .append("variant", variant) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChange.java index b56dce5280f..29aaa409899 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChange.java @@ -26,6 +26,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -72,6 +74,22 @@ public interface SetStateRolesChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + @NotNull + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + @NotNull + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -109,6 +127,36 @@ public interface SetStateRolesChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final StateRoleEnum... addedItems); + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final StateRoleEnum... removedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetStateRolesChange @@ -127,6 +175,8 @@ public static SetStateRolesChange of(final SetStateRolesChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -146,6 +196,8 @@ public static SetStateRolesChange deepCopy(@Nullable final SetStateRolesChange t instance.setChange(template.getChange()); instance.setPreviousValue(Optional.ofNullable(template.getPreviousValue()).map(ArrayList::new).orElse(null)); instance.setNextValue(Optional.ofNullable(template.getNextValue()).map(ArrayList::new).orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()).map(ArrayList::new).orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeBuilder.java index 9f31fd2d558..cf8c0b1b20f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeBuilder.java @@ -16,6 +16,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -29,6 +31,10 @@ public class SetStateRolesChangeBuilder implements Builder private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -118,6 +124,84 @@ public SetStateRolesChangeBuilder plusNextValue( return this; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder addedItems( + final com.commercetools.history.models.common.StateRoleEnum... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.StateRoleEnum... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder removedItems( + final com.commercetools.history.models.common.StateRoleEnum... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetStateRolesChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.StateRoleEnum... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + /** * value of change} * @return change @@ -145,6 +229,24 @@ public java.util.List get return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetStateRolesChange with checking for non-null required values * @return SetStateRolesChange @@ -153,7 +255,9 @@ public SetStateRolesChange build() { Objects.requireNonNull(change, SetStateRolesChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetStateRolesChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetStateRolesChange.class + ": nextValue is missing"); - return new SetStateRolesChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetStateRolesChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetStateRolesChange.class + ": removedItems is missing"); + return new SetStateRolesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -161,7 +265,7 @@ public SetStateRolesChange build() { * @return SetStateRolesChange */ public SetStateRolesChange buildUnchecked() { - return new SetStateRolesChangeImpl(change, previousValue, nextValue); + return new SetStateRolesChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -182,6 +286,8 @@ public static SetStateRolesChangeBuilder of(final SetStateRolesChange template) builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeImpl.java index 8a50165cf88..8d811a7d643 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStateRolesChangeImpl.java @@ -30,16 +30,24 @@ public class SetStateRolesChangeImpl implements SetStateRolesChange, ModelBase { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetStateRolesChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_STATE_ROLES_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List get return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,23 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.StateRoleEnum... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +158,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +175,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +186,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChange.java index eb9acd69a78..27cb891096f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChange.java @@ -7,7 +7,7 @@ import javax.annotation.Nullable; -import com.commercetools.history.models.common.Reference; +import com.commercetools.history.models.common.KeyReference; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -68,7 +68,7 @@ public interface SetStoreChange extends Change { @NotNull @Valid @JsonProperty("previousValue") - public Reference getPreviousValue(); + public KeyReference getPreviousValue(); /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    @@ -77,7 +77,7 @@ public interface SetStoreChange extends Change { @NotNull @Valid @JsonProperty("nextValue") - public Reference getNextValue(); + public KeyReference getNextValue(); /** * set change @@ -91,14 +91,14 @@ public interface SetStoreChange extends Change { * @param previousValue value to be set */ - public void setPreviousValue(final Reference previousValue); + public void setPreviousValue(final KeyReference previousValue); /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    * @param nextValue value to be set */ - public void setNextValue(final Reference nextValue); + public void setNextValue(final KeyReference nextValue); /** * factory method @@ -136,8 +136,8 @@ public static SetStoreChange deepCopy(@Nullable final SetStoreChange template) { SetStoreChangeImpl instance = new SetStoreChangeImpl(); instance.setChange(template.getChange()); instance.setPreviousValue( - com.commercetools.history.models.common.Reference.deepCopy(template.getPreviousValue())); - instance.setNextValue(com.commercetools.history.models.common.Reference.deepCopy(template.getNextValue())); + com.commercetools.history.models.common.KeyReference.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.KeyReference.deepCopy(template.getNextValue())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeBuilder.java index 053612c94f0..fd005fdf317 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeBuilder.java @@ -26,9 +26,9 @@ public class SetStoreChangeBuilder implements Builder { private String change; - private com.commercetools.history.models.common.Reference previousValue; + private com.commercetools.history.models.common.KeyReference previousValue; - private com.commercetools.history.models.common.Reference nextValue; + private com.commercetools.history.models.common.KeyReference nextValue; /** * set the value to the change @@ -43,13 +43,13 @@ public SetStoreChangeBuilder change(final String change) { /** *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetStoreChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.KeyReference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,32 +59,20 @@ public SetStoreChangeBuilder previousValue( * @return Builder */ - public SetStoreChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - - public SetStoreChangeBuilder previousValue(final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + public SetStoreChangeBuilder previousValue( + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public SetStoreChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetStoreChangeBuilder nextValue(final com.commercetools.history.models.common.KeyReference nextValue) { + this.nextValue = nextValue; return this; } @@ -94,20 +82,9 @@ public SetStoreChangeBuilder nextValue( * @return Builder */ - public SetStoreChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetStoreChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public SetStoreChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); return this; } @@ -125,7 +102,7 @@ public String getChange() { * @return previousValue */ - public com.commercetools.history.models.common.Reference getPreviousValue() { + public com.commercetools.history.models.common.KeyReference getPreviousValue() { return this.previousValue; } @@ -134,7 +111,7 @@ public com.commercetools.history.models.common.Reference getPreviousValue() { * @return nextValue */ - public com.commercetools.history.models.common.Reference getNextValue() { + public com.commercetools.history.models.common.KeyReference getNextValue() { return this.nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeImpl.java index fa5cad17640..9cd5bf22909 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoreChangeImpl.java @@ -30,17 +30,17 @@ public class SetStoreChangeImpl implements SetStoreChange, ModelBase { private String change; - private com.commercetools.history.models.common.Reference previousValue; + private com.commercetools.history.models.common.KeyReference previousValue; - private com.commercetools.history.models.common.Reference nextValue; + private com.commercetools.history.models.common.KeyReference nextValue; /** * create instance with all properties */ @JsonCreator SetStoreChangeImpl(@JsonProperty("change") final String change, - @JsonProperty("previousValue") final com.commercetools.history.models.common.Reference previousValue, - @JsonProperty("nextValue") final com.commercetools.history.models.common.Reference nextValue) { + @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; @@ -74,7 +74,7 @@ public String getChange() { *

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    */ - public com.commercetools.history.models.common.Reference getNextValue() { + public com.commercetools.history.models.common.KeyReference getNextValue() { return this.nextValue; } @@ -90,11 +90,11 @@ public void setChange(final String change) { this.change = change; } - public void setPreviousValue(final com.commercetools.history.models.common.Reference previousValue) { + public void setPreviousValue(final com.commercetools.history.models.common.KeyReference previousValue) { this.previousValue = previousValue; } - public void setNextValue(final com.commercetools.history.models.common.Reference nextValue) { + public void setNextValue(final com.commercetools.history.models.common.KeyReference nextValue) { this.nextValue = nextValue; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChange.java index eb86d52c08d..6c4eb420b47 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChange.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; +import com.commercetools.history.models.common.KeyReference; import com.commercetools.history.models.common.Reference; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -28,6 +29,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +79,24 @@ public interface SetStoresChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +134,36 @@ public interface SetStoresChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final KeyReference... addedItems); + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final KeyReference... removedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetStoresChange @@ -131,6 +182,8 @@ public static SetStoresChange of(final SetStoresChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +211,16 @@ public static SetStoresChange deepCopy(@Nullable final SetStoresChange template) .map(com.commercetools.history.models.common.Reference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.KeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeBuilder.java index 1e53cb2b739..fab43e800ab 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetStoresChangeBuilder implements Builder { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -87,7 +93,7 @@ public SetStoresChangeBuilder plusPreviousValue( */ public SetStoresChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -102,34 +108,12 @@ public SetStoresChangeBuilder plusPreviousValue( */ public SetStoresChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetStoresChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetStoresChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    * @param nextValue value to be set @@ -174,7 +158,7 @@ public SetStoresChangeBuilder plusNextValue(final com.commercetools.history.mode */ public SetStoresChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -189,32 +173,143 @@ public SetStoresChangeBuilder plusNextValue( */ public SetStoresChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set * @return Builder */ - public SetStoresChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetStoresChangeBuilder addedItems(final com.commercetools.history.models.common.KeyReference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetStoresChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetStoresChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.KeyReference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetStoresChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetStoresChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetStoresChangeBuilder removedItems( + final com.commercetools.history.models.common.KeyReference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetStoresChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set * @return Builder */ - public SetStoresChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetStoresChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.KeyReference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetStoresChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetStoresChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); + return this; } /** @@ -244,6 +339,24 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetStoresChange with checking for non-null required values * @return SetStoresChange @@ -252,7 +365,9 @@ public SetStoresChange build() { Objects.requireNonNull(change, SetStoresChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetStoresChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetStoresChange.class + ": nextValue is missing"); - return new SetStoresChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetStoresChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetStoresChange.class + ": removedItems is missing"); + return new SetStoresChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -260,7 +375,7 @@ public SetStoresChange build() { * @return SetStoresChange */ public SetStoresChange buildUnchecked() { - return new SetStoresChangeImpl(change, previousValue, nextValue); + return new SetStoresChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -281,6 +396,8 @@ public static SetStoresChangeBuilder of(final SetStoresChange template) { builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeImpl.java index c59119559ca..541c22ccb8d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetStoresChangeImpl.java @@ -30,16 +30,24 @@ public class SetStoresChangeImpl implements SetStoresChange, ModelBase { private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetStoresChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_STORES_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,23 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.KeyReference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +158,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +175,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +186,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelChangeBuilder.java index 6216ecdb9d0..7c1f625419e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelChangeBuilder.java @@ -43,13 +43,13 @@ public SetSupplyChannelChangeBuilder change(final String change) { /** *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetSupplyChannelChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public SetSupplyChannelChangeBuilder previousValue( * @return Builder */ - public SetSupplyChannelChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - public SetSupplyChannelChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public SetSupplyChannelChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetSupplyChannelChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public SetSupplyChannelChangeBuilder nextValue( * @return Builder */ - public SetSupplyChannelChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetSupplyChannelChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public SetSupplyChannelChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChange.java index 4cf7f33b2c6..24885e9e471 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChange.java @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetSupplyChannelsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetSupplyChannelsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reference... addedItems); + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reference... removedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetSupplyChannelsChange @@ -131,6 +181,8 @@ public static SetSupplyChannelsChange of(final SetSupplyChannelsChange template) instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetSupplyChannelsChange deepCopy(@Nullable final SetSupplyChannels .map(com.commercetools.history.models.common.Reference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeBuilder.java index 7585038a96f..f307ceb2531 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetSupplyChannelsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -87,7 +93,7 @@ public SetSupplyChannelsChangeBuilder plusPreviousValue( */ public SetSupplyChannelsChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -102,34 +108,12 @@ public SetSupplyChannelsChangeBuilder plusPreviousValue( */ public SetSupplyChannelsChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetSupplyChannelsChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetSupplyChannelsChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    * @param nextValue value to be set @@ -176,7 +160,7 @@ public SetSupplyChannelsChangeBuilder plusNextValue( */ public SetSupplyChannelsChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -191,32 +175,144 @@ public SetSupplyChannelsChangeBuilder plusNextValue( */ public SetSupplyChannelsChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set * @return Builder */ - public SetSupplyChannelsChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetSupplyChannelsChangeBuilder addedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set * @return Builder */ - public SetSupplyChannelsChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetSupplyChannelsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetSupplyChannelsChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; } /** @@ -246,6 +342,24 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetSupplyChannelsChange with checking for non-null required values * @return SetSupplyChannelsChange @@ -254,7 +368,9 @@ public SetSupplyChannelsChange build() { Objects.requireNonNull(change, SetSupplyChannelsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetSupplyChannelsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetSupplyChannelsChange.class + ": nextValue is missing"); - return new SetSupplyChannelsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetSupplyChannelsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetSupplyChannelsChange.class + ": removedItems is missing"); + return new SetSupplyChannelsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -262,7 +378,7 @@ public SetSupplyChannelsChange build() { * @return SetSupplyChannelsChange */ public SetSupplyChannelsChange buildUnchecked() { - return new SetSupplyChannelsChangeImpl(change, previousValue, nextValue); + return new SetSupplyChannelsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -283,6 +399,8 @@ public static SetSupplyChannelsChangeBuilder of(final SetSupplyChannelsChange te builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeImpl.java index 18ab3536496..35de594c0ba 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeImpl.java @@ -30,16 +30,24 @@ public class SetSupplyChannelsChangeImpl implements SetSupplyChannelsChange, Mod private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetSupplyChannelsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_SUPPLY_CHANNELS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,22 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +157,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +174,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +185,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTargetChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTargetChangeBuilder.java index fd4f4dd9b6b..ed92c8f3046 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTargetChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTargetChangeBuilder.java @@ -43,13 +43,12 @@ public SetTargetChangeBuilder change(final String change) { /** *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ - public SetTargetChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetTargetChangeBuilder previousValue(final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,20 +58,20 @@ public SetTargetChangeBuilder previousValue( * @return Builder */ - public SetTargetChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public SetTargetChangeBuilder previousValue( + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param previousValue value to be set + *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    + * @param nextValue value to be set * @return Builder */ - public SetTargetChangeBuilder previousValue(final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + public SetTargetChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -83,34 +82,11 @@ public SetTargetChangeBuilder previousValue(final com.commercetools.history.mode */ public SetTargetChangeBuilder nextValue( - Function builder) { + Function> builder) { this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } - /** - *

                                                                                                                                                                                    Value after the change.

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

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetTargetChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; - return this; - } - /** * value of change} * @return change diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTaxCategoryChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTaxCategoryChangeBuilder.java index fa4785f5809..3fd80cddc13 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTaxCategoryChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTaxCategoryChangeBuilder.java @@ -43,13 +43,13 @@ public SetTaxCategoryChangeBuilder change(final String change) { /** *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public SetTaxCategoryChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public SetTaxCategoryChangeBuilder previousValue( * @return Builder */ - public SetTaxCategoryChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param previousValue value to be set - * @return Builder - */ - public SetTaxCategoryChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public SetTaxCategoryChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetTaxCategoryChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public SetTaxCategoryChangeBuilder nextValue( * @return Builder */ - public SetTaxCategoryChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param nextValue value to be set - * @return Builder - */ - - public SetTaxCategoryChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public SetTaxCategoryChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChange.java new file mode 100644 index 00000000000..f6f7fc1a66f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChange.java @@ -0,0 +1,230 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.change_value.TransactionChangeValue; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Transaction CustomField update action.

                                                                                                                                                                                    + * + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetTransactionCustomFieldChange setTransactionCustomFieldChange = SetTransactionCustomFieldChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .transaction(transactionBuilder -> transactionBuilder)
                                                                                                                                                                                    + *             .name("{name}")
                                                                                                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetTransactionCustomFieldChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetTransactionCustomFieldChangeImpl.class) +public interface SetTransactionCustomFieldChange extends Change { + + /** + * discriminator value for SetTransactionCustomFieldChange + */ + String SET_TRANSACTION_CUSTOM_FIELD_CHANGE = "SetTransactionCustomFieldChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @return transaction + */ + @NotNull + @Valid + @JsonProperty("transaction") + public TransactionChangeValue getTransaction(); + + /** + *

                                                                                                                                                                                    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); + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param transaction value to be set + */ + + public void setTransaction(final TransactionChangeValue transaction); + + /** + *

                                                                                                                                                                                    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 SetTransactionCustomFieldChange + */ + public static SetTransactionCustomFieldChange of() { + return new SetTransactionCustomFieldChangeImpl(); + } + + /** + * factory method to create a shallow copy SetTransactionCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + public static SetTransactionCustomFieldChange of(final SetTransactionCustomFieldChange template) { + SetTransactionCustomFieldChangeImpl instance = new SetTransactionCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setTransaction(template.getTransaction()); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetTransactionCustomFieldChange copyDeep(); + + /** + * factory method to create a deep copy of SetTransactionCustomFieldChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetTransactionCustomFieldChange deepCopy(@Nullable final SetTransactionCustomFieldChange template) { + if (template == null) { + return null; + } + SetTransactionCustomFieldChangeImpl instance = new SetTransactionCustomFieldChangeImpl(); + instance.setChange(template.getChange()); + instance.setTransaction( + com.commercetools.history.models.change_value.TransactionChangeValue.deepCopy(template.getTransaction())); + instance.setName(template.getName()); + instance.setCustomTypeId(template.getCustomTypeId()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetTransactionCustomFieldChange + * @return builder + */ + public static SetTransactionCustomFieldChangeBuilder builder() { + return SetTransactionCustomFieldChangeBuilder.of(); + } + + /** + * create builder for SetTransactionCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTransactionCustomFieldChangeBuilder builder(final SetTransactionCustomFieldChange template) { + return SetTransactionCustomFieldChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetTransactionCustomFieldChange(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/SetTransactionCustomFieldChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeBuilder.java new file mode 100644 index 00000000000..ebed6539dd0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeBuilder.java @@ -0,0 +1,236 @@ + +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; + +/** + * SetTransactionCustomFieldChangeBuilder + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetTransactionCustomFieldChange setTransactionCustomFieldChange = SetTransactionCustomFieldChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .transaction(transactionBuilder -> transactionBuilder)
                                                                                                                                                                                    + *             .name("{name}")
                                                                                                                                                                                    + *             .customTypeId("{customTypeId}")
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetTransactionCustomFieldChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.TransactionChangeValue transaction; + + 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 SetTransactionCustomFieldChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param builder function to build the transaction value + * @return Builder + */ + + public SetTransactionCustomFieldChangeBuilder transaction( + Function builder) { + this.transaction = builder + .apply(com.commercetools.history.models.change_value.TransactionChangeValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param builder function to build the transaction value + * @return Builder + */ + + public SetTransactionCustomFieldChangeBuilder withTransaction( + Function builder) { + this.transaction = builder + .apply(com.commercetools.history.models.change_value.TransactionChangeValueBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param transaction value to be set + * @return Builder + */ + + public SetTransactionCustomFieldChangeBuilder transaction( + final com.commercetools.history.models.change_value.TransactionChangeValue transaction) { + this.transaction = transaction; + return this; + } + + /** + *

                                                                                                                                                                                    Name of the Custom Field.

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

                                                                                                                                                                                    id of the referenced Type.

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

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

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

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @return transaction + */ + + public com.commercetools.history.models.change_value.TransactionChangeValue getTransaction() { + return this.transaction; + } + + /** + *

                                                                                                                                                                                    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 SetTransactionCustomFieldChange with checking for non-null required values + * @return SetTransactionCustomFieldChange + */ + public SetTransactionCustomFieldChange build() { + Objects.requireNonNull(change, SetTransactionCustomFieldChange.class + ": change is missing"); + Objects.requireNonNull(transaction, SetTransactionCustomFieldChange.class + ": transaction is missing"); + Objects.requireNonNull(name, SetTransactionCustomFieldChange.class + ": name is missing"); + Objects.requireNonNull(customTypeId, SetTransactionCustomFieldChange.class + ": customTypeId is missing"); + Objects.requireNonNull(previousValue, SetTransactionCustomFieldChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetTransactionCustomFieldChange.class + ": nextValue is missing"); + return new SetTransactionCustomFieldChangeImpl(change, transaction, name, customTypeId, previousValue, + nextValue); + } + + /** + * builds SetTransactionCustomFieldChange without checking for non-null required values + * @return SetTransactionCustomFieldChange + */ + public SetTransactionCustomFieldChange buildUnchecked() { + return new SetTransactionCustomFieldChangeImpl(change, transaction, name, customTypeId, previousValue, + nextValue); + } + + /** + * factory method for an instance of SetTransactionCustomFieldChangeBuilder + * @return builder + */ + public static SetTransactionCustomFieldChangeBuilder of() { + return new SetTransactionCustomFieldChangeBuilder(); + } + + /** + * create builder for SetTransactionCustomFieldChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTransactionCustomFieldChangeBuilder of(final SetTransactionCustomFieldChange template) { + SetTransactionCustomFieldChangeBuilder builder = new SetTransactionCustomFieldChangeBuilder(); + builder.change = template.getChange(); + builder.transaction = template.getTransaction(); + 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/SetTransactionCustomFieldChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeImpl.java new file mode 100644 index 00000000000..7e72e650942 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeImpl.java @@ -0,0 +1,199 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Transaction CustomField update action.

                                                                                                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetTransactionCustomFieldChangeImpl implements SetTransactionCustomFieldChange, ModelBase { + + private String type; + + private String change; + + private com.commercetools.history.models.change_value.TransactionChangeValue transaction; + + private String name; + + private String customTypeId; + + private java.lang.Object previousValue; + + private java.lang.Object nextValue; + + /** + * create instance with all properties + */ + @JsonCreator + SetTransactionCustomFieldChangeImpl(@JsonProperty("change") final String change, + @JsonProperty("transaction") final com.commercetools.history.models.change_value.TransactionChangeValue transaction, + @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.transaction = transaction; + this.name = name; + this.customTypeId = customTypeId; + this.previousValue = previousValue; + this.nextValue = nextValue; + this.type = SET_TRANSACTION_CUSTOM_FIELD_CHANGE; + } + + /** + * create empty instance + */ + public SetTransactionCustomFieldChangeImpl() { + this.type = SET_TRANSACTION_CUSTOM_FIELD_CHANGE; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + * + */ + + public String getChange() { + return this.change; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + */ + + public com.commercetools.history.models.change_value.TransactionChangeValue getTransaction() { + return this.transaction; + } + + /** + *

                                                                                                                                                                                    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 setTransaction(final com.commercetools.history.models.change_value.TransactionChangeValue transaction) { + this.transaction = transaction; + } + + 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; + + SetTransactionCustomFieldChangeImpl that = (SetTransactionCustomFieldChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(transaction, that.transaction) + .append(name, that.name) + .append(customTypeId, that.customTypeId) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(transaction, that.transaction) + .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(transaction) + .append(name) + .append(customTypeId) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("transaction", transaction) + .append("name", name) + .append("customTypeId", customTypeId) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetTransactionCustomFieldChange copyDeep() { + return SetTransactionCustomFieldChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChange.java new file mode 100644 index 00000000000..d45f0edfac4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChange.java @@ -0,0 +1,200 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.change_value.TransactionChangeValue; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Transaction Custom Type update action.

                                                                                                                                                                                    + * + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetTransactionCustomTypeChange setTransactionCustomTypeChange = SetTransactionCustomTypeChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .transaction(transactionBuilder -> transactionBuilder)
                                                                                                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetTransactionCustomTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetTransactionCustomTypeChangeImpl.class) +public interface SetTransactionCustomTypeChange extends Change { + + /** + * discriminator value for SetTransactionCustomTypeChange + */ + String SET_TRANSACTION_CUSTOM_TYPE_CHANGE = "SetTransactionCustomTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @return transaction + */ + @NotNull + @Valid + @JsonProperty("transaction") + public TransactionChangeValue getTransaction(); + + /** + *

                                                                                                                                                                                    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); + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param transaction value to be set + */ + + public void setTransaction(final TransactionChangeValue transaction); + + /** + *

                                                                                                                                                                                    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 SetTransactionCustomTypeChange + */ + public static SetTransactionCustomTypeChange of() { + return new SetTransactionCustomTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetTransactionCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetTransactionCustomTypeChange of(final SetTransactionCustomTypeChange template) { + SetTransactionCustomTypeChangeImpl instance = new SetTransactionCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setTransaction(template.getTransaction()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetTransactionCustomTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetTransactionCustomTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetTransactionCustomTypeChange deepCopy(@Nullable final SetTransactionCustomTypeChange template) { + if (template == null) { + return null; + } + SetTransactionCustomTypeChangeImpl instance = new SetTransactionCustomTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setTransaction( + com.commercetools.history.models.change_value.TransactionChangeValue.deepCopy(template.getTransaction())); + 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 SetTransactionCustomTypeChange + * @return builder + */ + public static SetTransactionCustomTypeChangeBuilder builder() { + return SetTransactionCustomTypeChangeBuilder.of(); + } + + /** + * create builder for SetTransactionCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTransactionCustomTypeChangeBuilder builder(final SetTransactionCustomTypeChange template) { + return SetTransactionCustomTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetTransactionCustomTypeChange(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/SetTransactionCustomTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeBuilder.java new file mode 100644 index 00000000000..4c208a26841 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeBuilder.java @@ -0,0 +1,236 @@ + +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; + +/** + * SetTransactionCustomTypeChangeBuilder + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetTransactionCustomTypeChange setTransactionCustomTypeChange = SetTransactionCustomTypeChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .transaction(transactionBuilder -> transactionBuilder)
                                                                                                                                                                                    + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                                    + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetTransactionCustomTypeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.change_value.TransactionChangeValue transaction; + + 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 SetTransactionCustomTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param builder function to build the transaction value + * @return Builder + */ + + public SetTransactionCustomTypeChangeBuilder transaction( + Function builder) { + this.transaction = builder + .apply(com.commercetools.history.models.change_value.TransactionChangeValueBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param builder function to build the transaction value + * @return Builder + */ + + public SetTransactionCustomTypeChangeBuilder withTransaction( + Function builder) { + this.transaction = builder + .apply(com.commercetools.history.models.change_value.TransactionChangeValueBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @param transaction value to be set + * @return Builder + */ + + public SetTransactionCustomTypeChangeBuilder transaction( + final com.commercetools.history.models.change_value.TransactionChangeValue transaction) { + this.transaction = transaction; + return this; + } + + /** + *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    + * @param builder function to build the previousValue value + * @return Builder + */ + + public SetTransactionCustomTypeChangeBuilder 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 SetTransactionCustomTypeChangeBuilder 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 SetTransactionCustomTypeChangeBuilder 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 SetTransactionCustomTypeChangeBuilder 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 SetTransactionCustomTypeChangeBuilder 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 SetTransactionCustomTypeChangeBuilder 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; + } + + /** + *

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + * @return transaction + */ + + public com.commercetools.history.models.change_value.TransactionChangeValue getTransaction() { + return this.transaction; + } + + /** + *

                                                                                                                                                                                    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 SetTransactionCustomTypeChange with checking for non-null required values + * @return SetTransactionCustomTypeChange + */ + public SetTransactionCustomTypeChange build() { + Objects.requireNonNull(change, SetTransactionCustomTypeChange.class + ": change is missing"); + Objects.requireNonNull(transaction, SetTransactionCustomTypeChange.class + ": transaction is missing"); + Objects.requireNonNull(previousValue, SetTransactionCustomTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetTransactionCustomTypeChange.class + ": nextValue is missing"); + return new SetTransactionCustomTypeChangeImpl(change, transaction, previousValue, nextValue); + } + + /** + * builds SetTransactionCustomTypeChange without checking for non-null required values + * @return SetTransactionCustomTypeChange + */ + public SetTransactionCustomTypeChange buildUnchecked() { + return new SetTransactionCustomTypeChangeImpl(change, transaction, previousValue, nextValue); + } + + /** + * factory method for an instance of SetTransactionCustomTypeChangeBuilder + * @return builder + */ + public static SetTransactionCustomTypeChangeBuilder of() { + return new SetTransactionCustomTypeChangeBuilder(); + } + + /** + * create builder for SetTransactionCustomTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetTransactionCustomTypeChangeBuilder of(final SetTransactionCustomTypeChange template) { + SetTransactionCustomTypeChangeBuilder builder = new SetTransactionCustomTypeChangeBuilder(); + builder.change = template.getChange(); + builder.transaction = template.getTransaction(); + 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/SetTransactionCustomTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeImpl.java new file mode 100644 index 00000000000..583f5d4021f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Transaction Custom Type update action.

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

                                                                                                                                                                                    Holds information about the updated Transaction.

                                                                                                                                                                                    + */ + + public com.commercetools.history.models.change_value.TransactionChangeValue getTransaction() { + return this.transaction; + } + + /** + *

                                                                                                                                                                                    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 setTransaction(final com.commercetools.history.models.change_value.TransactionChangeValue transaction) { + this.transaction = transaction; + } + + 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; + + SetTransactionCustomTypeChangeImpl that = (SetTransactionCustomTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(transaction, that.transaction) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(transaction, that.transaction) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(transaction) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("transaction", transaction) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetTransactionCustomTypeChange copyDeep() { + return SetTransactionCustomTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChange.java index b2e1b72aa84..85eea926f04 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChange.java @@ -28,6 +28,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -76,6 +78,24 @@ public interface SetTransitionsChange extends Change { @JsonProperty("nextValue") public List getNextValue(); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + @NotNull + @Valid + @JsonProperty("addedItems") + public List getAddedItems(); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + @NotNull + @Valid + @JsonProperty("removedItems") + public List getRemovedItems(); + /** * set change * @param change value to be set @@ -113,6 +133,36 @@ public interface SetTransitionsChange extends Change { public void setNextValue(final List nextValue); + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + @JsonIgnore + public void setAddedItems(final Reference... addedItems); + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems values to be set + */ + + public void setAddedItems(final List addedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + @JsonIgnore + public void setRemovedItems(final Reference... removedItems); + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems values to be set + */ + + public void setRemovedItems(final List removedItems); + /** * factory method * @return instance of SetTransitionsChange @@ -131,6 +181,8 @@ public static SetTransitionsChange of(final SetTransitionsChange template) { instance.setChange(template.getChange()); instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); + instance.setAddedItems(template.getAddedItems()); + instance.setRemovedItems(template.getRemovedItems()); return instance; } @@ -158,6 +210,16 @@ public static SetTransitionsChange deepCopy(@Nullable final SetTransitionsChange .map(com.commercetools.history.models.common.Reference::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAddedItems(Optional.ofNullable(template.getAddedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setRemovedItems(Optional.ofNullable(template.getRemovedItems()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Reference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeBuilder.java index 85990ec2182..ecb40d3799c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeBuilder.java @@ -17,6 +17,8 @@ * .change("{change}") * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) + * .plusAddedItems(addedItemsBuilder -> addedItemsBuilder) + * .plusRemovedItems(removedItemsBuilder -> removedItemsBuilder) * .build() * * @@ -30,6 +32,10 @@ public class SetTransitionsChangeBuilder implements Builder nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * set the value to the change * @param change value to be set @@ -87,7 +93,7 @@ public SetTransitionsChangeBuilder plusPreviousValue( */ public SetTransitionsChangeBuilder plusPreviousValue( - Function builder) { + Function> builder) { if (this.previousValue == null) { this.previousValue = new ArrayList<>(); } @@ -102,34 +108,12 @@ public SetTransitionsChangeBuilder plusPreviousValue( */ public SetTransitionsChangeBuilder withPreviousValue( - Function builder) { + Function> builder) { this.previousValue = new ArrayList<>(); this.previousValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetTransitionsChangeBuilder addPreviousValue( - Function builder) { - return plusPreviousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - - /** - *

                                                                                                                                                                                    Value before the change.

                                                                                                                                                                                    - * @param builder function to build the previousValue value - * @return Builder - */ - - public SetTransitionsChangeBuilder setPreviousValue( - Function builder) { - return previousValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); - } - /** *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    * @param nextValue value to be set @@ -175,7 +159,7 @@ public SetTransitionsChangeBuilder plusNextValue( */ public SetTransitionsChangeBuilder plusNextValue( - Function builder) { + Function> builder) { if (this.nextValue == null) { this.nextValue = new ArrayList<>(); } @@ -190,32 +174,144 @@ public SetTransitionsChangeBuilder plusNextValue( */ public SetTransitionsChangeBuilder withNextValue( - Function builder) { + Function> builder) { this.nextValue = new ArrayList<>(); this.nextValue.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set * @return Builder */ - public SetTransitionsChangeBuilder addNextValue( - Function builder) { - return plusNextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetTransitionsChangeBuilder addedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + this.addedItems = new ArrayList<>(Arrays.asList(addedItems)); + return this; } /** - *

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    - * @param builder function to build the nextValue value + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetTransitionsChangeBuilder addedItems( + final java.util.List addedItems) { + this.addedItems = addedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param addedItems value to be set + * @return Builder + */ + + public SetTransitionsChangeBuilder plusAddedItems( + final com.commercetools.history.models.common.Reference... addedItems) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.addAll(Arrays.asList(addedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetTransitionsChangeBuilder plusAddedItems( + Function> builder) { + if (this.addedItems == null) { + this.addedItems = new ArrayList<>(); + } + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @param builder function to build the addedItems value + * @return Builder + */ + + public SetTransitionsChangeBuilder withAddedItems( + Function> builder) { + this.addedItems = new ArrayList<>(); + this.addedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetTransitionsChangeBuilder removedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set + * @return Builder + */ + + public SetTransitionsChangeBuilder removedItems( + final java.util.List removedItems) { + this.removedItems = removedItems; + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param removedItems value to be set * @return Builder */ - public SetTransitionsChangeBuilder setNextValue( - Function builder) { - return nextValue(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + public SetTransitionsChangeBuilder plusRemovedItems( + final com.commercetools.history.models.common.Reference... removedItems) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.addAll(Arrays.asList(removedItems)); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetTransitionsChangeBuilder plusRemovedItems( + Function> builder) { + if (this.removedItems == null) { + this.removedItems = new ArrayList<>(); + } + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @param builder function to build the removedItems value + * @return Builder + */ + + public SetTransitionsChangeBuilder withRemovedItems( + Function> builder) { + this.removedItems = new ArrayList<>(); + this.removedItems.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + return this; } /** @@ -245,6 +341,24 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + * @return addedItems + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + * @return removedItems + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + /** * builds SetTransitionsChange with checking for non-null required values * @return SetTransitionsChange @@ -253,7 +367,9 @@ public SetTransitionsChange build() { Objects.requireNonNull(change, SetTransitionsChange.class + ": change is missing"); Objects.requireNonNull(previousValue, SetTransitionsChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, SetTransitionsChange.class + ": nextValue is missing"); - return new SetTransitionsChangeImpl(change, previousValue, nextValue); + Objects.requireNonNull(addedItems, SetTransitionsChange.class + ": addedItems is missing"); + Objects.requireNonNull(removedItems, SetTransitionsChange.class + ": removedItems is missing"); + return new SetTransitionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -261,7 +377,7 @@ public SetTransitionsChange build() { * @return SetTransitionsChange */ public SetTransitionsChange buildUnchecked() { - return new SetTransitionsChangeImpl(change, previousValue, nextValue); + return new SetTransitionsChangeImpl(change, previousValue, nextValue, addedItems, removedItems); } /** @@ -282,6 +398,8 @@ public static SetTransitionsChangeBuilder of(final SetTransitionsChange template builder.change = template.getChange(); builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); + builder.addedItems = template.getAddedItems(); + builder.removedItems = template.getRemovedItems(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeImpl.java index c4c1d435e5a..9226fcd55ac 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetTransitionsChangeImpl.java @@ -30,16 +30,24 @@ public class SetTransitionsChangeImpl implements SetTransitionsChange, ModelBase private java.util.List nextValue; + private java.util.List addedItems; + + private java.util.List removedItems; + /** * create instance with all properties */ @JsonCreator SetTransitionsChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, - @JsonProperty("nextValue") final java.util.List nextValue) { + @JsonProperty("nextValue") final java.util.List nextValue, + @JsonProperty("addedItems") final java.util.List addedItems, + @JsonProperty("removedItems") final java.util.List removedItems) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; + this.addedItems = addedItems; + this.removedItems = removedItems; this.type = SET_TRANSITIONS_CHANGE; } @@ -82,6 +90,22 @@ public java.util.List getNext return this.nextValue; } + /** + *

                                                                                                                                                                                    Elements added to the array.

                                                                                                                                                                                    + */ + + public java.util.List getAddedItems() { + return this.addedItems; + } + + /** + *

                                                                                                                                                                                    Elements removed from the array.

                                                                                                                                                                                    + */ + + public java.util.List getRemovedItems() { + return this.removedItems; + } + public void setChange(final String change) { this.change = change; } @@ -103,6 +127,22 @@ public void setNextValue(final java.util.List(Arrays.asList(addedItems)); + } + + public void setAddedItems(final java.util.List addedItems) { + this.addedItems = addedItems; + } + + public void setRemovedItems(final com.commercetools.history.models.common.Reference... removedItems) { + this.removedItems = new ArrayList<>(Arrays.asList(removedItems)); + } + + public void setRemovedItems(final java.util.List removedItems) { + this.removedItems = removedItems; + } + @Override public boolean equals(Object o) { if (this == o) @@ -117,10 +157,14 @@ public boolean equals(Object o) { .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) + .append(addedItems, that.addedItems) + .append(removedItems, that.removedItems) .isEquals(); } @@ -130,6 +174,8 @@ public int hashCode() { .append(change) .append(previousValue) .append(nextValue) + .append(addedItems) + .append(removedItems) .toHashCode(); } @@ -139,6 +185,8 @@ public String toString() { .append("change", change) .append("previousValue", previousValue) .append("nextValue", nextValue) + .append("addedItems", addedItems) + .append("removedItems", removedItems) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChange.java new file mode 100644 index 00000000000..f594961d7e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChange.java @@ -0,0 +1,197 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.BusinessUnitResourceIdentifier; +import com.commercetools.history.models.common.BusinessUnitType; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Unit Type update action.

                                                                                                                                                                                    + * + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetUnitTypeChange setUnitTypeChange = SetUnitTypeChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .parentUnit(parentUnitBuilder -> parentUnitBuilder)
                                                                                                                                                                                    + *             .previousValue(BusinessUnitType.COMPANY)
                                                                                                                                                                                    + *             .nextValue(BusinessUnitType.COMPANY)
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetUnitTypeChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetUnitTypeChangeImpl.class) +public interface SetUnitTypeChange extends Change { + + /** + * discriminator value for SetUnitTypeChange + */ + String SET_UNIT_TYPE_CHANGE = "SetUnitTypeChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

                                                                                                                                                                                    + * @return parentUnit + */ + @NotNull + @Valid + @JsonProperty("parentUnit") + public BusinessUnitResourceIdentifier getParentUnit(); + + /** + *

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

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

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

                                                                                                                                                                                    + * @param parentUnit value to be set + */ + + public void setParentUnit(final BusinessUnitResourceIdentifier parentUnit); + + /** + *

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    + * @param nextValue value to be set + */ + + public void setNextValue(final BusinessUnitType nextValue); + + /** + * factory method + * @return instance of SetUnitTypeChange + */ + public static SetUnitTypeChange of() { + return new SetUnitTypeChangeImpl(); + } + + /** + * factory method to create a shallow copy SetUnitTypeChange + * @param template instance to be copied + * @return copy instance + */ + public static SetUnitTypeChange of(final SetUnitTypeChange template) { + SetUnitTypeChangeImpl instance = new SetUnitTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setParentUnit(template.getParentUnit()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetUnitTypeChange copyDeep(); + + /** + * factory method to create a deep copy of SetUnitTypeChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetUnitTypeChange deepCopy(@Nullable final SetUnitTypeChange template) { + if (template == null) { + return null; + } + SetUnitTypeChangeImpl instance = new SetUnitTypeChangeImpl(); + instance.setChange(template.getChange()); + instance.setParentUnit( + com.commercetools.history.models.common.BusinessUnitResourceIdentifier.deepCopy(template.getParentUnit())); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + /** + * builder factory method for SetUnitTypeChange + * @return builder + */ + public static SetUnitTypeChangeBuilder builder() { + return SetUnitTypeChangeBuilder.of(); + } + + /** + * create builder for SetUnitTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetUnitTypeChangeBuilder builder(final SetUnitTypeChange template) { + return SetUnitTypeChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetUnitTypeChange(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/SetUnitTypeChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeBuilder.java new file mode 100644 index 00000000000..27a5686de90 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeBuilder.java @@ -0,0 +1,188 @@ + +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; + +/** + * SetUnitTypeChangeBuilder + *
                                                                                                                                                                                    + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                    + *
                                                                                                                                                                                    
                                                                                                                                                                                    + *     SetUnitTypeChange setUnitTypeChange = SetUnitTypeChange.builder()
                                                                                                                                                                                    + *             .change("{change}")
                                                                                                                                                                                    + *             .parentUnit(parentUnitBuilder -> parentUnitBuilder)
                                                                                                                                                                                    + *             .previousValue(BusinessUnitType.COMPANY)
                                                                                                                                                                                    + *             .nextValue(BusinessUnitType.COMPANY)
                                                                                                                                                                                    + *             .build()
                                                                                                                                                                                    + * 
                                                                                                                                                                                    + *
                                                                                                                                                                                    + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetUnitTypeChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.BusinessUnitResourceIdentifier parentUnit; + + private com.commercetools.history.models.common.BusinessUnitType previousValue; + + private com.commercetools.history.models.common.BusinessUnitType nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetUnitTypeChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

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

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

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

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

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

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

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

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

                                                                                                                                                                                    + * @return parentUnit + */ + + public com.commercetools.history.models.common.BusinessUnitResourceIdentifier getParentUnit() { + return this.parentUnit; + } + + /** + *

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    + * @return nextValue + */ + + public com.commercetools.history.models.common.BusinessUnitType getNextValue() { + return this.nextValue; + } + + /** + * builds SetUnitTypeChange with checking for non-null required values + * @return SetUnitTypeChange + */ + public SetUnitTypeChange build() { + Objects.requireNonNull(change, SetUnitTypeChange.class + ": change is missing"); + Objects.requireNonNull(parentUnit, SetUnitTypeChange.class + ": parentUnit is missing"); + Objects.requireNonNull(previousValue, SetUnitTypeChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetUnitTypeChange.class + ": nextValue is missing"); + return new SetUnitTypeChangeImpl(change, parentUnit, previousValue, nextValue); + } + + /** + * builds SetUnitTypeChange without checking for non-null required values + * @return SetUnitTypeChange + */ + public SetUnitTypeChange buildUnchecked() { + return new SetUnitTypeChangeImpl(change, parentUnit, previousValue, nextValue); + } + + /** + * factory method for an instance of SetUnitTypeChangeBuilder + * @return builder + */ + public static SetUnitTypeChangeBuilder of() { + return new SetUnitTypeChangeBuilder(); + } + + /** + * create builder for SetUnitTypeChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetUnitTypeChangeBuilder of(final SetUnitTypeChange template) { + SetUnitTypeChangeBuilder builder = new SetUnitTypeChangeBuilder(); + builder.change = template.getChange(); + builder.parentUnit = template.getParentUnit(); + 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/SetUnitTypeChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeImpl.java new file mode 100644 index 00000000000..46b2fe5efa3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                    Change triggered by the Set Unit Type update action.

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

                                                                                                                                                                                    If unitType="Division", reference to the new parent unit for the Business Unit.

                                                                                                                                                                                    + */ + + public com.commercetools.history.models.common.BusinessUnitResourceIdentifier getParentUnit() { + return this.parentUnit; + } + + /** + *

                                                                                                                                                                                    Value before the change.

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

                                                                                                                                                                                    Value after the change.

                                                                                                                                                                                    + */ + + public com.commercetools.history.models.common.BusinessUnitType getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setParentUnit(final com.commercetools.history.models.common.BusinessUnitResourceIdentifier parentUnit) { + this.parentUnit = parentUnit; + } + + public void setPreviousValue(final com.commercetools.history.models.common.BusinessUnitType previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.BusinessUnitType nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetUnitTypeChangeImpl that = (SetUnitTypeChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(parentUnit, that.parentUnit) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(parentUnit, that.parentUnit) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(parentUnit) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("parentUnit", parentUnit) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetUnitTypeChange copyDeep() { + return SetUnitTypeChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChange.java index 4c788d0e0bc..4ee429a5bff 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChange.java @@ -17,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                                                                                                    Change triggered automatically when an InventoryEntry associated with a Product changes.

                                                                                                                                                                                    + *

                                                                                                                                                                                    This change is initiated by background processes after the Add Quantity, Remove Quantity, or Change Quantity update action is performed.

                                                                                                                                                                                    * *
                                                                                                                                                                                    * Example to create an instance using the builder pattern @@ -78,6 +78,7 @@ public interface SetVariantAvailabilityChange extends Change { public ProductVariantAvailability getNextValue(); /** + *

                                                                                                                                                                                    Product data that was updated.

                                                                                                                                                                                    *
                                                                                                                                                                                      *
                                                                                                                                                                                    • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                    • *
                                                                                                                                                                                    • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                    • @@ -89,7 +90,8 @@ public interface SetVariantAvailabilityChange extends Change { public String getCatalogData(); /** - *

                                                                                                                                                                                      sku or key of the ProductVariant.

                                                                                                                                                                                      + *

                                                                                                                                                                                      Identifier of the updated Product Variant.

                                                                                                                                                                                      + *

                                                                                                                                                                                      This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                      * @return variant */ @NotNull @@ -118,6 +120,7 @@ public interface SetVariantAvailabilityChange extends Change { public void setNextValue(final ProductVariantAvailability nextValue); /** + *

                                                                                                                                                                                      Product data that was updated.

                                                                                                                                                                                      *
                                                                                                                                                                                        *
                                                                                                                                                                                      • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                      • *
                                                                                                                                                                                      • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                      • @@ -128,7 +131,8 @@ public interface SetVariantAvailabilityChange extends Change { public void setCatalogData(final String catalogData); /** - *

                                                                                                                                                                                        sku or key of the ProductVariant.

                                                                                                                                                                                        + *

                                                                                                                                                                                        Identifier of the updated Product Variant.

                                                                                                                                                                                        + *

                                                                                                                                                                                        This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                        * @param variant value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeBuilder.java index a1ed249c4a9..19de82aecf8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeBuilder.java @@ -124,6 +124,7 @@ public SetVariantAvailabilityChangeBuilder nextValue( } /** + *

                                                                                                                                                                                        Product data that was updated.

                                                                                                                                                                                        *
                                                                                                                                                                                          *
                                                                                                                                                                                        • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                        • *
                                                                                                                                                                                        • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                        • @@ -138,7 +139,8 @@ public SetVariantAvailabilityChangeBuilder catalogData(final String catalogData) } /** - *

                                                                                                                                                                                          sku or key of the ProductVariant.

                                                                                                                                                                                          + *

                                                                                                                                                                                          Identifier of the updated Product Variant.

                                                                                                                                                                                          + *

                                                                                                                                                                                          This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                          * @param variant value to be set * @return Builder */ @@ -176,6 +178,7 @@ public com.commercetools.history.models.common.ProductVariantAvailability getNex } /** + *

                                                                                                                                                                                          Product data that was updated.

                                                                                                                                                                                          *
                                                                                                                                                                                            *
                                                                                                                                                                                          • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                          • *
                                                                                                                                                                                          • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                          • @@ -188,7 +191,8 @@ public String getCatalogData() { } /** - *

                                                                                                                                                                                            sku or key of the ProductVariant.

                                                                                                                                                                                            + *

                                                                                                                                                                                            Identifier of the updated Product Variant.

                                                                                                                                                                                            + *

                                                                                                                                                                                            This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                            * @return variant */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeImpl.java index b79cbb3a8fb..8fcf81f6ed6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantAvailabilityChangeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                                                                                                            Change triggered automatically when an InventoryEntry associated with a Product changes.

                                                                                                                                                                                            + *

                                                                                                                                                                                            This change is initiated by background processes after the Add Quantity, Remove Quantity, or Change Quantity update action is performed.

                                                                                                                                                                                            */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SetVariantAvailabilityChangeImpl implements SetVariantAvailabilityChange, ModelBase { @@ -90,6 +90,7 @@ public com.commercetools.history.models.common.ProductVariantAvailability getNex } /** + *

                                                                                                                                                                                            Product data that was updated.

                                                                                                                                                                                            *
                                                                                                                                                                                              *
                                                                                                                                                                                            • staged, if the staged ProductCatalogData was updated.
                                                                                                                                                                                            • *
                                                                                                                                                                                            • current, if the current ProductCatalogData was updated.
                                                                                                                                                                                            • @@ -101,7 +102,8 @@ public String getCatalogData() { } /** - *

                                                                                                                                                                                              sku or key of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of the updated Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field holds the SKU, if defined; otherwise the key; otherwise the ID.

                                                                                                                                                                                              */ public String getVariant() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChange.java new file mode 100644 index 00000000000..9452bcd302a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChange.java @@ -0,0 +1,200 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.history.models.common.ProductVariantExclusion; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Change triggered by the Set Variant Exclusion update action.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     SetVariantExclusionChange setVariantExclusionChange = SetVariantExclusionChange.builder()
                                                                                                                                                                                              + *             .change("{change}")
                                                                                                                                                                                              + *             .product(productBuilder -> productBuilder)
                                                                                                                                                                                              + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                                              + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("SetVariantExclusionChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SetVariantExclusionChangeImpl.class) +public interface SetVariantExclusionChange extends Change { + + /** + * discriminator value for SetVariantExclusionChange + */ + String SET_VARIANT_EXCLUSION_CHANGE = "SetVariantExclusionChange"; + + /** + * + * @return change + */ + @NotNull + @JsonProperty("change") + public String getChange(); + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + *

                                                                                                                                                                                              Reference to the updated Product.

                                                                                                                                                                                              + * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public Reference getProduct(); + + /** + *

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Reference to the updated Product.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @param nextValue value to be set + */ + + public void setNextValue(final ProductVariantExclusion nextValue); + + /** + * factory method + * @return instance of SetVariantExclusionChange + */ + public static SetVariantExclusionChange of() { + return new SetVariantExclusionChangeImpl(); + } + + /** + * factory method to create a shallow copy SetVariantExclusionChange + * @param template instance to be copied + * @return copy instance + */ + public static SetVariantExclusionChange of(final SetVariantExclusionChange template) { + SetVariantExclusionChangeImpl instance = new SetVariantExclusionChangeImpl(); + instance.setChange(template.getChange()); + instance.setProduct(template.getProduct()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public SetVariantExclusionChange copyDeep(); + + /** + * factory method to create a deep copy of SetVariantExclusionChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SetVariantExclusionChange deepCopy(@Nullable final SetVariantExclusionChange template) { + if (template == null) { + return null; + } + SetVariantExclusionChangeImpl instance = new SetVariantExclusionChangeImpl(); + instance.setChange(template.getChange()); + instance.setProduct(com.commercetools.history.models.common.Reference.deepCopy(template.getProduct())); + instance.setPreviousValue( + com.commercetools.history.models.common.ProductVariantExclusion.deepCopy(template.getPreviousValue())); + instance.setNextValue( + com.commercetools.history.models.common.ProductVariantExclusion.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for SetVariantExclusionChange + * @return builder + */ + public static SetVariantExclusionChangeBuilder builder() { + return SetVariantExclusionChangeBuilder.of(); + } + + /** + * create builder for SetVariantExclusionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetVariantExclusionChangeBuilder builder(final SetVariantExclusionChange template) { + return SetVariantExclusionChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSetVariantExclusionChange(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/SetVariantExclusionChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeBuilder.java new file mode 100644 index 00000000000..41cbc0d1871 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeBuilder.java @@ -0,0 +1,222 @@ + +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; + +/** + * SetVariantExclusionChangeBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     SetVariantExclusionChange setVariantExclusionChange = SetVariantExclusionChange.builder()
                                                                                                                                                                                              + *             .change("{change}")
                                                                                                                                                                                              + *             .product(productBuilder -> productBuilder)
                                                                                                                                                                                              + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                                              + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SetVariantExclusionChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Reference product; + + private com.commercetools.history.models.common.ProductVariantExclusion previousValue; + + private com.commercetools.history.models.common.ProductVariantExclusion nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public SetVariantExclusionChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                                              Reference to the updated Product.

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

                                                                                                                                                                                              Reference to the updated Product.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Reference to the updated Product.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @return nextValue + */ + + public com.commercetools.history.models.common.ProductVariantExclusion getNextValue() { + return this.nextValue; + } + + /** + * builds SetVariantExclusionChange with checking for non-null required values + * @return SetVariantExclusionChange + */ + public SetVariantExclusionChange build() { + Objects.requireNonNull(change, SetVariantExclusionChange.class + ": change is missing"); + Objects.requireNonNull(product, SetVariantExclusionChange.class + ": product is missing"); + Objects.requireNonNull(previousValue, SetVariantExclusionChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, SetVariantExclusionChange.class + ": nextValue is missing"); + return new SetVariantExclusionChangeImpl(change, product, previousValue, nextValue); + } + + /** + * builds SetVariantExclusionChange without checking for non-null required values + * @return SetVariantExclusionChange + */ + public SetVariantExclusionChange buildUnchecked() { + return new SetVariantExclusionChangeImpl(change, product, previousValue, nextValue); + } + + /** + * factory method for an instance of SetVariantExclusionChangeBuilder + * @return builder + */ + public static SetVariantExclusionChangeBuilder of() { + return new SetVariantExclusionChangeBuilder(); + } + + /** + * create builder for SetVariantExclusionChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SetVariantExclusionChangeBuilder of(final SetVariantExclusionChange template) { + SetVariantExclusionChangeBuilder builder = new SetVariantExclusionChangeBuilder(); + builder.change = template.getChange(); + builder.product = template.getProduct(); + 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/SetVariantExclusionChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeImpl.java new file mode 100644 index 00000000000..a7aa64ba8a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeImpl.java @@ -0,0 +1,160 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Change triggered by the Set Variant Exclusion update action.

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

                                                                                                                                                                                              Reference to the updated Product.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductVariantExclusion getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setProduct(final com.commercetools.history.models.common.Reference product) { + this.product = product; + } + + public void setPreviousValue(final com.commercetools.history.models.common.ProductVariantExclusion previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.ProductVariantExclusion nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SetVariantExclusionChangeImpl that = (SetVariantExclusionChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(product, that.product) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .append(type, that.type) + .append(change, that.change) + .append(product, that.product) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(change) + .append(product) + .append(previousValue) + .append(nextValue) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("product", product) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public SetVariantExclusionChange copyDeep() { + return SetVariantExclusionChange.deepCopy(this); + } +} 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 index 39d6fd5d5e2..c8f06c8f5bf 100644 --- 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 @@ -120,13 +120,12 @@ public SetVariantSelectionChangeBuilder nextValue( /** *

                                                                                                                                                                                              Reference to the updated Product.

                                                                                                                                                                                              - * @param builder function to build the product value + * @param product value to be set * @return Builder */ - public SetVariantSelectionChangeBuilder product( - Function builder) { - this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public SetVariantSelectionChangeBuilder product(final com.commercetools.history.models.common.Reference product) { + this.product = product; return this; } @@ -136,20 +135,9 @@ public SetVariantSelectionChangeBuilder product( * @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; + public SetVariantSelectionChangeBuilder product( + Function> builder) { + this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChange.java index 590bacfd28e..9f9c6fefd96 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChange.java @@ -33,6 +33,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .lineItemId("{lineItemId}") + * .customLineItemId("{customLineItemId}") * .stateId("{stateId}") * .build() * @@ -83,13 +84,21 @@ public interface TransitionCustomLineItemStateChange extends Change { public List getNextValue(); /** - *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              id of the updated LineItem.

                                                                                                                                                                                              * @return lineItemId */ @NotNull @JsonProperty("lineItemId") public String getLineItemId(); + /** + *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + * @return customLineItemId + */ + @NotNull + @JsonProperty("customLineItemId") + public String getCustomLineItemId(); + /** *

                                                                                                                                                                                              id of the State involved in the transition.

                                                                                                                                                                                              * @return stateId @@ -136,12 +145,19 @@ public interface TransitionCustomLineItemStateChange extends Change { public void setNextValue(final List nextValue); /** - *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              id of the updated LineItem.

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

                                                                                                                                                                                              id of the updated CustomLineItem.

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

                                                                                                                                                                                              id of the State involved in the transition.

                                                                                                                                                                                              * @param stateId value to be set @@ -168,6 +184,7 @@ public static TransitionCustomLineItemStateChange of(final TransitionCustomLineI instance.setPreviousValue(template.getPreviousValue()); instance.setNextValue(template.getNextValue()); instance.setLineItemId(template.getLineItemId()); + instance.setCustomLineItemId(template.getCustomLineItemId()); instance.setStateId(template.getStateId()); return instance; } @@ -198,6 +215,7 @@ public static TransitionCustomLineItemStateChange deepCopy( .collect(Collectors.toList())) .orElse(null)); instance.setLineItemId(template.getLineItemId()); + instance.setCustomLineItemId(template.getCustomLineItemId()); instance.setStateId(template.getStateId()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeBuilder.java index 9437751116c..8e2e246ee1c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeBuilder.java @@ -18,6 +18,7 @@ * .plusPreviousValue(previousValueBuilder -> previousValueBuilder) * .plusNextValue(nextValueBuilder -> nextValueBuilder) * .lineItemId("{lineItemId}") + * .customLineItemId("{customLineItemId}") * .stateId("{stateId}") * .build() * @@ -34,6 +35,8 @@ public class TransitionCustomLineItemStateChangeBuilder implements Builderid of the updated CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              id of the updated LineItem.

                                                                                                                                                                                              * @param lineItemId value to be set * @return Builder */ @@ -236,6 +239,17 @@ public TransitionCustomLineItemStateChangeBuilder lineItemId(final String lineIt return this; } + /** + *

                                                                                                                                                                                              id of the updated CustomLineItem.

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

                                                                                                                                                                                              id of the State involved in the transition.

                                                                                                                                                                                              * @param stateId value to be set @@ -275,7 +289,7 @@ public java.util.List getNext } /** - *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              id of the updated LineItem.

                                                                                                                                                                                              * @return lineItemId */ @@ -283,6 +297,15 @@ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + * @return customLineItemId + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + /** *

                                                                                                                                                                                              id of the State involved in the transition.

                                                                                                                                                                                              * @return stateId @@ -301,8 +324,11 @@ public TransitionCustomLineItemStateChange build() { Objects.requireNonNull(previousValue, TransitionCustomLineItemStateChange.class + ": previousValue is missing"); Objects.requireNonNull(nextValue, TransitionCustomLineItemStateChange.class + ": nextValue is missing"); Objects.requireNonNull(lineItemId, TransitionCustomLineItemStateChange.class + ": lineItemId is missing"); + Objects.requireNonNull(customLineItemId, + TransitionCustomLineItemStateChange.class + ": customLineItemId is missing"); Objects.requireNonNull(stateId, TransitionCustomLineItemStateChange.class + ": stateId is missing"); - return new TransitionCustomLineItemStateChangeImpl(change, previousValue, nextValue, lineItemId, stateId); + return new TransitionCustomLineItemStateChangeImpl(change, previousValue, nextValue, lineItemId, + customLineItemId, stateId); } /** @@ -310,7 +336,8 @@ public TransitionCustomLineItemStateChange build() { * @return TransitionCustomLineItemStateChange */ public TransitionCustomLineItemStateChange buildUnchecked() { - return new TransitionCustomLineItemStateChangeImpl(change, previousValue, nextValue, lineItemId, stateId); + return new TransitionCustomLineItemStateChangeImpl(change, previousValue, nextValue, lineItemId, + customLineItemId, stateId); } /** @@ -332,6 +359,7 @@ public static TransitionCustomLineItemStateChangeBuilder of(final TransitionCust builder.previousValue = template.getPreviousValue(); builder.nextValue = template.getNextValue(); builder.lineItemId = template.getLineItemId(); + builder.customLineItemId = template.getCustomLineItemId(); builder.stateId = template.getStateId(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeImpl.java index e1e4f7546ed..25e0b91b6a9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeImpl.java @@ -36,6 +36,8 @@ public class TransitionCustomLineItemStateChangeImpl implements TransitionCustom private String lineItemId; + private String customLineItemId; + private String stateId; /** @@ -45,11 +47,14 @@ public class TransitionCustomLineItemStateChangeImpl implements TransitionCustom TransitionCustomLineItemStateChangeImpl(@JsonProperty("change") final String change, @JsonProperty("previousValue") final java.util.List previousValue, @JsonProperty("nextValue") final java.util.List nextValue, - @JsonProperty("lineItemId") final String lineItemId, @JsonProperty("stateId") final String stateId) { + @JsonProperty("lineItemId") final String lineItemId, + @JsonProperty("customLineItemId") final String customLineItemId, + @JsonProperty("stateId") final String stateId) { this.change = change; this.previousValue = previousValue; this.nextValue = nextValue; this.lineItemId = lineItemId; + this.customLineItemId = customLineItemId; this.stateId = stateId; this.type = TRANSITION_CUSTOM_LINE_ITEM_STATE_CHANGE; } @@ -94,13 +99,21 @@ public java.util.List getNext } /** - *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              id of the updated LineItem.

                                                                                                                                                                                              */ public String getLineItemId() { return this.lineItemId; } + /** + *

                                                                                                                                                                                              id of the updated CustomLineItem.

                                                                                                                                                                                              + */ + + public String getCustomLineItemId() { + return this.customLineItemId; + } + /** *

                                                                                                                                                                                              id of the State involved in the transition.

                                                                                                                                                                                              */ @@ -134,6 +147,10 @@ public void setLineItemId(final String lineItemId) { this.lineItemId = lineItemId; } + public void setCustomLineItemId(final String customLineItemId) { + this.customLineItemId = customLineItemId; + } + public void setStateId(final String stateId) { this.stateId = stateId; } @@ -153,12 +170,14 @@ public boolean equals(Object o) { .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItemId, that.lineItemId) + .append(customLineItemId, that.customLineItemId) .append(stateId, that.stateId) .append(type, that.type) .append(change, that.change) .append(previousValue, that.previousValue) .append(nextValue, that.nextValue) .append(lineItemId, that.lineItemId) + .append(customLineItemId, that.customLineItemId) .append(stateId, that.stateId) .isEquals(); } @@ -170,6 +189,7 @@ public int hashCode() { .append(previousValue) .append(nextValue) .append(lineItemId) + .append(customLineItemId) .append(stateId) .toHashCode(); } @@ -181,6 +201,7 @@ public String toString() { .append("previousValue", previousValue) .append("nextValue", nextValue) .append("lineItemId", lineItemId) + .append("customLineItemId", customLineItemId) .append("stateId", stateId) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeBuilder.java index efe1bb287c8..5a354d6016a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/TransitionStateChangeBuilder.java @@ -43,13 +43,13 @@ public TransitionStateChangeBuilder change(final String change) { /** *

                                                                                                                                                                                              Value before the change.

                                                                                                                                                                                              - * @param builder function to build the previousValue value + * @param previousValue value to be set * @return Builder */ public TransitionStateChangeBuilder previousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference previousValue) { + this.previousValue = previousValue; return this; } @@ -59,33 +59,20 @@ public TransitionStateChangeBuilder previousValue( * @return Builder */ - public TransitionStateChangeBuilder withPreviousValue( - Function builder) { - this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Value before the change.

                                                                                                                                                                                              - * @param previousValue value to be set - * @return Builder - */ - public TransitionStateChangeBuilder previousValue( - final com.commercetools.history.models.common.Reference previousValue) { - this.previousValue = previousValue; + Function> builder) { + this.previousValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              - * @param builder function to build the nextValue value + * @param nextValue value to be set * @return Builder */ - public TransitionStateChangeBuilder nextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public TransitionStateChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { + this.nextValue = nextValue; return this; } @@ -95,20 +82,9 @@ public TransitionStateChangeBuilder nextValue( * @return Builder */ - public TransitionStateChangeBuilder withNextValue( - Function builder) { - this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              - * @param nextValue value to be set - * @return Builder - */ - - public TransitionStateChangeBuilder nextValue(final com.commercetools.history.models.common.Reference nextValue) { - this.nextValue = nextValue; + public TransitionStateChangeBuilder nextValue( + Function> builder) { + this.nextValue = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChange.java new file mode 100644 index 00000000000..490b10151bb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChange.java @@ -0,0 +1,179 @@ + +package com.commercetools.history.models.change; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Change triggered by the Update ItemShippingAddress update action.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     UpdateItemShippingAddressChange updateItemShippingAddressChange = UpdateItemShippingAddressChange.builder()
                                                                                                                                                                                              + *             .change("{change}")
                                                                                                                                                                                              + *             .previousValue(previousValueBuilder -> previousValueBuilder)
                                                                                                                                                                                              + *             .nextValue(nextValueBuilder -> nextValueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("UpdateItemShippingAddressChange") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = UpdateItemShippingAddressChangeImpl.class) +public interface UpdateItemShippingAddressChange extends Change { + + /** + * discriminator value for UpdateItemShippingAddressChange + */ + String UPDATE_ITEM_SHIPPING_ADDRESS_CHANGE = "UpdateItemShippingAddressChange"; + + /** + * + * @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 Address getPreviousValue(); + + /** + *

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @return nextValue + */ + @NotNull + @Valid + @JsonProperty("nextValue") + public Address 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 Address previousValue); + + /** + *

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @param nextValue value to be set + */ + + public void setNextValue(final Address nextValue); + + /** + * factory method + * @return instance of UpdateItemShippingAddressChange + */ + public static UpdateItemShippingAddressChange of() { + return new UpdateItemShippingAddressChangeImpl(); + } + + /** + * factory method to create a shallow copy UpdateItemShippingAddressChange + * @param template instance to be copied + * @return copy instance + */ + public static UpdateItemShippingAddressChange of(final UpdateItemShippingAddressChange template) { + UpdateItemShippingAddressChangeImpl instance = new UpdateItemShippingAddressChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue(template.getPreviousValue()); + instance.setNextValue(template.getNextValue()); + return instance; + } + + public UpdateItemShippingAddressChange copyDeep(); + + /** + * factory method to create a deep copy of UpdateItemShippingAddressChange + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static UpdateItemShippingAddressChange deepCopy(@Nullable final UpdateItemShippingAddressChange template) { + if (template == null) { + return null; + } + UpdateItemShippingAddressChangeImpl instance = new UpdateItemShippingAddressChangeImpl(); + instance.setChange(template.getChange()); + instance.setPreviousValue( + com.commercetools.history.models.common.Address.deepCopy(template.getPreviousValue())); + instance.setNextValue(com.commercetools.history.models.common.Address.deepCopy(template.getNextValue())); + return instance; + } + + /** + * builder factory method for UpdateItemShippingAddressChange + * @return builder + */ + public static UpdateItemShippingAddressChangeBuilder builder() { + return UpdateItemShippingAddressChangeBuilder.of(); + } + + /** + * create builder for UpdateItemShippingAddressChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UpdateItemShippingAddressChangeBuilder builder(final UpdateItemShippingAddressChange template) { + return UpdateItemShippingAddressChangeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withUpdateItemShippingAddressChange(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/UpdateItemShippingAddressChangeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeBuilder.java new file mode 100644 index 00000000000..12d2c853d69 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeBuilder.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; + +/** + * UpdateItemShippingAddressChangeBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     UpdateItemShippingAddressChange updateItemShippingAddressChange = UpdateItemShippingAddressChange.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 UpdateItemShippingAddressChangeBuilder implements Builder { + + private String change; + + private com.commercetools.history.models.common.Address previousValue; + + private com.commercetools.history.models.common.Address nextValue; + + /** + * set the value to the change + * @param change value to be set + * @return Builder + */ + + public UpdateItemShippingAddressChangeBuilder change(final String change) { + this.change = change; + return this; + } + + /** + *

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Value after the change.

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

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @param nextValue value to be set + * @return Builder + */ + + public UpdateItemShippingAddressChangeBuilder nextValue( + final com.commercetools.history.models.common.Address 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.Address getPreviousValue() { + return this.previousValue; + } + + /** + *

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + * @return nextValue + */ + + public com.commercetools.history.models.common.Address getNextValue() { + return this.nextValue; + } + + /** + * builds UpdateItemShippingAddressChange with checking for non-null required values + * @return UpdateItemShippingAddressChange + */ + public UpdateItemShippingAddressChange build() { + Objects.requireNonNull(change, UpdateItemShippingAddressChange.class + ": change is missing"); + Objects.requireNonNull(previousValue, UpdateItemShippingAddressChange.class + ": previousValue is missing"); + Objects.requireNonNull(nextValue, UpdateItemShippingAddressChange.class + ": nextValue is missing"); + return new UpdateItemShippingAddressChangeImpl(change, previousValue, nextValue); + } + + /** + * builds UpdateItemShippingAddressChange without checking for non-null required values + * @return UpdateItemShippingAddressChange + */ + public UpdateItemShippingAddressChange buildUnchecked() { + return new UpdateItemShippingAddressChangeImpl(change, previousValue, nextValue); + } + + /** + * factory method for an instance of UpdateItemShippingAddressChangeBuilder + * @return builder + */ + public static UpdateItemShippingAddressChangeBuilder of() { + return new UpdateItemShippingAddressChangeBuilder(); + } + + /** + * create builder for UpdateItemShippingAddressChange instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static UpdateItemShippingAddressChangeBuilder of(final UpdateItemShippingAddressChange template) { + UpdateItemShippingAddressChangeBuilder builder = new UpdateItemShippingAddressChangeBuilder(); + 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/UpdateItemShippingAddressChangeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeImpl.java new file mode 100644 index 00000000000..abb61de23a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeImpl.java @@ -0,0 +1,140 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Change triggered by the Update ItemShippingAddress update action.

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

                                                                                                                                                                                              Value before the change.

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

                                                                                                                                                                                              Value after the change.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.Address getNextValue() { + return this.nextValue; + } + + public void setChange(final String change) { + this.change = change; + } + + public void setPreviousValue(final com.commercetools.history.models.common.Address previousValue) { + this.previousValue = previousValue; + } + + public void setNextValue(final com.commercetools.history.models.common.Address nextValue) { + this.nextValue = nextValue; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + UpdateItemShippingAddressChangeImpl that = (UpdateItemShippingAddressChangeImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(change, that.change) + .append(previousValue, that.previousValue) + .append(nextValue, that.nextValue) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("change", change) + .append("previousValue", previousValue) + .append("nextValue", nextValue) + .build(); + } + + @Override + public UpdateItemShippingAddressChange copyDeep() { + return UpdateItemShippingAddressChange.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java index 0ecd989f3ec..0d35cc5d49c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/ModifiedByBuilder.java @@ -109,13 +109,12 @@ public ModifiedByBuilder anonymousId(@Nullable final String anonymousId) { /** *

                                                                                                                                                                                              The Customer who made the change.

                                                                                                                                                                                              *

                                                                                                                                                                                              Present only if the change was made using a token from the password flow.

                                                                                                                                                                                              - * @param builder function to build the customer value + * @param customer value to be set * @return Builder */ - public ModifiedByBuilder customer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public ModifiedByBuilder customer(@Nullable final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; return this; } @@ -126,21 +125,20 @@ public ModifiedByBuilder customer( * @return Builder */ - public ModifiedByBuilder withCustomer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public ModifiedByBuilder customer( + Function> builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              The Customer who made the change.

                                                                                                                                                                                              - *

                                                                                                                                                                                              Present only if the change was made using a token from the password flow.

                                                                                                                                                                                              - * @param customer value to be set + *

                                                                                                                                                                                              The Associate who made the change in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + * @param associate value to be set * @return Builder */ - public ModifiedByBuilder customer(@Nullable final com.commercetools.history.models.common.Reference customer) { - this.customer = customer; + public ModifiedByBuilder associate(@Nullable final com.commercetools.history.models.common.Reference associate) { + this.associate = associate; return this; } @@ -151,34 +149,11 @@ public ModifiedByBuilder customer(@Nullable final com.commercetools.history.mode */ public ModifiedByBuilder associate( - Function builder) { + Function> builder) { this.associate = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } - /** - *

                                                                                                                                                                                              The Associate who made the change in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

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

                                                                                                                                                                                              The Associate who made the change in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              - * @param associate value to be set - * @return Builder - */ - - public ModifiedByBuilder associate(@Nullable final com.commercetools.history.models.common.Reference associate) { - this.associate = associate; - return this; - } - /** *

                                                                                                                                                                                              true if the change was made using the Merchant Center.

                                                                                                                                                                                              * @return isPlatformClient diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/PlatformInitiatedChange.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/PlatformInitiatedChange.java index 2f9f34a5ea8..77063c596fb 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/PlatformInitiatedChange.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/PlatformInitiatedChange.java @@ -18,14 +18,40 @@ public interface PlatformInitiatedChange extends JsonEnum { PlatformInitiatedChange EXCLUDE_ALL = PlatformInitiatedChangeEnum.EXCLUDE_ALL; + PlatformInitiatedChange ADD_INHERITED_ASSOCIATE = PlatformInitiatedChangeEnum.ADD_INHERITED_ASSOCIATE; + + PlatformInitiatedChange CHANGE_INCLUDED_IN_STATISTICS = PlatformInitiatedChangeEnum.CHANGE_INCLUDED_IN_STATISTICS; + + PlatformInitiatedChange CHANGE_INHERITED_ASSOCIATE = PlatformInitiatedChangeEnum.CHANGE_INHERITED_ASSOCIATE; + + PlatformInitiatedChange CHANGE_LAST_VARIANT_ID = PlatformInitiatedChangeEnum.CHANGE_LAST_VARIANT_ID; + PlatformInitiatedChange CHANGE_LINE_ITEM_NAME = PlatformInitiatedChangeEnum.CHANGE_LINE_ITEM_NAME; + PlatformInitiatedChange CHANGE_LINE_ITEM_PUBLISHED = PlatformInitiatedChangeEnum.CHANGE_LINE_ITEM_PUBLISHED; + PlatformInitiatedChange CHANGE_REVIEW_RATING_STATISTICS = PlatformInitiatedChangeEnum.CHANGE_REVIEW_RATING_STATISTICS; + PlatformInitiatedChange CHANGE_TOP_LEVEL_UNIT = PlatformInitiatedChangeEnum.CHANGE_TOP_LEVEL_UNIT; + + PlatformInitiatedChange REMOVE_INHERITED_ASSOCIATE = PlatformInitiatedChangeEnum.REMOVE_INHERITED_ASSOCIATE; + + PlatformInitiatedChange SET_ANCESTORS = PlatformInitiatedChangeEnum.SET_ANCESTORS; + PlatformInitiatedChange SET_APPLICATION_VERSION = PlatformInitiatedChangeEnum.SET_APPLICATION_VERSION; + PlatformInitiatedChange SET_INHERITED_ASSOCIATES = PlatformInitiatedChangeEnum.SET_INHERITED_ASSOCIATES; + + PlatformInitiatedChange SET_INHERITED_STORES = PlatformInitiatedChangeEnum.SET_INHERITED_STORES; + PlatformInitiatedChange SET_IS_VALID = PlatformInitiatedChangeEnum.SET_IS_VALID; + PlatformInitiatedChange SET_LINE_ITEM_DEACTIVATED_AT = PlatformInitiatedChangeEnum.SET_LINE_ITEM_DEACTIVATED_AT; + + PlatformInitiatedChange SET_PRODUCT_COUNT = PlatformInitiatedChangeEnum.SET_PRODUCT_COUNT; + + PlatformInitiatedChange SET_RESERVATIONS = PlatformInitiatedChangeEnum.SET_RESERVATIONS; + PlatformInitiatedChange SET_VARIANT_AVAILABILITY = PlatformInitiatedChangeEnum.SET_VARIANT_AVAILABILITY; /** @@ -37,26 +63,91 @@ enum PlatformInitiatedChangeEnum implements PlatformInitiatedChange { */ EXCLUDE_ALL("excludeAll"), + /** + * addInheritedAssociate + */ + ADD_INHERITED_ASSOCIATE("addInheritedAssociate"), + + /** + * changeIncludedInStatistics + */ + CHANGE_INCLUDED_IN_STATISTICS("changeIncludedInStatistics"), + + /** + * changeInheritedAssociate + */ + CHANGE_INHERITED_ASSOCIATE("changeInheritedAssociate"), + + /** + * changeLastVariantId + */ + CHANGE_LAST_VARIANT_ID("changeLastVariantId"), + /** * changeLineItemName */ CHANGE_LINE_ITEM_NAME("changeLineItemName"), + /** + * changeLineItemPublished + */ + CHANGE_LINE_ITEM_PUBLISHED("changeLineItemPublished"), + /** * changeReviewRatingStatistics */ CHANGE_REVIEW_RATING_STATISTICS("changeReviewRatingStatistics"), + /** + * changeTopLevelUnit + */ + CHANGE_TOP_LEVEL_UNIT("changeTopLevelUnit"), + + /** + * removeInheritedAssociate + */ + REMOVE_INHERITED_ASSOCIATE("removeInheritedAssociate"), + + /** + * setAncestors + */ + SET_ANCESTORS("setAncestors"), + /** * setApplicationVersion */ SET_APPLICATION_VERSION("setApplicationVersion"), + /** + * setInheritedAssociates + */ + SET_INHERITED_ASSOCIATES("setInheritedAssociates"), + + /** + * setInheritedStores + */ + SET_INHERITED_STORES("setInheritedStores"), + /** * setIsValid */ SET_IS_VALID("setIsValid"), + /** + * setLineItemDeactivatedAt + */ + SET_LINE_ITEM_DEACTIVATED_AT("setLineItemDeactivatedAt"), + + /** + * setProductCount + */ + SET_PRODUCT_COUNT("setProductCount"), + + /** + * setReservations + */ + SET_RESERVATIONS("setReservations"), + /** * setVariantAvailability */ 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 ab021c2576e..c47a7968af1 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 @@ -332,7 +332,7 @@ public RecordBuilder plusStores(final com.commercetools.history.models.common.Ke */ public RecordBuilder plusStores( - Function builder) { + Function> builder) { if (this.stores == null) { this.stores = new ArrayList<>(); } @@ -347,43 +347,21 @@ public RecordBuilder plusStores( */ public RecordBuilder withStores( - Function builder) { + Function> builder) { this.stores = new ArrayList<>(); this.stores.add(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build()); return this; } - /** - *

                                                                                                                                                                                              References to the Stores associated with the Change.

                                                                                                                                                                                              - * @param builder function to build the stores value - * @return Builder - */ - - public RecordBuilder addStores( - Function builder) { - return plusStores(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of())); - } - - /** - *

                                                                                                                                                                                              References to the Stores associated with the Change.

                                                                                                                                                                                              - * @param builder function to build the stores value - * @return Builder - */ - - public RecordBuilder setStores( - Function builder) { - return stores(builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of())); - } - /** *

                                                                                                                                                                                              Reference to the Business Unit associated with the Change. Only available for B2B-enabled Projects.

                                                                                                                                                                                              - * @param builder function to build the businessUnit value + * @param businessUnit value to be set * @return Builder */ public RecordBuilder businessUnit( - Function builder) { - this.businessUnit = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + @Nullable final com.commercetools.history.models.common.KeyReference businessUnit) { + this.businessUnit = businessUnit; return this; } @@ -393,21 +371,9 @@ public RecordBuilder businessUnit( * @return Builder */ - public RecordBuilder withBusinessUnit( - Function builder) { - this.businessUnit = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Reference to the Business Unit associated with the Change. Only available for B2B-enabled Projects.

                                                                                                                                                                                              - * @param businessUnit value to be set - * @return Builder - */ - public RecordBuilder businessUnit( - @Nullable final com.commercetools.history.models.common.KeyReference businessUnit) { - this.businessUnit = businessUnit; + Function> builder) { + this.businessUnit = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/UpdateType.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/UpdateType.java index e8260466258..df967b705fe 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/UpdateType.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_history/UpdateType.java @@ -80,8 +80,6 @@ public interface UpdateType extends JsonEnum { UpdateType CHANGE_ADDRESS = UpdateTypeEnum.CHANGE_ADDRESS; - UpdateType CHANGE_AMOUNT_AUTHORIZED = UpdateTypeEnum.CHANGE_AMOUNT_AUTHORIZED; - UpdateType CHANGE_AMOUNT_PLANNED = UpdateTypeEnum.CHANGE_AMOUNT_PLANNED; UpdateType CHANGE_ASSET_NAME = UpdateTypeEnum.CHANGE_ASSET_NAME; @@ -726,11 +724,6 @@ enum UpdateTypeEnum implements UpdateType { */ CHANGE_ADDRESS("changeAddress"), - /** - * changeAmountAuthorized - */ - CHANGE_AMOUNT_AUTHORIZED("changeAmountAuthorized"), - /** * changeAmountPlanned */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_value/ChangeValueGiftLineItemChangeValueBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_value/ChangeValueGiftLineItemChangeValueBuilder.java index cc6add6b76d..0ae79d61bf7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_value/ChangeValueGiftLineItemChangeValueBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/change_value/ChangeValueGiftLineItemChangeValueBuilder.java @@ -37,13 +37,13 @@ public class ChangeValueGiftLineItemChangeValueBuilder implements BuilderReference to a Product.

                                                                                                                                                                                              - * @param builder function to build the product value + * @param product value to be set * @return Builder */ public ChangeValueGiftLineItemChangeValueBuilder product( - Function builder) { - this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference product) { + this.product = product; return this; } @@ -53,21 +53,9 @@ public ChangeValueGiftLineItemChangeValueBuilder product( * @return Builder */ - public ChangeValueGiftLineItemChangeValueBuilder withProduct( - Function builder) { - this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Reference to a Product.

                                                                                                                                                                                              - * @param product value to be set - * @return Builder - */ - public ChangeValueGiftLineItemChangeValueBuilder product( - final com.commercetools.history.models.common.Reference product) { - this.product = product; + Function> builder) { + this.product = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } @@ -84,13 +72,13 @@ public ChangeValueGiftLineItemChangeValueBuilder variantId(final Integer variant /** *

                                                                                                                                                                                              Channel with ChannelRoleEnum InventorySupply.

                                                                                                                                                                                              - * @param builder function to build the supplyChannel value + * @param supplyChannel value to be set * @return Builder */ public ChangeValueGiftLineItemChangeValueBuilder supplyChannel( - Function builder) { - this.supplyChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + @Nullable final com.commercetools.history.models.common.Reference supplyChannel) { + this.supplyChannel = supplyChannel; return this; } @@ -100,33 +88,21 @@ public ChangeValueGiftLineItemChangeValueBuilder supplyChannel( * @return Builder */ - public ChangeValueGiftLineItemChangeValueBuilder withSupplyChannel( - Function builder) { - this.supplyChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Channel with ChannelRoleEnum InventorySupply.

                                                                                                                                                                                              - * @param supplyChannel value to be set - * @return Builder - */ - public ChangeValueGiftLineItemChangeValueBuilder supplyChannel( - @Nullable final com.commercetools.history.models.common.Reference supplyChannel) { - this.supplyChannel = supplyChannel; + Function> builder) { + this.supplyChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** *

                                                                                                                                                                                              Channel with ChannelRoleEnum ProductDistribution.

                                                                                                                                                                                              - * @param builder function to build the distributionChannel value + * @param distributionChannel value to be set * @return Builder */ public ChangeValueGiftLineItemChangeValueBuilder distributionChannel( - Function builder) { - this.distributionChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + final com.commercetools.history.models.common.Reference distributionChannel) { + this.distributionChannel = distributionChannel; return this; } @@ -136,21 +112,9 @@ public ChangeValueGiftLineItemChangeValueBuilder distributionChannel( * @return Builder */ - public ChangeValueGiftLineItemChangeValueBuilder withDistributionChannel( - Function builder) { - this.distributionChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Channel with ChannelRoleEnum ProductDistribution.

                                                                                                                                                                                              - * @param distributionChannel value to be set - * @return Builder - */ - public ChangeValueGiftLineItemChangeValueBuilder distributionChannel( - final com.commercetools.history.models.common.Reference distributionChannel) { - this.distributionChannel = distributionChannel; + Function> builder) { + this.distributionChannel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Address.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Address.java index f2c93f661aa..009b23998c6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Address.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Address.java @@ -12,423 +12,39 @@ import io.vrap.rmf.base.client.utils.Generated; -import jakarta.validation.constraints.NotNull; +import jakarta.validation.Valid; /** - * Address + *

                                                                                                                                                                                              Address type returned by read methods. Optionally, the custom field can be present in addition to the fields of a BaseAddress.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Address address = Address.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .title("{title}")
                                                                                                                                                                                              - *             .salutation("{salutation}")
                                                                                                                                                                                              - *             .firstName("{firstName}")
                                                                                                                                                                                              - *             .lastName("{lastName}")
                                                                                                                                                                                              - *             .streetName("{streetName}")
                                                                                                                                                                                              - *             .streetNumber("{streetNumber}")
                                                                                                                                                                                              - *             .additionalStreetInfo("{additionalStreetInfo}")
                                                                                                                                                                                              - *             .postalCode("{postalCode}")
                                                                                                                                                                                              - *             .city("{city}")
                                                                                                                                                                                              - *             .region("{region}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .company("{company}")
                                                                                                                                                                                              - *             .department("{department}")
                                                                                                                                                                                              - *             .building("{building}")
                                                                                                                                                                                              - *             .apartment("{apartment}")
                                                                                                                                                                                              - *             .pOBox("{pOBox}")
                                                                                                                                                                                              - *             .phone("{phone}")
                                                                                                                                                                                              - *             .mobile("{mobile}")
                                                                                                                                                                                              - *             .email("{email}")
                                                                                                                                                                                              - *             .fax("{fax}")
                                                                                                                                                                                              - *             .additionalAddressInfo("{additionalAddressInfo}")
                                                                                                                                                                                              - *             .externalId("{externalId}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = AddressImpl.class) -public interface Address { +public interface Address extends BaseAddress { /** - *

                                                                                                                                                                                              Unique ID of the Address.

                                                                                                                                                                                              - * @return id + *

                                                                                                                                                                                              Custom Fields defined for the Address.

                                                                                                                                                                                              + * @return custom */ - @NotNull - @JsonProperty("id") - public String getId(); + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); /** - * - * @return key + *

                                                                                                                                                                                              Custom Fields defined for the Address.

                                                                                                                                                                                              + * @param custom value to be set */ - @NotNull - @JsonProperty("key") - public String getKey(); - /** - * - * @return title - */ - @NotNull - @JsonProperty("title") - public String getTitle(); - - /** - * - * @return salutation - */ - @NotNull - @JsonProperty("salutation") - public String getSalutation(); - - /** - * - * @return firstName - */ - @NotNull - @JsonProperty("firstName") - public String getFirstName(); - - /** - * - * @return lastName - */ - @NotNull - @JsonProperty("lastName") - public String getLastName(); - - /** - * - * @return streetName - */ - @NotNull - @JsonProperty("streetName") - public String getStreetName(); - - /** - * - * @return streetNumber - */ - @NotNull - @JsonProperty("streetNumber") - public String getStreetNumber(); - - /** - * - * @return additionalStreetInfo - */ - @NotNull - @JsonProperty("additionalStreetInfo") - public String getAdditionalStreetInfo(); - - /** - * - * @return postalCode - */ - @NotNull - @JsonProperty("postalCode") - public String getPostalCode(); - - /** - * - * @return city - */ - @NotNull - @JsonProperty("city") - public String getCity(); - - /** - * - * @return region - */ - @NotNull - @JsonProperty("region") - public String getRegion(); - - /** - * - * @return state - */ - @NotNull - @JsonProperty("state") - public String getState(); - - /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              - * @return country - */ - @NotNull - @JsonProperty("country") - public String getCountry(); - - /** - * - * @return company - */ - @NotNull - @JsonProperty("company") - public String getCompany(); - - /** - * - * @return department - */ - @NotNull - @JsonProperty("department") - public String getDepartment(); - - /** - * - * @return building - */ - @NotNull - @JsonProperty("building") - public String getBuilding(); - - /** - * - * @return apartment - */ - @NotNull - @JsonProperty("apartment") - public String getApartment(); - - /** - * - * @return pOBox - */ - @NotNull - @JsonProperty("pOBox") - public String getPOBox(); - - /** - * - * @return phone - */ - @NotNull - @JsonProperty("phone") - public String getPhone(); - - /** - * - * @return mobile - */ - @NotNull - @JsonProperty("mobile") - public String getMobile(); - - /** - * - * @return email - */ - @NotNull - @JsonProperty("email") - public String getEmail(); - - /** - * - * @return fax - */ - @NotNull - @JsonProperty("fax") - public String getFax(); - - /** - * - * @return additionalAddressInfo - */ - @NotNull - @JsonProperty("additionalAddressInfo") - public String getAdditionalAddressInfo(); - - /** - * - * @return externalId - */ - @NotNull - @JsonProperty("externalId") - public String getExternalId(); - - /** - *

                                                                                                                                                                                              Unique ID of the Address.

                                                                                                                                                                                              - * @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 title - * @param title value to be set - */ - - public void setTitle(final String title); - - /** - * set salutation - * @param salutation value to be set - */ - - public void setSalutation(final String salutation); - - /** - * set firstName - * @param firstName value to be set - */ - - public void setFirstName(final String firstName); - - /** - * set lastName - * @param lastName value to be set - */ - - public void setLastName(final String lastName); - - /** - * set streetName - * @param streetName value to be set - */ - - public void setStreetName(final String streetName); - - /** - * set streetNumber - * @param streetNumber value to be set - */ - - public void setStreetNumber(final String streetNumber); - - /** - * set additionalStreetInfo - * @param additionalStreetInfo value to be set - */ - - public void setAdditionalStreetInfo(final String additionalStreetInfo); - - /** - * set postalCode - * @param postalCode value to be set - */ - - public void setPostalCode(final String postalCode); - - /** - * set city - * @param city value to be set - */ - - public void setCity(final String city); - - /** - * set region - * @param region value to be set - */ - - public void setRegion(final String region); - - /** - * set state - * @param state value to be set - */ - - public void setState(final String state); - - /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              - * @param country value to be set - */ - - public void setCountry(final String country); - - /** - * set company - * @param company value to be set - */ - - public void setCompany(final String company); - - /** - * set department - * @param department value to be set - */ - - public void setDepartment(final String department); - - /** - * set building - * @param building value to be set - */ - - public void setBuilding(final String building); - - /** - * set apartment - * @param apartment value to be set - */ - - public void setApartment(final String apartment); - - /** - * set pOBox - * @param pOBox value to be set - */ - - public void setPOBox(final String pOBox); - - /** - * set phone - * @param phone value to be set - */ - - public void setPhone(final String phone); - - /** - * set mobile - * @param mobile value to be set - */ - - public void setMobile(final String mobile); - - /** - * set email - * @param email value to be set - */ - - public void setEmail(final String email); - - /** - * set fax - * @param fax value to be set - */ - - public void setFax(final String fax); - - /** - * set additionalAddressInfo - * @param additionalAddressInfo value to be set - */ - - public void setAdditionalAddressInfo(final String additionalAddressInfo); - - /** - * set externalId - * @param externalId value to be set - */ - - public void setExternalId(final String externalId); + public void setCustom(final CustomFields custom); /** * factory method @@ -447,6 +63,7 @@ public static Address of(final Address template) { AddressImpl instance = new AddressImpl(); instance.setId(template.getId()); instance.setKey(template.getKey()); + instance.setCountry(template.getCountry()); instance.setTitle(template.getTitle()); instance.setSalutation(template.getSalutation()); instance.setFirstName(template.getFirstName()); @@ -458,7 +75,6 @@ public static Address of(final Address template) { instance.setCity(template.getCity()); instance.setRegion(template.getRegion()); instance.setState(template.getState()); - instance.setCountry(template.getCountry()); instance.setCompany(template.getCompany()); instance.setDepartment(template.getDepartment()); instance.setBuilding(template.getBuilding()); @@ -470,6 +86,7 @@ public static Address of(final Address template) { instance.setFax(template.getFax()); instance.setAdditionalAddressInfo(template.getAdditionalAddressInfo()); instance.setExternalId(template.getExternalId()); + instance.setCustom(template.getCustom()); return instance; } @@ -488,6 +105,7 @@ public static Address deepCopy(@Nullable final Address template) { AddressImpl instance = new AddressImpl(); instance.setId(template.getId()); instance.setKey(template.getKey()); + instance.setCountry(template.getCountry()); instance.setTitle(template.getTitle()); instance.setSalutation(template.getSalutation()); instance.setFirstName(template.getFirstName()); @@ -499,7 +117,6 @@ public static Address deepCopy(@Nullable final Address template) { instance.setCity(template.getCity()); instance.setRegion(template.getRegion()); instance.setState(template.getState()); - instance.setCountry(template.getCountry()); instance.setCompany(template.getCompany()); instance.setDepartment(template.getDepartment()); instance.setBuilding(template.getBuilding()); @@ -511,6 +128,7 @@ public static Address deepCopy(@Nullable final Address template) { instance.setFax(template.getFax()); instance.setAdditionalAddressInfo(template.getAdditionalAddressInfo()); instance.setExternalId(template.getExternalId()); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressBuilder.java index c43f505d0bf..6d7bb6c70eb 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressBuilder.java @@ -2,6 +2,9 @@ package com.commercetools.history.models.common; import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -13,31 +16,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Address address = Address.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .title("{title}")
                                                                                                                                                                                              - *             .salutation("{salutation}")
                                                                                                                                                                                              - *             .firstName("{firstName}")
                                                                                                                                                                                              - *             .lastName("{lastName}")
                                                                                                                                                                                              - *             .streetName("{streetName}")
                                                                                                                                                                                              - *             .streetNumber("{streetNumber}")
                                                                                                                                                                                              - *             .additionalStreetInfo("{additionalStreetInfo}")
                                                                                                                                                                                              - *             .postalCode("{postalCode}")
                                                                                                                                                                                              - *             .city("{city}")
                                                                                                                                                                                              - *             .region("{region}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .company("{company}")
                                                                                                                                                                                              - *             .department("{department}")
                                                                                                                                                                                              - *             .building("{building}")
                                                                                                                                                                                              - *             .apartment("{apartment}")
                                                                                                                                                                                              - *             .pOBox("{pOBox}")
                                                                                                                                                                                              - *             .phone("{phone}")
                                                                                                                                                                                              - *             .mobile("{mobile}")
                                                                                                                                                                                              - *             .email("{email}")
                                                                                                                                                                                              - *             .fax("{fax}")
                                                                                                                                                                                              - *             .additionalAddressInfo("{additionalAddressInfo}")
                                                                                                                                                                                              - *             .externalId("{externalId}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -45,589 +24,663 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AddressBuilder implements Builder
                                                                                                                                                                                              { + @Nullable private String id; + @Nullable private String key; + private String country; + + @Nullable private String title; + @Nullable private String salutation; + @Nullable private String firstName; + @Nullable private String lastName; + @Nullable private String streetName; + @Nullable private String streetNumber; + @Nullable private String additionalStreetInfo; + @Nullable private String postalCode; + @Nullable private String city; + @Nullable private String region; + @Nullable private String state; - private String country; - + @Nullable private String company; + @Nullable private String department; + @Nullable private String building; + @Nullable private String apartment; + @Nullable private String pOBox; + @Nullable private String phone; + @Nullable private String mobile; + @Nullable private String email; + @Nullable private String fax; + @Nullable private String additionalAddressInfo; + @Nullable private String externalId; + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + /** - *

                                                                                                                                                                                              Unique ID of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ - public AddressBuilder id(final String id) { + public AddressBuilder id(@Nullable final String id) { this.id = id; return this; } /** - * set the value to the key + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

                                                                                                                                                                                              * @param key value to be set * @return Builder */ - public AddressBuilder key(final String key) { + public AddressBuilder key(@Nullable final String key) { this.key = key; return this; } /** - * set the value to the title + *

                                                                                                                                                                                              Name of the country.

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

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              * @param title value to be set * @return Builder */ - public AddressBuilder title(final String title) { + public AddressBuilder title(@Nullable final String title) { this.title = title; return this; } /** - * set the value to the salutation + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              * @param salutation value to be set * @return Builder */ - public AddressBuilder salutation(final String salutation) { + public AddressBuilder salutation(@Nullable final String salutation) { this.salutation = salutation; return this; } /** - * set the value to the firstName + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              * @param firstName value to be set * @return Builder */ - public AddressBuilder firstName(final String firstName) { + public AddressBuilder firstName(@Nullable final String firstName) { this.firstName = firstName; return this; } /** - * set the value to the lastName + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              * @param lastName value to be set * @return Builder */ - public AddressBuilder lastName(final String lastName) { + public AddressBuilder lastName(@Nullable final String lastName) { this.lastName = lastName; return this; } /** - * set the value to the streetName + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              * @param streetName value to be set * @return Builder */ - public AddressBuilder streetName(final String streetName) { + public AddressBuilder streetName(@Nullable final String streetName) { this.streetName = streetName; return this; } /** - * set the value to the streetNumber + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              * @param streetNumber value to be set * @return Builder */ - public AddressBuilder streetNumber(final String streetNumber) { + public AddressBuilder streetNumber(@Nullable final String streetNumber) { this.streetNumber = streetNumber; return this; } /** - * set the value to the additionalStreetInfo + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              * @param additionalStreetInfo value to be set * @return Builder */ - public AddressBuilder additionalStreetInfo(final String additionalStreetInfo) { + public AddressBuilder additionalStreetInfo(@Nullable final String additionalStreetInfo) { this.additionalStreetInfo = additionalStreetInfo; return this; } /** - * set the value to the postalCode + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              * @param postalCode value to be set * @return Builder */ - public AddressBuilder postalCode(final String postalCode) { + public AddressBuilder postalCode(@Nullable final String postalCode) { this.postalCode = postalCode; return this; } /** - * set the value to the city + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              * @param city value to be set * @return Builder */ - public AddressBuilder city(final String city) { + public AddressBuilder city(@Nullable final String city) { this.city = city; return this; } /** - * set the value to the region + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              * @param region value to be set * @return Builder */ - public AddressBuilder region(final String region) { + public AddressBuilder region(@Nullable final String region) { this.region = region; return this; } /** - * set the value to the state + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ - public AddressBuilder state(final String state) { + public AddressBuilder state(@Nullable final String state) { this.state = state; return this; } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              - * @param country value to be set - * @return Builder - */ - - public AddressBuilder country(final String country) { - this.country = country; - return this; - } - - /** - * set the value to the company + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              * @param company value to be set * @return Builder */ - public AddressBuilder company(final String company) { + public AddressBuilder company(@Nullable final String company) { this.company = company; return this; } /** - * set the value to the department + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              * @param department value to be set * @return Builder */ - public AddressBuilder department(final String department) { + public AddressBuilder department(@Nullable final String department) { this.department = department; return this; } /** - * set the value to the building + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              * @param building value to be set * @return Builder */ - public AddressBuilder building(final String building) { + public AddressBuilder building(@Nullable final String building) { this.building = building; return this; } /** - * set the value to the apartment + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              * @param apartment value to be set * @return Builder */ - public AddressBuilder apartment(final String apartment) { + public AddressBuilder apartment(@Nullable final String apartment) { this.apartment = apartment; return this; } /** - * set the value to the pOBox + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              * @param pOBox value to be set * @return Builder */ - public AddressBuilder pOBox(final String pOBox) { + public AddressBuilder pOBox(@Nullable final String pOBox) { this.pOBox = pOBox; return this; } /** - * set the value to the phone + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              * @param phone value to be set * @return Builder */ - public AddressBuilder phone(final String phone) { + public AddressBuilder phone(@Nullable final String phone) { this.phone = phone; return this; } /** - * set the value to the mobile + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              * @param mobile value to be set * @return Builder */ - public AddressBuilder mobile(final String mobile) { + public AddressBuilder mobile(@Nullable final String mobile) { this.mobile = mobile; return this; } /** - * set the value to the email + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              * @param email value to be set * @return Builder */ - public AddressBuilder email(final String email) { + public AddressBuilder email(@Nullable final String email) { this.email = email; return this; } /** - * set the value to the fax + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              * @param fax value to be set * @return Builder */ - public AddressBuilder fax(final String fax) { + public AddressBuilder fax(@Nullable final String fax) { this.fax = fax; return this; } /** - * set the value to the additionalAddressInfo + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              * @param additionalAddressInfo value to be set * @return Builder */ - public AddressBuilder additionalAddressInfo(final String additionalAddressInfo) { + public AddressBuilder additionalAddressInfo(@Nullable final String additionalAddressInfo) { this.additionalAddressInfo = additionalAddressInfo; return this; } /** - * set the value to the externalId + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              * @param externalId value to be set * @return Builder */ - public AddressBuilder externalId(final String externalId) { + public AddressBuilder externalId(@Nullable final String externalId) { this.externalId = externalId; return this; } /** - *

                                                                                                                                                                                              Unique ID of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields defined for the Address.

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

                                                                                                                                                                                              Custom Fields defined for the Address.

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

                                                                                                                                                                                              Custom Fields defined for the Address.

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

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              * @return id */ + @Nullable public String getId() { return this.id; } /** - * value of key} + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

                                                                                                                                                                                              * @return key */ + @Nullable public String getKey() { return this.key; } /** - * value of title} + *

                                                                                                                                                                                              Name of the country.

                                                                                                                                                                                              + * @return country + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              * @return title */ + @Nullable public String getTitle() { return this.title; } /** - * value of salutation} + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              * @return salutation */ + @Nullable public String getSalutation() { return this.salutation; } /** - * value of firstName} + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              * @return firstName */ + @Nullable public String getFirstName() { return this.firstName; } /** - * value of lastName} + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              * @return lastName */ + @Nullable public String getLastName() { return this.lastName; } /** - * value of streetName} + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              * @return streetName */ + @Nullable public String getStreetName() { return this.streetName; } /** - * value of streetNumber} + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              * @return streetNumber */ + @Nullable public String getStreetNumber() { return this.streetNumber; } /** - * value of additionalStreetInfo} + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              * @return additionalStreetInfo */ + @Nullable public String getAdditionalStreetInfo() { return this.additionalStreetInfo; } /** - * value of postalCode} + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              * @return postalCode */ + @Nullable public String getPostalCode() { return this.postalCode; } /** - * value of city} + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              * @return city */ + @Nullable public String getCity() { return this.city; } /** - * value of region} + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              * @return region */ + @Nullable public String getRegion() { return this.region; } /** - * value of state} + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              * @return state */ + @Nullable public String getState() { return this.state; } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              - * @return country - */ - - public String getCountry() { - return this.country; - } - - /** - * value of company} + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              * @return company */ + @Nullable public String getCompany() { return this.company; } /** - * value of department} + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              * @return department */ + @Nullable public String getDepartment() { return this.department; } /** - * value of building} + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              * @return building */ + @Nullable public String getBuilding() { return this.building; } /** - * value of apartment} + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              * @return apartment */ + @Nullable public String getApartment() { return this.apartment; } /** - * value of pOBox} + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              * @return pOBox */ + @Nullable public String getPOBox() { return this.pOBox; } /** - * value of phone} + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              * @return phone */ + @Nullable public String getPhone() { return this.phone; } /** - * value of mobile} + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              * @return mobile */ + @Nullable public String getMobile() { return this.mobile; } /** - * value of email} + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              * @return email */ + @Nullable public String getEmail() { return this.email; } /** - * value of fax} + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              * @return fax */ + @Nullable public String getFax() { return this.fax; } /** - * value of additionalAddressInfo} + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              * @return additionalAddressInfo */ + @Nullable public String getAdditionalAddressInfo() { return this.additionalAddressInfo; } /** - * value of externalId} + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              * @return externalId */ + @Nullable public String getExternalId() { return this.externalId; } + /** + *

                                                                                                                                                                                              Custom Fields defined for the Address.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + /** * builds Address with checking for non-null required values * @return Address */ public Address build() { - Objects.requireNonNull(id, Address.class + ": id is missing"); - Objects.requireNonNull(key, Address.class + ": key is missing"); - Objects.requireNonNull(title, Address.class + ": title is missing"); - Objects.requireNonNull(salutation, Address.class + ": salutation is missing"); - Objects.requireNonNull(firstName, Address.class + ": firstName is missing"); - Objects.requireNonNull(lastName, Address.class + ": lastName is missing"); - Objects.requireNonNull(streetName, Address.class + ": streetName is missing"); - Objects.requireNonNull(streetNumber, Address.class + ": streetNumber is missing"); - Objects.requireNonNull(additionalStreetInfo, Address.class + ": additionalStreetInfo is missing"); - Objects.requireNonNull(postalCode, Address.class + ": postalCode is missing"); - Objects.requireNonNull(city, Address.class + ": city is missing"); - Objects.requireNonNull(region, Address.class + ": region is missing"); - Objects.requireNonNull(state, Address.class + ": state is missing"); Objects.requireNonNull(country, Address.class + ": country is missing"); - Objects.requireNonNull(company, Address.class + ": company is missing"); - Objects.requireNonNull(department, Address.class + ": department is missing"); - Objects.requireNonNull(building, Address.class + ": building is missing"); - Objects.requireNonNull(apartment, Address.class + ": apartment is missing"); - Objects.requireNonNull(pOBox, Address.class + ": pOBox is missing"); - Objects.requireNonNull(phone, Address.class + ": phone is missing"); - Objects.requireNonNull(mobile, Address.class + ": mobile is missing"); - Objects.requireNonNull(email, Address.class + ": email is missing"); - Objects.requireNonNull(fax, Address.class + ": fax is missing"); - Objects.requireNonNull(additionalAddressInfo, Address.class + ": additionalAddressInfo is missing"); - Objects.requireNonNull(externalId, Address.class + ": externalId is missing"); - return new AddressImpl(id, key, title, salutation, firstName, lastName, streetName, streetNumber, - additionalStreetInfo, postalCode, city, region, state, country, company, department, building, apartment, - pOBox, phone, mobile, email, fax, additionalAddressInfo, externalId); + return new AddressImpl(id, key, country, title, salutation, firstName, lastName, streetName, streetNumber, + additionalStreetInfo, postalCode, city, region, state, company, department, building, apartment, pOBox, + phone, mobile, email, fax, additionalAddressInfo, externalId, custom); } /** @@ -635,9 +688,9 @@ public Address build() { * @return Address */ public Address buildUnchecked() { - return new AddressImpl(id, key, title, salutation, firstName, lastName, streetName, streetNumber, - additionalStreetInfo, postalCode, city, region, state, country, company, department, building, apartment, - pOBox, phone, mobile, email, fax, additionalAddressInfo, externalId); + return new AddressImpl(id, key, country, title, salutation, firstName, lastName, streetName, streetNumber, + additionalStreetInfo, postalCode, city, region, state, company, department, building, apartment, pOBox, + phone, mobile, email, fax, additionalAddressInfo, externalId, custom); } /** @@ -657,6 +710,7 @@ public static AddressBuilder of(final Address template) { AddressBuilder builder = new AddressBuilder(); builder.id = template.getId(); builder.key = template.getKey(); + builder.country = template.getCountry(); builder.title = template.getTitle(); builder.salutation = template.getSalutation(); builder.firstName = template.getFirstName(); @@ -668,7 +722,6 @@ public static AddressBuilder of(final Address template) { builder.city = template.getCity(); builder.region = template.getRegion(); builder.state = template.getState(); - builder.country = template.getCountry(); builder.company = template.getCompany(); builder.department = template.getDepartment(); builder.building = template.getBuilding(); @@ -680,6 +733,7 @@ public static AddressBuilder of(final Address template) { builder.fax = template.getFax(); builder.additionalAddressInfo = template.getAdditionalAddressInfo(); builder.externalId = template.getExternalId(); + builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressImpl.java index 3d0a136ddca..937c0cb8eaa 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AddressImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Address + *

                                                                                                                                                                                              Address type returned by read methods. Optionally, the custom field can be present in addition to the fields of a BaseAddress.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AddressImpl implements Address, ModelBase { @@ -26,6 +26,8 @@ public class AddressImpl implements Address, ModelBase { private String key; + private String country; + private String title; private String salutation; @@ -48,8 +50,6 @@ public class AddressImpl implements Address, ModelBase { private String state; - private String country; - private String company; private String department; @@ -72,27 +72,31 @@ public class AddressImpl implements Address, ModelBase { private String externalId; + private com.commercetools.history.models.common.CustomFields custom; + /** * create instance with all properties */ @JsonCreator AddressImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, - @JsonProperty("title") final String title, @JsonProperty("salutation") final String salutation, - @JsonProperty("firstName") final String firstName, @JsonProperty("lastName") final String lastName, - @JsonProperty("streetName") final String streetName, + @JsonProperty("country") final String country, @JsonProperty("title") final String title, + @JsonProperty("salutation") final String salutation, @JsonProperty("firstName") final String firstName, + @JsonProperty("lastName") final String lastName, @JsonProperty("streetName") final String streetName, @JsonProperty("streetNumber") final String streetNumber, @JsonProperty("additionalStreetInfo") final String additionalStreetInfo, @JsonProperty("postalCode") final String postalCode, @JsonProperty("city") final String city, @JsonProperty("region") final String region, @JsonProperty("state") final String state, - @JsonProperty("country") final String country, @JsonProperty("company") final String company, - @JsonProperty("department") final String department, @JsonProperty("building") final String building, - @JsonProperty("apartment") final String apartment, @JsonProperty("pOBox") final String pOBox, - @JsonProperty("phone") final String phone, @JsonProperty("mobile") final String mobile, - @JsonProperty("email") final String email, @JsonProperty("fax") final String fax, + @JsonProperty("company") final String company, @JsonProperty("department") final String department, + @JsonProperty("building") final String building, @JsonProperty("apartment") final String apartment, + @JsonProperty("pOBox") final String pOBox, @JsonProperty("phone") final String phone, + @JsonProperty("mobile") final String mobile, @JsonProperty("email") final String email, + @JsonProperty("fax") final String fax, @JsonProperty("additionalAddressInfo") final String additionalAddressInfo, - @JsonProperty("externalId") final String externalId) { + @JsonProperty("externalId") final String externalId, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) { this.id = id; this.key = key; + this.country = country; this.title = title; this.salutation = salutation; this.firstName = firstName; @@ -104,7 +108,6 @@ public class AddressImpl implements Address, ModelBase { this.city = city; this.region = region; this.state = state; - this.country = country; this.company = company; this.department = department; this.building = building; @@ -116,6 +119,7 @@ public class AddressImpl implements Address, ModelBase { this.fax = fax; this.additionalAddressInfo = additionalAddressInfo; this.externalId = externalId; + this.custom = custom; } /** @@ -125,7 +129,8 @@ public AddressImpl() { } /** - *

                                                                                                                                                                                              Unique ID of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              */ public String getId() { @@ -133,7 +138,7 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

                                                                                                                                                                                              */ public String getKey() { @@ -141,7 +146,15 @@ public String getKey() { } /** - * + *

                                                                                                                                                                                              Name of the country.

                                                                                                                                                                                              + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              */ public String getTitle() { @@ -149,7 +162,7 @@ public String getTitle() { } /** - * + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              */ public String getSalutation() { @@ -157,7 +170,7 @@ public String getSalutation() { } /** - * + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              */ public String getFirstName() { @@ -165,7 +178,7 @@ public String getFirstName() { } /** - * + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              */ public String getLastName() { @@ -173,7 +186,7 @@ public String getLastName() { } /** - * + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              */ public String getStreetName() { @@ -181,7 +194,7 @@ public String getStreetName() { } /** - * + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              */ public String getStreetNumber() { @@ -189,7 +202,7 @@ public String getStreetNumber() { } /** - * + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              */ public String getAdditionalStreetInfo() { @@ -197,7 +210,7 @@ public String getAdditionalStreetInfo() { } /** - * + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              */ public String getPostalCode() { @@ -205,7 +218,7 @@ public String getPostalCode() { } /** - * + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              */ public String getCity() { @@ -213,7 +226,7 @@ public String getCity() { } /** - * + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              */ public String getRegion() { @@ -221,7 +234,7 @@ public String getRegion() { } /** - * + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              */ public String getState() { @@ -229,15 +242,7 @@ public String getState() { } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              - */ - - public String getCountry() { - return this.country; - } - - /** - * + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              */ public String getCompany() { @@ -245,7 +250,7 @@ public String getCompany() { } /** - * + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              */ public String getDepartment() { @@ -253,7 +258,7 @@ public String getDepartment() { } /** - * + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              */ public String getBuilding() { @@ -261,7 +266,7 @@ public String getBuilding() { } /** - * + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              */ public String getApartment() { @@ -269,7 +274,7 @@ public String getApartment() { } /** - * + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              */ public String getPOBox() { @@ -277,7 +282,7 @@ public String getPOBox() { } /** - * + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              */ public String getPhone() { @@ -285,7 +290,7 @@ public String getPhone() { } /** - * + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              */ public String getMobile() { @@ -293,7 +298,7 @@ public String getMobile() { } /** - * + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              */ public String getEmail() { @@ -301,7 +306,7 @@ public String getEmail() { } /** - * + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              */ public String getFax() { @@ -309,7 +314,7 @@ public String getFax() { } /** - * + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              */ public String getAdditionalAddressInfo() { @@ -317,13 +322,21 @@ public String getAdditionalAddressInfo() { } /** - * + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              */ public String getExternalId() { return this.externalId; } + /** + *

                                                                                                                                                                                              Custom Fields defined for the Address.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + public void setId(final String id) { this.id = id; } @@ -332,6 +345,10 @@ public void setKey(final String key) { this.key = key; } + public void setCountry(final String country) { + this.country = country; + } + public void setTitle(final String title) { this.title = title; } @@ -376,10 +393,6 @@ public void setState(final String state) { this.state = state; } - public void setCountry(final String country) { - this.country = country; - } - public void setCompany(final String company) { this.company = company; } @@ -424,6 +437,10 @@ public void setExternalId(final String externalId) { this.externalId = externalId; } + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + @Override public boolean equals(Object o) { if (this == o) @@ -436,6 +453,7 @@ public boolean equals(Object o) { return new EqualsBuilder().append(id, that.id) .append(key, that.key) + .append(country, that.country) .append(title, that.title) .append(salutation, that.salutation) .append(firstName, that.firstName) @@ -447,7 +465,6 @@ public boolean equals(Object o) { .append(city, that.city) .append(region, that.region) .append(state, that.state) - .append(country, that.country) .append(company, that.company) .append(department, that.department) .append(building, that.building) @@ -459,8 +476,10 @@ public boolean equals(Object o) { .append(fax, that.fax) .append(additionalAddressInfo, that.additionalAddressInfo) .append(externalId, that.externalId) + .append(custom, that.custom) .append(id, that.id) .append(key, that.key) + .append(country, that.country) .append(title, that.title) .append(salutation, that.salutation) .append(firstName, that.firstName) @@ -472,7 +491,6 @@ public boolean equals(Object o) { .append(city, that.city) .append(region, that.region) .append(state, that.state) - .append(country, that.country) .append(company, that.company) .append(department, that.department) .append(building, that.building) @@ -484,6 +502,7 @@ public boolean equals(Object o) { .append(fax, that.fax) .append(additionalAddressInfo, that.additionalAddressInfo) .append(externalId, that.externalId) + .append(custom, that.custom) .isEquals(); } @@ -491,6 +510,7 @@ public boolean equals(Object o) { public int hashCode() { return new HashCodeBuilder(17, 37).append(id) .append(key) + .append(country) .append(title) .append(salutation) .append(firstName) @@ -502,7 +522,6 @@ public int hashCode() { .append(city) .append(region) .append(state) - .append(country) .append(company) .append(department) .append(building) @@ -514,6 +533,7 @@ public int hashCode() { .append(fax) .append(additionalAddressInfo) .append(externalId) + .append(custom) .toHashCode(); } @@ -521,6 +541,7 @@ public int hashCode() { public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) .append("key", key) + .append("country", country) .append("title", title) .append("salutation", salutation) .append("firstName", firstName) @@ -532,7 +553,6 @@ public String toString() { .append("city", city) .append("region", region) .append("state", state) - .append("country", country) .append("company", company) .append("department", department) .append("building", building) @@ -544,6 +564,7 @@ public String toString() { .append("fax", fax) .append("additionalAddressInfo", additionalAddressInfo) .append("externalId", externalId) + .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Asset.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Asset.java index a6c4c6b9ceb..f862ff323a4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Asset.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Asset.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -24,10 +25,8 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Asset asset = Asset.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              + *             .plusSources(sourcesBuilder -> sourcesBuilder)
                                                                                                                                                                                                *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              - *             .description(descriptionBuilder -> descriptionBuilder)
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -37,7 +36,7 @@ public interface Asset { /** - * + *

                                                                                                                                                                                              Unique identifier of the Asset. Not required when importing Assets using the Import API.

                                                                                                                                                                                              * @return id */ @NotNull @@ -46,6 +45,15 @@ public interface Asset { /** * + * @return sources + */ + @NotNull + @Valid + @JsonProperty("sources") + public List getSources(); + + /** + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              * @return name */ @NotNull @@ -54,61 +62,97 @@ public interface Asset { public LocalizedString getName(); /** - * + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @return description */ - @NotNull @Valid @JsonProperty("description") public LocalizedString getDescription(); /** - * + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @return tags + */ + + @JsonProperty("tags") + public List getTags(); + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @return custom */ - @NotNull @Valid @JsonProperty("custom") public CustomFields getCustom(); /** - * + *

                                                                                                                                                                                              User-defined identifier of the Asset. It is unique per Category or ProductVariant.

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

                                                                                                                                                                                              Unique identifier of the Asset. Not required when importing Assets using the Import API.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set name + * set sources + * @param sources values to be set + */ + + @JsonIgnore + public void setSources(final AssetSource... sources); + + /** + * set sources + * @param sources values to be set + */ + + public void setSources(final List sources); + + /** + *

                                                                                                                                                                                              Name of the Asset.

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

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @param description value to be set */ public void setDescription(final LocalizedString description); /** - * set custom + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @param tags values to be set + */ + + @JsonIgnore + public void setTags(final String... tags); + + /** + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @param tags values to be set + */ + + public void setTags(final List tags); + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @param custom value to be set */ public void setCustom(final CustomFields custom); /** - * set key + *

                                                                                                                                                                                              User-defined identifier of the Asset. It is unique per Category or ProductVariant.

                                                                                                                                                                                              * @param key value to be set */ @@ -130,8 +174,10 @@ public static Asset of() { public static Asset of(final Asset template) { AssetImpl instance = new AssetImpl(); instance.setId(template.getId()); + instance.setSources(template.getSources()); instance.setName(template.getName()); instance.setDescription(template.getDescription()); + instance.setTags(template.getTags()); instance.setCustom(template.getCustom()); instance.setKey(template.getKey()); return instance; @@ -151,9 +197,15 @@ public static Asset deepCopy(@Nullable final Asset template) { } AssetImpl instance = new AssetImpl(); instance.setId(template.getId()); + instance.setSources(Optional.ofNullable(template.getSources()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.AssetSource::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); instance.setDescription( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setTags(Optional.ofNullable(template.getTags()).map(ArrayList::new).orElse(null)); instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); instance.setKey(template.getKey()); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetBuilder.java index d59c214087c..979b15f8338 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,10 +17,8 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Asset asset = Asset.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              + *             .plusSources(sourcesBuilder -> sourcesBuilder)
                                                                                                                                                                                                *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              - *             .description(descriptionBuilder -> descriptionBuilder)
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -28,16 +28,24 @@ public class AssetBuilder implements Builder { private String id; + private java.util.List sources; + private com.commercetools.history.models.common.LocalizedString name; + @Nullable private com.commercetools.history.models.common.LocalizedString description; + @Nullable + private java.util.List tags; + + @Nullable private com.commercetools.history.models.common.CustomFields custom; + @Nullable private String key; /** - * set the value to the id + *

                                                                                                                                                                                              Unique identifier of the Asset. Not required when importing Assets using the Import API.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -48,7 +56,93 @@ public AssetBuilder id(final String id) { } /** - * set the value to the name using the builder function + * set values to the sources + * @param sources value to be set + * @return Builder + */ + + public AssetBuilder sources(final com.commercetools.history.models.common.AssetSource... sources) { + this.sources = new ArrayList<>(Arrays.asList(sources)); + return this; + } + + /** + * set value to the sources + * @param sources value to be set + * @return Builder + */ + + public AssetBuilder sources(final java.util.List sources) { + this.sources = sources; + return this; + } + + /** + * add values to the sources + * @param sources value to be set + * @return Builder + */ + + public AssetBuilder plusSources(final com.commercetools.history.models.common.AssetSource... sources) { + if (this.sources == null) { + this.sources = new ArrayList<>(); + } + this.sources.addAll(Arrays.asList(sources)); + return this; + } + + /** + * add the value to the sources using the builder function + * @param builder function to build the sources value + * @return Builder + */ + + public AssetBuilder plusSources( + Function builder) { + if (this.sources == null) { + this.sources = new ArrayList<>(); + } + this.sources.add(builder.apply(com.commercetools.history.models.common.AssetSourceBuilder.of()).build()); + return this; + } + + /** + * set the value to the sources using the builder function + * @param builder function to build the sources value + * @return Builder + */ + + public AssetBuilder withSources( + Function builder) { + this.sources = new ArrayList<>(); + this.sources.add(builder.apply(com.commercetools.history.models.common.AssetSourceBuilder.of()).build()); + return this; + } + + /** + * add the value to the sources using the builder function + * @param builder function to build the sources value + * @return Builder + */ + + public AssetBuilder addSources( + Function builder) { + return plusSources(builder.apply(com.commercetools.history.models.common.AssetSourceBuilder.of())); + } + + /** + * set the value to the sources using the builder function + * @param builder function to build the sources value + * @return Builder + */ + + public AssetBuilder setSources( + Function builder) { + return sources(builder.apply(com.commercetools.history.models.common.AssetSourceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -60,7 +154,7 @@ public AssetBuilder name( } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -72,7 +166,7 @@ public AssetBuilder withName( } /** - * set the value to the name + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -83,7 +177,7 @@ public AssetBuilder name(final com.commercetools.history.models.common.Localized } /** - * set the value to the description using the builder function + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @param builder function to build the description value * @return Builder */ @@ -95,7 +189,7 @@ public AssetBuilder description( } /** - * set the value to the description using the builder function + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @param builder function to build the description value * @return Builder */ @@ -107,18 +201,55 @@ public AssetBuilder withDescription( } /** - * set the value to the description + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @param description value to be set * @return Builder */ - public AssetBuilder description(final com.commercetools.history.models.common.LocalizedString description) { + public AssetBuilder description( + @Nullable final com.commercetools.history.models.common.LocalizedString description) { this.description = description; return this; } /** - * set the value to the custom using the builder function + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @param tags value to be set + * @return Builder + */ + + public AssetBuilder tags(@Nullable final String... tags) { + this.tags = new ArrayList<>(Arrays.asList(tags)); + return this; + } + + /** + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @param tags value to be set + * @return Builder + */ + + public AssetBuilder tags(@Nullable final java.util.List tags) { + this.tags = tags; + return this; + } + + /** + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @param tags value to be set + * @return Builder + */ + + public AssetBuilder plusTags(@Nullable final String... tags) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.addAll(Arrays.asList(tags)); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -130,7 +261,7 @@ public AssetBuilder custom( } /** - * set the value to the custom using the builder function + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -142,29 +273,29 @@ public AssetBuilder withCustom( } /** - * set the value to the custom + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @param custom value to be set * @return Builder */ - public AssetBuilder custom(final com.commercetools.history.models.common.CustomFields custom) { + public AssetBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { this.custom = custom; return this; } /** - * set the value to the key + *

                                                                                                                                                                                              User-defined identifier of the Asset. It is unique per Category or ProductVariant.

                                                                                                                                                                                              * @param key value to be set * @return Builder */ - public AssetBuilder key(final String key) { + public AssetBuilder key(@Nullable final String key) { this.key = key; return this; } /** - * value of id} + *

                                                                                                                                                                                              Unique identifier of the Asset. Not required when importing Assets using the Import API.

                                                                                                                                                                                              * @return id */ @@ -173,7 +304,16 @@ public String getId() { } /** - * value of name} + * value of sources} + * @return sources + */ + + public java.util.List getSources() { + return this.sources; + } + + /** + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              * @return name */ @@ -182,28 +322,41 @@ public com.commercetools.history.models.common.LocalizedString getName() { } /** - * value of description} + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              * @return description */ + @Nullable public com.commercetools.history.models.common.LocalizedString getDescription() { return this.description; } /** - * value of custom} + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + * @return tags + */ + + @Nullable + public java.util.List getTags() { + return this.tags; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              * @return custom */ + @Nullable public com.commercetools.history.models.common.CustomFields getCustom() { return this.custom; } /** - * value of key} + *

                                                                                                                                                                                              User-defined identifier of the Asset. It is unique per Category or ProductVariant.

                                                                                                                                                                                              * @return key */ + @Nullable public String getKey() { return this.key; } @@ -214,11 +367,9 @@ public String getKey() { */ public Asset build() { Objects.requireNonNull(id, Asset.class + ": id is missing"); + Objects.requireNonNull(sources, Asset.class + ": sources is missing"); Objects.requireNonNull(name, Asset.class + ": name is missing"); - Objects.requireNonNull(description, Asset.class + ": description is missing"); - Objects.requireNonNull(custom, Asset.class + ": custom is missing"); - Objects.requireNonNull(key, Asset.class + ": key is missing"); - return new AssetImpl(id, name, description, custom, key); + return new AssetImpl(id, sources, name, description, tags, custom, key); } /** @@ -226,7 +377,7 @@ public Asset build() { * @return Asset */ public Asset buildUnchecked() { - return new AssetImpl(id, name, description, custom, key); + return new AssetImpl(id, sources, name, description, tags, custom, key); } /** @@ -245,8 +396,10 @@ public static AssetBuilder of() { public static AssetBuilder of(final Asset template) { AssetBuilder builder = new AssetBuilder(); builder.id = template.getId(); + builder.sources = template.getSources(); builder.name = template.getName(); builder.description = template.getDescription(); + builder.tags = template.getTags(); builder.custom = template.getCustom(); builder.key = template.getKey(); return builder; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensions.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensions.java index 03646ef58d5..cc4659fb97b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensions.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensions.java @@ -15,15 +15,15 @@ import jakarta.validation.constraints.NotNull; /** - * AssetDimensions + *

                                                                                                                                                                                              Dimensions of the Asset source specified by the number of pixels.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     AssetDimensions assetDimensions = AssetDimensions.builder()
                                                                                                                                                                                              - *             .w(1)
                                                                                                                                                                                              - *             .h(1)
                                                                                                                                                                                              + *             .w(0.3)
                                                                                                                                                                                              + *             .h(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -33,7 +33,7 @@ public interface AssetDimensions { /** - * + *

                                                                                                                                                                                              Width of the Asset source.

                                                                                                                                                                                              * @return w */ @NotNull @@ -41,7 +41,7 @@ public interface AssetDimensions { public Integer getW(); /** - * + *

                                                                                                                                                                                              Height of the Asset source.

                                                                                                                                                                                              * @return h */ @NotNull @@ -49,14 +49,14 @@ public interface AssetDimensions { public Integer getH(); /** - * set w + *

                                                                                                                                                                                              Width of the Asset source.

                                                                                                                                                                                              * @param w value to be set */ public void setW(final Integer w); /** - * set h + *

                                                                                                                                                                                              Height of the Asset source.

                                                                                                                                                                                              * @param h value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsBuilder.java index c7f76f1241e..bab8885d88e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsBuilder.java @@ -13,8 +13,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     AssetDimensions assetDimensions = AssetDimensions.builder()
                                                                                                                                                                                              - *             .w(1)
                                                                                                                                                                                              - *             .h(1)
                                                                                                                                                                                              + *             .w(0.3)
                                                                                                                                                                                              + *             .h(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -27,7 +27,7 @@ public class AssetDimensionsBuilder implements Builder { private Integer h; /** - * set the value to the w + *

                                                                                                                                                                                              Width of the Asset source.

                                                                                                                                                                                              * @param w value to be set * @return Builder */ @@ -38,7 +38,7 @@ public AssetDimensionsBuilder w(final Integer w) { } /** - * set the value to the h + *

                                                                                                                                                                                              Height of the Asset source.

                                                                                                                                                                                              * @param h value to be set * @return Builder */ @@ -49,7 +49,7 @@ public AssetDimensionsBuilder h(final Integer h) { } /** - * value of w} + *

                                                                                                                                                                                              Width of the Asset source.

                                                                                                                                                                                              * @return w */ @@ -58,7 +58,7 @@ public Integer getW() { } /** - * value of h} + *

                                                                                                                                                                                              Height of the Asset source.

                                                                                                                                                                                              * @return h */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsImpl.java index 1bf94873f15..b319cd29769 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetDimensionsImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * AssetDimensions + *

                                                                                                                                                                                              Dimensions of the Asset source specified by the number of pixels.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AssetDimensionsImpl implements AssetDimensions, ModelBase { @@ -42,7 +42,7 @@ public AssetDimensionsImpl() { } /** - * + *

                                                                                                                                                                                              Width of the Asset source.

                                                                                                                                                                                              */ public Integer getW() { @@ -50,7 +50,7 @@ public Integer getW() { } /** - * + *

                                                                                                                                                                                              Height of the Asset source.

                                                                                                                                                                                              */ public Integer getH() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetImpl.java index 7f511aae876..6b2e4e3768f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetImpl.java @@ -24,10 +24,14 @@ public class AssetImpl implements Asset, ModelBase { private String id; + private java.util.List sources; + private com.commercetools.history.models.common.LocalizedString name; private com.commercetools.history.models.common.LocalizedString description; + private java.util.List tags; + private com.commercetools.history.models.common.CustomFields custom; private String key; @@ -37,13 +41,17 @@ public class AssetImpl implements Asset, ModelBase { */ @JsonCreator AssetImpl(@JsonProperty("id") final String id, + @JsonProperty("sources") final java.util.List sources, @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, @JsonProperty("description") final com.commercetools.history.models.common.LocalizedString description, + @JsonProperty("tags") final java.util.List tags, @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, @JsonProperty("key") final String key) { this.id = id; + this.sources = sources; this.name = name; this.description = description; + this.tags = tags; this.custom = custom; this.key = key; } @@ -55,7 +63,7 @@ public AssetImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of the Asset. Not required when importing Assets using the Import API.

                                                                                                                                                                                              */ public String getId() { @@ -66,12 +74,20 @@ public String getId() { * */ + public java.util.List getSources() { + return this.sources; + } + + /** + *

                                                                                                                                                                                              Name of the Asset.

                                                                                                                                                                                              + */ + public com.commercetools.history.models.common.LocalizedString getName() { return this.name; } /** - * + *

                                                                                                                                                                                              Description of the Asset.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getDescription() { @@ -79,7 +95,15 @@ public com.commercetools.history.models.common.LocalizedString getDescription() } /** - * + *

                                                                                                                                                                                              Keywords for categorizing and organizing Assets.

                                                                                                                                                                                              + */ + + public java.util.List getTags() { + return this.tags; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Asset.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.CustomFields getCustom() { @@ -87,7 +111,7 @@ public com.commercetools.history.models.common.CustomFields getCustom() { } /** - * + *

                                                                                                                                                                                              User-defined identifier of the Asset. It is unique per Category or ProductVariant.

                                                                                                                                                                                              */ public String getKey() { @@ -98,6 +122,14 @@ public void setId(final String id) { this.id = id; } + public void setSources(final com.commercetools.history.models.common.AssetSource... sources) { + this.sources = new ArrayList<>(Arrays.asList(sources)); + } + + public void setSources(final java.util.List sources) { + this.sources = sources; + } + public void setName(final com.commercetools.history.models.common.LocalizedString name) { this.name = name; } @@ -106,6 +138,14 @@ public void setDescription(final com.commercetools.history.models.common.Localiz this.description = description; } + public void setTags(final String... tags) { + this.tags = new ArrayList<>(Arrays.asList(tags)); + } + + public void setTags(final java.util.List tags) { + this.tags = tags; + } + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { this.custom = custom; } @@ -125,13 +165,17 @@ public boolean equals(Object o) { AssetImpl that = (AssetImpl) o; return new EqualsBuilder().append(id, that.id) + .append(sources, that.sources) .append(name, that.name) .append(description, that.description) + .append(tags, that.tags) .append(custom, that.custom) .append(key, that.key) .append(id, that.id) + .append(sources, that.sources) .append(name, that.name) .append(description, that.description) + .append(tags, that.tags) .append(custom, that.custom) .append(key, that.key) .isEquals(); @@ -140,8 +184,10 @@ public boolean equals(Object o) { @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(id) + .append(sources) .append(name) .append(description) + .append(tags) .append(custom) .append(key) .toHashCode(); @@ -150,8 +196,10 @@ public int hashCode() { @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("sources", sources) .append("name", name) .append("description", description) + .append("tags", tags) .append("custom", custom) .append("key", key) .build(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSource.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSource.java index 45c7d4a5c81..00d05191150 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSource.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSource.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - * AssetSource + *

                                                                                                                                                                                              Representation of an Asset in a specific format, for example a video in a certain encoding, or an image in a certain resolution.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -24,9 +24,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     AssetSource assetSource = AssetSource.builder()
                                                                                                                                                                                                *             .uri("{uri}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .dimensions(dimensionsBuilder -> dimensionsBuilder)
                                                                                                                                                                                              - *             .contentType("{contentType}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -36,7 +33,7 @@ public interface AssetSource { /** - * + *

                                                                                                                                                                                              URI of the AssetSource.

                                                                                                                                                                                              * @return uri */ @NotNull @@ -44,53 +41,52 @@ public interface AssetSource { public String getUri(); /** - * + *

                                                                                                                                                                                              User-defined identifier of the AssetSource. Must be unique per Asset.

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

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @return dimensions */ - @NotNull @Valid @JsonProperty("dimensions") public AssetDimensions getDimensions(); /** - * + *

                                                                                                                                                                                              Indicates the type of content, for example application/pdf.

                                                                                                                                                                                              * @return contentType */ - @NotNull + @JsonProperty("contentType") public String getContentType(); /** - * set uri + *

                                                                                                                                                                                              URI of the AssetSource.

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

                                                                                                                                                                                              User-defined identifier of the AssetSource. Must be unique per Asset.

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

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @param dimensions value to be set */ public void setDimensions(final AssetDimensions dimensions); /** - * set contentType + *

                                                                                                                                                                                              Indicates the type of content, for example application/pdf.

                                                                                                                                                                                              * @param contentType value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceBuilder.java index 0f7ef842e08..10f57b5b05f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,9 +17,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     AssetSource assetSource = AssetSource.builder()
                                                                                                                                                                                                *             .uri("{uri}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .dimensions(dimensionsBuilder -> dimensionsBuilder)
                                                                                                                                                                                              - *             .contentType("{contentType}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -27,14 +26,17 @@ public class AssetSourceBuilder implements Builder { private String uri; + @Nullable private String key; + @Nullable private com.commercetools.history.models.common.AssetDimensions dimensions; + @Nullable private String contentType; /** - * set the value to the uri + *

                                                                                                                                                                                              URI of the AssetSource.

                                                                                                                                                                                              * @param uri value to be set * @return Builder */ @@ -45,18 +47,18 @@ public AssetSourceBuilder uri(final String uri) { } /** - * set the value to the key + *

                                                                                                                                                                                              User-defined identifier of the AssetSource. Must be unique per Asset.

                                                                                                                                                                                              * @param key value to be set * @return Builder */ - public AssetSourceBuilder key(final String key) { + public AssetSourceBuilder key(@Nullable final String key) { this.key = key; return this; } /** - * set the value to the dimensions using the builder function + *

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @param builder function to build the dimensions value * @return Builder */ @@ -68,7 +70,7 @@ public AssetSourceBuilder dimensions( } /** - * set the value to the dimensions using the builder function + *

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @param builder function to build the dimensions value * @return Builder */ @@ -80,29 +82,30 @@ public AssetSourceBuilder withDimensions( } /** - * set the value to the dimensions + *

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @param dimensions value to be set * @return Builder */ - public AssetSourceBuilder dimensions(final com.commercetools.history.models.common.AssetDimensions dimensions) { + public AssetSourceBuilder dimensions( + @Nullable final com.commercetools.history.models.common.AssetDimensions dimensions) { this.dimensions = dimensions; return this; } /** - * set the value to the contentType + *

                                                                                                                                                                                              Indicates the type of content, for example application/pdf.

                                                                                                                                                                                              * @param contentType value to be set * @return Builder */ - public AssetSourceBuilder contentType(final String contentType) { + public AssetSourceBuilder contentType(@Nullable final String contentType) { this.contentType = contentType; return this; } /** - * value of uri} + *

                                                                                                                                                                                              URI of the AssetSource.

                                                                                                                                                                                              * @return uri */ @@ -111,28 +114,31 @@ public String getUri() { } /** - * value of key} + *

                                                                                                                                                                                              User-defined identifier of the AssetSource. Must be unique per Asset.

                                                                                                                                                                                              * @return key */ + @Nullable public String getKey() { return this.key; } /** - * value of dimensions} + *

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              * @return dimensions */ + @Nullable public com.commercetools.history.models.common.AssetDimensions getDimensions() { return this.dimensions; } /** - * value of contentType} + *

                                                                                                                                                                                              Indicates the type of content, for example application/pdf.

                                                                                                                                                                                              * @return contentType */ + @Nullable public String getContentType() { return this.contentType; } @@ -143,9 +149,6 @@ public String getContentType() { */ public AssetSource build() { Objects.requireNonNull(uri, AssetSource.class + ": uri is missing"); - Objects.requireNonNull(key, AssetSource.class + ": key is missing"); - Objects.requireNonNull(dimensions, AssetSource.class + ": dimensions is missing"); - Objects.requireNonNull(contentType, AssetSource.class + ": contentType is missing"); return new AssetSourceImpl(uri, key, dimensions, contentType); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceImpl.java index b40e8092a6e..231a8ef3e9e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssetSourceImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * AssetSource + *

                                                                                                                                                                                              Representation of an Asset in a specific format, for example a video in a certain encoding, or an image in a certain resolution.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AssetSourceImpl implements AssetSource, ModelBase { @@ -50,7 +50,7 @@ public AssetSourceImpl() { } /** - * + *

                                                                                                                                                                                              URI of the AssetSource.

                                                                                                                                                                                              */ public String getUri() { @@ -58,7 +58,7 @@ public String getUri() { } /** - * + *

                                                                                                                                                                                              User-defined identifier of the AssetSource. Must be unique per Asset.

                                                                                                                                                                                              */ public String getKey() { @@ -66,7 +66,7 @@ public String getKey() { } /** - * + *

                                                                                                                                                                                              Width and height of the AssetSource.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.AssetDimensions getDimensions() { @@ -74,7 +74,7 @@ public com.commercetools.history.models.common.AssetDimensions getDimensions() { } /** - * + *

                                                                                                                                                                                              Indicates the type of content, for example application/pdf.

                                                                                                                                                                                              */ public String getContentType() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Associate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Associate.java index 06f99e88e09..d5107959bb8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Associate.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Associate.java @@ -35,7 +35,7 @@ public interface Associate { /** - * + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @return associateRoleAssignments */ @NotNull @@ -44,16 +44,24 @@ public interface Associate { public List getAssociateRoleAssignments(); /** - * + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @return roles + */ + + @JsonProperty("roles") + public List getRoles(); + + /** + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @return customer */ @NotNull @Valid @JsonProperty("customer") - public Reference getCustomer(); + public CustomerReference getCustomer(); /** - * set associateRoleAssignments + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments values to be set */ @@ -61,18 +69,33 @@ public interface Associate { public void setAssociateRoleAssignments(final AssociateRoleAssignment... associateRoleAssignments); /** - * set associateRoleAssignments + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments values to be set */ public void setAssociateRoleAssignments(final List associateRoleAssignments); /** - * set customer + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @param roles values to be set + */ + + @JsonIgnore + public void setRoles(final AssociateRoleDeprecated... roles); + + /** + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @param roles values to be set + */ + + public void setRoles(final List roles); + + /** + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param customer value to be set */ - public void setCustomer(final Reference customer); + public void setCustomer(final CustomerReference customer); /** * factory method @@ -90,6 +113,7 @@ public static Associate of() { public static Associate of(final Associate template) { AssociateImpl instance = new AssociateImpl(); instance.setAssociateRoleAssignments(template.getAssociateRoleAssignments()); + instance.setRoles(template.getRoles()); instance.setCustomer(template.getCustomer()); return instance; } @@ -112,7 +136,9 @@ public static Associate deepCopy(@Nullable final Associate template) { .map(com.commercetools.history.models.common.AssociateRoleAssignment::deepCopy) .collect(Collectors.toList())) .orElse(null)); - instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer())); + instance.setRoles(Optional.ofNullable(template.getRoles()).map(ArrayList::new).orElse(null)); + instance.setCustomer( + com.commercetools.history.models.common.CustomerReference.deepCopy(template.getCustomer())); return instance; } 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 index d779495db29..d394067bd5c 100644 --- 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 @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -25,10 +27,13 @@ public class AssociateBuilder implements Builder { private java.util.List associateRoleAssignments; - private com.commercetools.history.models.common.Reference customer; + @Nullable + private java.util.List roles; + + private com.commercetools.history.models.common.CustomerReference customer; /** - * set values to the associateRoleAssignments + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -40,7 +45,7 @@ public AssociateBuilder associateRoleAssignments( } /** - * set value to the associateRoleAssignments + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -52,7 +57,7 @@ public AssociateBuilder associateRoleAssignments( } /** - * add values to the associateRoleAssignments + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -67,7 +72,7 @@ public AssociateBuilder plusAssociateRoleAssignments( } /** - * add the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -83,7 +88,7 @@ public AssociateBuilder plusAssociateRoleAssignments( } /** - * set the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -97,7 +102,7 @@ public AssociateBuilder withAssociateRoleAssignments( } /** - * add the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -109,7 +114,7 @@ public AssociateBuilder addAssociateRoleAssignments( } /** - * set the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -121,42 +126,81 @@ public AssociateBuilder setAssociateRoleAssignments( } /** - * set the value to the customer using the builder function + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @param roles value to be set + * @return Builder + */ + + public AssociateBuilder roles( + @Nullable final com.commercetools.history.models.common.AssociateRoleDeprecated... roles) { + this.roles = new ArrayList<>(Arrays.asList(roles)); + return this; + } + + /** + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @param roles value to be set + * @return Builder + */ + + public AssociateBuilder roles( + @Nullable final java.util.List roles) { + this.roles = roles; + return this; + } + + /** + *

                                                                                                                                                                                              Deprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @param roles value to be set + * @return Builder + */ + + public AssociateBuilder plusRoles( + @Nullable final com.commercetools.history.models.common.AssociateRoleDeprecated... roles) { + if (this.roles == null) { + this.roles = new ArrayList<>(); + } + this.roles.addAll(Arrays.asList(roles)); + return this; + } + + /** + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @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(); + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.CustomerReferenceBuilder.of()).build(); return this; } /** - * set the value to the customer using the builder function + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @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()); + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.CustomerReferenceBuilder.of()); return this; } /** - * set the value to the customer + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param customer value to be set * @return Builder */ - public AssociateBuilder customer(final com.commercetools.history.models.common.Reference customer) { + public AssociateBuilder customer(final com.commercetools.history.models.common.CustomerReference customer) { this.customer = customer; return this; } /** - * value of associateRoleAssignments} + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              * @return associateRoleAssignments */ @@ -165,11 +209,21 @@ public java.util.ListDeprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + * @return roles + */ + + @Nullable + public java.util.List getRoles() { + return this.roles; + } + + /** + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @return customer */ - public com.commercetools.history.models.common.Reference getCustomer() { + public com.commercetools.history.models.common.CustomerReference getCustomer() { return this.customer; } @@ -180,7 +234,7 @@ public com.commercetools.history.models.common.Reference getCustomer() { public Associate build() { Objects.requireNonNull(associateRoleAssignments, Associate.class + ": associateRoleAssignments is missing"); Objects.requireNonNull(customer, Associate.class + ": customer is missing"); - return new AssociateImpl(associateRoleAssignments, customer); + return new AssociateImpl(associateRoleAssignments, roles, customer); } /** @@ -188,7 +242,7 @@ public Associate build() { * @return Associate */ public Associate buildUnchecked() { - return new AssociateImpl(associateRoleAssignments, customer); + return new AssociateImpl(associateRoleAssignments, roles, customer); } /** @@ -207,6 +261,7 @@ public static AssociateBuilder of() { public static AssociateBuilder of(final Associate template) { AssociateBuilder builder = new AssociateBuilder(); builder.associateRoleAssignments = template.getAssociateRoleAssignments(); + builder.roles = template.getRoles(); 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 index aeeed49ffe9..d8b58e7441e 100644 --- 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 @@ -24,7 +24,9 @@ public class AssociateImpl implements Associate, ModelBase { private java.util.List associateRoleAssignments; - private com.commercetools.history.models.common.Reference customer; + private java.util.List roles; + + private com.commercetools.history.models.common.CustomerReference customer; /** * create instance with all properties @@ -32,8 +34,10 @@ public class AssociateImpl implements Associate, ModelBase { @JsonCreator AssociateImpl( @JsonProperty("associateRoleAssignments") final java.util.List associateRoleAssignments, - @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer) { + @JsonProperty("roles") final java.util.List roles, + @JsonProperty("customer") final com.commercetools.history.models.common.CustomerReference customer) { this.associateRoleAssignments = associateRoleAssignments; + this.roles = roles; this.customer = customer; } @@ -44,7 +48,7 @@ public AssociateImpl() { } /** - * + *

                                                                                                                                                                                              Roles assigned to the Associate within a Business Unit.

                                                                                                                                                                                              */ public java.util.List getAssociateRoleAssignments() { @@ -52,10 +56,18 @@ public java.util.ListDeprecated type. Use associateRoleAssignments instead.

                                                                                                                                                                                              + */ + + public java.util.List getRoles() { + return this.roles; + } + + /** + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getCustomer() { + public com.commercetools.history.models.common.CustomerReference getCustomer() { return this.customer; } @@ -69,7 +81,15 @@ public void setAssociateRoleAssignments( this.associateRoleAssignments = associateRoleAssignments; } - public void setCustomer(final com.commercetools.history.models.common.Reference customer) { + public void setRoles(final com.commercetools.history.models.common.AssociateRoleDeprecated... roles) { + this.roles = new ArrayList<>(Arrays.asList(roles)); + } + + public void setRoles(final java.util.List roles) { + this.roles = roles; + } + + public void setCustomer(final com.commercetools.history.models.common.CustomerReference customer) { this.customer = customer; } @@ -84,21 +104,24 @@ public boolean equals(Object o) { AssociateImpl that = (AssociateImpl) o; return new EqualsBuilder().append(associateRoleAssignments, that.associateRoleAssignments) + .append(roles, that.roles) .append(customer, that.customer) .append(associateRoleAssignments, that.associateRoleAssignments) + .append(roles, that.roles) .append(customer, that.customer) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(associateRoleAssignments).append(customer).toHashCode(); + return new HashCodeBuilder(17, 37).append(associateRoleAssignments).append(roles).append(customer).toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) .append("associateRoleAssignments", associateRoleAssignments) + .append("roles", roles) .append("customer", customer) .build(); } 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 index c98cda96b66..e301622018e 100644 --- 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 @@ -34,16 +34,16 @@ public interface AssociateRoleAssignment { /** - * + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @return associateRole */ @NotNull @Valid @JsonProperty("associateRole") - public KeyReference getAssociateRole(); + public AssociateRoleKeyReference getAssociateRole(); /** - *

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

                                                                                                                                                                                              + *

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

                                                                                                                                                                                              * @return inheritance */ @NotNull @@ -51,14 +51,14 @@ public interface AssociateRoleAssignment { public AssociateRoleInheritanceMode getInheritance(); /** - * set associateRole + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @param associateRole value to be set */ - public void setAssociateRole(final KeyReference associateRole); + public void setAssociateRole(final AssociateRoleKeyReference associateRole); /** - *

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

                                                                                                                                                                                              + *

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

                                                                                                                                                                                              * @param inheritance value to be set */ @@ -98,7 +98,7 @@ public static AssociateRoleAssignment deepCopy(@Nullable final AssociateRoleAssi } AssociateRoleAssignmentImpl instance = new AssociateRoleAssignmentImpl(); instance.setAssociateRole( - com.commercetools.history.models.common.KeyReference.deepCopy(template.getAssociateRole())); + com.commercetools.history.models.common.AssociateRoleKeyReference.deepCopy(template.getAssociateRole())); instance.setInheritance(template.getInheritance()); return instance; } 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 index 3ced9694d89..c5eff33dacc 100644 --- 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 @@ -23,48 +23,51 @@ @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.AssociateRoleKeyReference associateRole; private com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance; /** - * set the value to the associateRole using the builder function + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @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(); + Function builder) { + this.associateRole = builder + .apply(com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the associateRole using the builder function + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @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()); + Function builder) { + this.associateRole = builder + .apply(com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of()); return this; } /** - * set the value to the associateRole + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

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

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

                                                                                                                                                                                              + *

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

                                                                                                                                                                                              * @param inheritance value to be set * @return Builder */ @@ -76,16 +79,16 @@ public AssociateRoleAssignmentBuilder inheritance( } /** - * value of associateRole} + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @return associateRole */ - public com.commercetools.history.models.common.KeyReference getAssociateRole() { + public com.commercetools.history.models.common.AssociateRoleKeyReference getAssociateRole() { return this.associateRole; } /** - *

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

                                                                                                                                                                                              + *

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

                                                                                                                                                                                              * @return inheritance */ 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 index d2a943db8c8..d6726ce7721 100644 --- 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 @@ -22,7 +22,7 @@ @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.AssociateRoleKeyReference associateRole; private com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance; @@ -31,7 +31,7 @@ public class AssociateRoleAssignmentImpl implements AssociateRoleAssignment, Mod */ @JsonCreator AssociateRoleAssignmentImpl( - @JsonProperty("associateRole") final com.commercetools.history.models.common.KeyReference associateRole, + @JsonProperty("associateRole") final com.commercetools.history.models.common.AssociateRoleKeyReference associateRole, @JsonProperty("inheritance") final com.commercetools.history.models.common.AssociateRoleInheritanceMode inheritance) { this.associateRole = associateRole; this.inheritance = inheritance; @@ -44,22 +44,23 @@ public AssociateRoleAssignmentImpl() { } /** - * + *

                                                                                                                                                                                              Role the Associate holds within a Business Unit.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.KeyReference getAssociateRole() { + public com.commercetools.history.models.common.AssociateRoleKeyReference getAssociateRole() { return this.associateRole; } /** - *

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

                                                                                                                                                                                              + *

                                                                                                                                                                                              Determines whether the 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) { + public void setAssociateRole( + final com.commercetools.history.models.common.AssociateRoleKeyReference associateRole) { this.associateRole = associateRole; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleDeprecated.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleDeprecated.java new file mode 100644 index 00000000000..eb0ffb4c4d4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleDeprecated.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; + +/** + *

                                                                                                                                                                                              Roles defining how an Associate can interact with a Business Unit.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface AssociateRoleDeprecated extends JsonEnum { + + AssociateRoleDeprecated ADMIN = AssociateRoleDeprecatedEnum.ADMIN; + + AssociateRoleDeprecated BUYER = AssociateRoleDeprecatedEnum.BUYER; + + /** + * possible values of AssociateRoleDeprecated + */ + enum AssociateRoleDeprecatedEnum implements AssociateRoleDeprecated { + /** + * Admin + */ + ADMIN("Admin"), + + /** + * Buyer + */ + BUYER("Buyer"); + private final String jsonName; + + private AssociateRoleDeprecatedEnum(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 AssociateRoleDeprecated + * 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 AssociateRoleDeprecated findEnum(String value) { + return findEnumViaJsonName(value).orElse(new AssociateRoleDeprecated() { + @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 AssociateRoleDeprecated[] values() { + return AssociateRoleDeprecatedEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReference.java new file mode 100644 index 00000000000..9c2e2fc2067 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              KeyReference to an AssociateRole.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     AssociateRoleKeyReference associateRoleKeyReference = AssociateRoleKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("associate-role") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AssociateRoleKeyReferenceImpl.class) +public interface AssociateRoleKeyReference extends KeyReference { + + /** + * discriminator value for AssociateRoleKeyReference + */ + String ASSOCIATE_ROLE = "associate-role"; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced AssociateRole.

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

                                                                                                                                                                                              Unique and immutable key of the referenced AssociateRole.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of AssociateRoleKeyReference + */ + public static AssociateRoleKeyReference of() { + return new AssociateRoleKeyReferenceImpl(); + } + + /** + * factory method to create a shallow copy AssociateRoleKeyReference + * @param template instance to be copied + * @return copy instance + */ + public static AssociateRoleKeyReference of(final AssociateRoleKeyReference template) { + AssociateRoleKeyReferenceImpl instance = new AssociateRoleKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public AssociateRoleKeyReference copyDeep(); + + /** + * factory method to create a deep copy of AssociateRoleKeyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static AssociateRoleKeyReference deepCopy(@Nullable final AssociateRoleKeyReference template) { + if (template == null) { + return null; + } + AssociateRoleKeyReferenceImpl instance = new AssociateRoleKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for AssociateRoleKeyReference + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder builder() { + return AssociateRoleKeyReferenceBuilder.of(); + } + + /** + * create builder for AssociateRoleKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder builder(final AssociateRoleKeyReference template) { + return AssociateRoleKeyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAssociateRoleKeyReference(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/AssociateRoleKeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceBuilder.java new file mode 100644 index 00000000000..9a0a564e44d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AssociateRoleKeyReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     AssociateRoleKeyReference associateRoleKeyReference = AssociateRoleKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleKeyReferenceBuilder implements Builder { + + private String key; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced AssociateRole.

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

                                                                                                                                                                                              Unique and immutable key of the referenced AssociateRole.

                                                                                                                                                                                              + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * builds AssociateRoleKeyReference with checking for non-null required values + * @return AssociateRoleKeyReference + */ + public AssociateRoleKeyReference build() { + Objects.requireNonNull(key, AssociateRoleKeyReference.class + ": key is missing"); + return new AssociateRoleKeyReferenceImpl(key); + } + + /** + * builds AssociateRoleKeyReference without checking for non-null required values + * @return AssociateRoleKeyReference + */ + public AssociateRoleKeyReference buildUnchecked() { + return new AssociateRoleKeyReferenceImpl(key); + } + + /** + * factory method for an instance of AssociateRoleKeyReferenceBuilder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder of() { + return new AssociateRoleKeyReferenceBuilder(); + } + + /** + * create builder for AssociateRoleKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AssociateRoleKeyReferenceBuilder of(final AssociateRoleKeyReference template) { + AssociateRoleKeyReferenceBuilder builder = new AssociateRoleKeyReferenceBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceImpl.java new file mode 100644 index 00000000000..473414b2760 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              KeyReference to an AssociateRole.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AssociateRoleKeyReferenceImpl implements AssociateRoleKeyReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + AssociateRoleKeyReferenceImpl(@JsonProperty("key") final String key) { + this.key = key; + this.typeId = ReferenceTypeId.findEnum("associate-role"); + } + + /** + * create empty instance + */ + public AssociateRoleKeyReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("associate-role"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced AssociateRole.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AssociateRoleKeyReferenceImpl that = (AssociateRoleKeyReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(key, that.key) + .append(typeId, that.typeId) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("key", key) + .build(); + } + + @Override + public AssociateRoleKeyReference copyDeep() { + return AssociateRoleKeyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Attribute.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Attribute.java new file mode 100644 index 00000000000..f31bc290c13 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Attribute.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 com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * Attribute + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     Attribute attribute = Attribute.builder()
                                                                                                                                                                                              + *             .name("{name}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = AttributeImpl.class) +public interface Attribute { + + /** + *

                                                                                                                                                                                              Name of the Attribute.

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

                                                                                                                                                                                              The AttributeType determines the format of the Attribute value to be provided:

                                                                                                                                                                                              + * + * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

                                                                                                                                                                                              Name of the Attribute.

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

                                                                                                                                                                                              The AttributeType determines the format of the Attribute value to be provided:

                                                                                                                                                                                              + * + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of Attribute + */ + public static Attribute of() { + return new AttributeImpl(); + } + + /** + * factory method to create a shallow copy Attribute + * @param template instance to be copied + * @return copy instance + */ + public static Attribute of(final Attribute template) { + AttributeImpl instance = new AttributeImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + public Attribute copyDeep(); + + /** + * factory method to create a deep copy of Attribute + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Attribute deepCopy(@Nullable final Attribute template) { + if (template == null) { + return null; + } + AttributeImpl instance = new AttributeImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for Attribute + * @return builder + */ + public static AttributeBuilder builder() { + return AttributeBuilder.of(); + } + + /** + * create builder for Attribute instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AttributeBuilder builder(final Attribute template) { + return AttributeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withAttribute(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/AttributeBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeBuilder.java new file mode 100644 index 00000000000..7010c492314 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeBuilder.java @@ -0,0 +1,122 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * AttributeBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     Attribute attribute = Attribute.builder()
                                                                                                                                                                                              + *             .name("{name}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AttributeBuilder implements Builder { + + private String name; + + private java.lang.Object value; + + /** + *

                                                                                                                                                                                              Name of the Attribute.

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

                                                                                                                                                                                              The AttributeType determines the format of the Attribute value to be provided:

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

                                                                                                                                                                                              Name of the Attribute.

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

                                                                                                                                                                                              The AttributeType determines the format of the Attribute value to be provided:

                                                                                                                                                                                              + * + * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds Attribute with checking for non-null required values + * @return Attribute + */ + public Attribute build() { + Objects.requireNonNull(name, Attribute.class + ": name is missing"); + Objects.requireNonNull(value, Attribute.class + ": value is missing"); + return new AttributeImpl(name, value); + } + + /** + * builds Attribute without checking for non-null required values + * @return Attribute + */ + public Attribute buildUnchecked() { + return new AttributeImpl(name, value); + } + + /** + * factory method for an instance of AttributeBuilder + * @return builder + */ + public static AttributeBuilder of() { + return new AttributeBuilder(); + } + + /** + * create builder for Attribute instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static AttributeBuilder of(final Attribute template) { + AttributeBuilder builder = new AttributeBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeConstraintEnum.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeConstraintEnum.java index 3dce95f9904..c692d44f9ed 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeConstraintEnum.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeConstraintEnum.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * AttributeConstraintEnum + *

                                                                                                                                                                                              Specifies how an Attribute (or a set of Attributes) should be validated across all variants of a Product:

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface AttributeConstraintEnum extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinition.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinition.java index 47557137cdd..3eb5dba20ad 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinition.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinition.java @@ -27,8 +27,8 @@ * .name("{name}") * .label(labelBuilder -> labelBuilder) * .isRequired(true) + * .level(AttributeLevelEnum.PRODUCT) * .attributeConstraint(AttributeConstraintEnum.NONE) - * .inputTip(inputTipBuilder -> inputTipBuilder) * .inputHint(TextInputHint.SINGLE_LINE) * .isSearchable(true) * .build() @@ -40,7 +40,7 @@ public interface AttributeDefinition { /** - * + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @return type */ @NotNull @@ -49,7 +49,7 @@ public interface AttributeDefinition { public AttributeType getType(); /** - *

                                                                                                                                                                                              The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined name of the Attribute that is unique within the Project.

                                                                                                                                                                                              * @return name */ @NotNull @@ -57,7 +57,7 @@ public interface AttributeDefinition { public String getName(); /** - * + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @return label */ @NotNull @@ -66,7 +66,7 @@ public interface AttributeDefinition { public LocalizedString getLabel(); /** - *

                                                                                                                                                                                              Whether the attribute is required to have a value.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute must have a value on a ProductVariant.

                                                                                                                                                                                              * @return isRequired */ @NotNull @@ -74,7 +74,15 @@ public interface AttributeDefinition { public Boolean getIsRequired(); /** - * + *

                                                                                                                                                                                              Specifies whether the Attribute is defined at the Product or Variant level.

                                                                                                                                                                                              + * @return level + */ + @NotNull + @JsonProperty("level") + public AttributeLevelEnum getLevel(); + + /** + *

                                                                                                                                                                                              Specifies how Attributes are validated across all variants of a Product.

                                                                                                                                                                                              * @return attributeConstraint */ @NotNull @@ -82,16 +90,15 @@ public interface AttributeDefinition { public AttributeConstraintEnum getAttributeConstraint(); /** - * + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @return inputTip */ - @NotNull @Valid @JsonProperty("inputTip") public LocalizedString getInputTip(); /** - * + *

                                                                                                                                                                                              Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).

                                                                                                                                                                                              * @return inputHint */ @NotNull @@ -99,7 +106,8 @@ public interface AttributeDefinition { public TextInputHint getInputHint(); /** - *

                                                                                                                                                                                              Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets. However, if an Attribute's level is set as Product, then Product Projection Search does not support the Attribute.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The exact features that are available with this flag depend on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.

                                                                                                                                                                                              * @return isSearchable */ @NotNull @@ -107,56 +115,64 @@ public interface AttributeDefinition { public Boolean getIsSearchable(); /** - * set type + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @param type value to be set */ public void setType(final AttributeType type); /** - *

                                                                                                                                                                                              The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined name of the Attribute that is unique within the Project.

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

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @param label value to be set */ public void setLabel(final LocalizedString label); /** - *

                                                                                                                                                                                              Whether the attribute is required to have a value.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute must have a value on a ProductVariant.

                                                                                                                                                                                              * @param isRequired value to be set */ public void setIsRequired(final Boolean isRequired); /** - * set attributeConstraint + *

                                                                                                                                                                                              Specifies whether the Attribute is defined at the Product or Variant level.

                                                                                                                                                                                              + * @param level value to be set + */ + + public void setLevel(final AttributeLevelEnum level); + + /** + *

                                                                                                                                                                                              Specifies how Attributes are validated across all variants of a Product.

                                                                                                                                                                                              * @param attributeConstraint value to be set */ public void setAttributeConstraint(final AttributeConstraintEnum attributeConstraint); /** - * set inputTip + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @param inputTip value to be set */ public void setInputTip(final LocalizedString inputTip); /** - * set inputHint + *

                                                                                                                                                                                              Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).

                                                                                                                                                                                              * @param inputHint value to be set */ public void setInputHint(final TextInputHint inputHint); /** - *

                                                                                                                                                                                              Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets. However, if an Attribute's level is set as Product, then Product Projection Search does not support the Attribute.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The exact features that are available with this flag depend on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.

                                                                                                                                                                                              * @param isSearchable value to be set */ @@ -181,6 +197,7 @@ public static AttributeDefinition of(final AttributeDefinition template) { instance.setName(template.getName()); instance.setLabel(template.getLabel()); instance.setIsRequired(template.getIsRequired()); + instance.setLevel(template.getLevel()); instance.setAttributeConstraint(template.getAttributeConstraint()); instance.setInputTip(template.getInputTip()); instance.setInputHint(template.getInputHint()); @@ -205,6 +222,7 @@ public static AttributeDefinition deepCopy(@Nullable final AttributeDefinition t instance.setName(template.getName()); instance.setLabel(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLabel())); instance.setIsRequired(template.getIsRequired()); + instance.setLevel(template.getLevel()); instance.setAttributeConstraint(template.getAttributeConstraint()); instance.setInputTip(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getInputTip())); instance.setInputHint(template.getInputHint()); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionBuilder.java index 87580be613a..b4c15801e86 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -18,8 +20,8 @@ * .name("{name}") * .label(labelBuilder -> labelBuilder) * .isRequired(true) + * .level(AttributeLevelEnum.PRODUCT) * .attributeConstraint(AttributeConstraintEnum.NONE) - * .inputTip(inputTipBuilder -> inputTipBuilder) * .inputHint(TextInputHint.SINGLE_LINE) * .isSearchable(true) * .build() @@ -37,8 +39,11 @@ public class AttributeDefinitionBuilder implements Builder private Boolean isRequired; + private com.commercetools.history.models.common.AttributeLevelEnum level; + private com.commercetools.history.models.common.AttributeConstraintEnum attributeConstraint; + @Nullable private com.commercetools.history.models.common.LocalizedString inputTip; private com.commercetools.history.models.common.TextInputHint inputHint; @@ -46,7 +51,7 @@ public class AttributeDefinitionBuilder implements Builder private Boolean isSearchable; /** - * set the value to the type using the builder function + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @param builder function to build the type value * @return Builder */ @@ -58,7 +63,7 @@ public AttributeDefinitionBuilder type( } /** - * set the value to the type using the builder function + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @param builder function to build the type value * @return Builder */ @@ -70,7 +75,7 @@ public AttributeDefinitionBuilder withType( } /** - * set the value to the type + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @param type value to be set * @return Builder */ @@ -81,7 +86,7 @@ public AttributeDefinitionBuilder type(final com.commercetools.history.models.co } /** - *

                                                                                                                                                                                              The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined name of the Attribute that is unique within the Project.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -92,7 +97,7 @@ public AttributeDefinitionBuilder name(final String name) { } /** - * set the value to the label using the builder function + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @param builder function to build the label value * @return Builder */ @@ -104,7 +109,7 @@ public AttributeDefinitionBuilder label( } /** - * set the value to the label using the builder function + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @param builder function to build the label value * @return Builder */ @@ -116,7 +121,7 @@ public AttributeDefinitionBuilder withLabel( } /** - * set the value to the label + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @param label value to be set * @return Builder */ @@ -127,7 +132,7 @@ public AttributeDefinitionBuilder label(final com.commercetools.history.models.c } /** - *

                                                                                                                                                                                              Whether the attribute is required to have a value.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute must have a value on a ProductVariant.

                                                                                                                                                                                              * @param isRequired value to be set * @return Builder */ @@ -138,7 +143,18 @@ public AttributeDefinitionBuilder isRequired(final Boolean isRequired) { } /** - * set the value to the attributeConstraint + *

                                                                                                                                                                                              Specifies whether the Attribute is defined at the Product or Variant level.

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

                                                                                                                                                                                              Specifies how Attributes are validated across all variants of a Product.

                                                                                                                                                                                              * @param attributeConstraint value to be set * @return Builder */ @@ -150,7 +166,7 @@ public AttributeDefinitionBuilder attributeConstraint( } /** - * set the value to the inputTip using the builder function + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @param builder function to build the inputTip value * @return Builder */ @@ -162,7 +178,7 @@ public AttributeDefinitionBuilder inputTip( } /** - * set the value to the inputTip using the builder function + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @param builder function to build the inputTip value * @return Builder */ @@ -174,18 +190,19 @@ public AttributeDefinitionBuilder withInputTip( } /** - * set the value to the inputTip + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @param inputTip value to be set * @return Builder */ - public AttributeDefinitionBuilder inputTip(final com.commercetools.history.models.common.LocalizedString inputTip) { + public AttributeDefinitionBuilder inputTip( + @Nullable final com.commercetools.history.models.common.LocalizedString inputTip) { this.inputTip = inputTip; return this; } /** - * set the value to the inputHint + *

                                                                                                                                                                                              Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).

                                                                                                                                                                                              * @param inputHint value to be set * @return Builder */ @@ -196,7 +213,8 @@ public AttributeDefinitionBuilder inputHint(final com.commercetools.history.mode } /** - *

                                                                                                                                                                                              Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets. However, if an Attribute's level is set as Product, then Product Projection Search does not support the Attribute.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The exact features that are available with this flag depend on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.

                                                                                                                                                                                              * @param isSearchable value to be set * @return Builder */ @@ -207,7 +225,7 @@ public AttributeDefinitionBuilder isSearchable(final Boolean isSearchable) { } /** - * value of type} + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              * @return type */ @@ -216,7 +234,7 @@ public com.commercetools.history.models.common.AttributeType getType() { } /** - *

                                                                                                                                                                                              The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined name of the Attribute that is unique within the Project.

                                                                                                                                                                                              * @return name */ @@ -225,7 +243,7 @@ public String getName() { } /** - * value of label} + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              * @return label */ @@ -234,7 +252,7 @@ public com.commercetools.history.models.common.LocalizedString getLabel() { } /** - *

                                                                                                                                                                                              Whether the attribute is required to have a value.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute must have a value on a ProductVariant.

                                                                                                                                                                                              * @return isRequired */ @@ -243,7 +261,16 @@ public Boolean getIsRequired() { } /** - * value of attributeConstraint} + *

                                                                                                                                                                                              Specifies whether the Attribute is defined at the Product or Variant level.

                                                                                                                                                                                              + * @return level + */ + + public com.commercetools.history.models.common.AttributeLevelEnum getLevel() { + return this.level; + } + + /** + *

                                                                                                                                                                                              Specifies how Attributes are validated across all variants of a Product.

                                                                                                                                                                                              * @return attributeConstraint */ @@ -252,16 +279,17 @@ public com.commercetools.history.models.common.AttributeConstraintEnum getAttrib } /** - * value of inputTip} + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              * @return inputTip */ + @Nullable public com.commercetools.history.models.common.LocalizedString getInputTip() { return this.inputTip; } /** - * value of inputHint} + *

                                                                                                                                                                                              Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).

                                                                                                                                                                                              * @return inputHint */ @@ -270,7 +298,8 @@ public com.commercetools.history.models.common.TextInputHint getInputHint() { } /** - *

                                                                                                                                                                                              Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets. However, if an Attribute's level is set as Product, then Product Projection Search does not support the Attribute.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The exact features that are available with this flag depend on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.

                                                                                                                                                                                              * @return isSearchable */ @@ -287,12 +316,12 @@ public AttributeDefinition build() { Objects.requireNonNull(name, AttributeDefinition.class + ": name is missing"); Objects.requireNonNull(label, AttributeDefinition.class + ": label is missing"); Objects.requireNonNull(isRequired, AttributeDefinition.class + ": isRequired is missing"); + Objects.requireNonNull(level, AttributeDefinition.class + ": level is missing"); Objects.requireNonNull(attributeConstraint, AttributeDefinition.class + ": attributeConstraint is missing"); - Objects.requireNonNull(inputTip, AttributeDefinition.class + ": inputTip is missing"); Objects.requireNonNull(inputHint, AttributeDefinition.class + ": inputHint is missing"); Objects.requireNonNull(isSearchable, AttributeDefinition.class + ": isSearchable is missing"); - return new AttributeDefinitionImpl(type, name, label, isRequired, attributeConstraint, inputTip, inputHint, - isSearchable); + return new AttributeDefinitionImpl(type, name, label, isRequired, level, attributeConstraint, inputTip, + inputHint, isSearchable); } /** @@ -300,8 +329,8 @@ public AttributeDefinition build() { * @return AttributeDefinition */ public AttributeDefinition buildUnchecked() { - return new AttributeDefinitionImpl(type, name, label, isRequired, attributeConstraint, inputTip, inputHint, - isSearchable); + return new AttributeDefinitionImpl(type, name, label, isRequired, level, attributeConstraint, inputTip, + inputHint, isSearchable); } /** @@ -323,6 +352,7 @@ public static AttributeDefinitionBuilder of(final AttributeDefinition template) builder.name = template.getName(); builder.label = template.getLabel(); builder.isRequired = template.getIsRequired(); + builder.level = template.getLevel(); builder.attributeConstraint = template.getAttributeConstraint(); builder.inputTip = template.getInputTip(); builder.inputHint = template.getInputHint(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionImpl.java index 19ded19d017..7b8af743ccd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeDefinitionImpl.java @@ -30,6 +30,8 @@ public class AttributeDefinitionImpl implements AttributeDefinition, ModelBase { private Boolean isRequired; + private com.commercetools.history.models.common.AttributeLevelEnum level; + private com.commercetools.history.models.common.AttributeConstraintEnum attributeConstraint; private com.commercetools.history.models.common.LocalizedString inputTip; @@ -46,6 +48,7 @@ public class AttributeDefinitionImpl implements AttributeDefinition, ModelBase { @JsonProperty("name") final String name, @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label, @JsonProperty("isRequired") final Boolean isRequired, + @JsonProperty("level") final com.commercetools.history.models.common.AttributeLevelEnum level, @JsonProperty("attributeConstraint") final com.commercetools.history.models.common.AttributeConstraintEnum attributeConstraint, @JsonProperty("inputTip") final com.commercetools.history.models.common.LocalizedString inputTip, @JsonProperty("inputHint") final com.commercetools.history.models.common.TextInputHint inputHint, @@ -54,6 +57,7 @@ public class AttributeDefinitionImpl implements AttributeDefinition, ModelBase { this.name = name; this.label = label; this.isRequired = isRequired; + this.level = level; this.attributeConstraint = attributeConstraint; this.inputTip = inputTip; this.inputHint = inputHint; @@ -67,7 +71,7 @@ public AttributeDefinitionImpl() { } /** - * + *

                                                                                                                                                                                              Describes the Type of the Attribute.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.AttributeType getType() { @@ -75,7 +79,7 @@ public com.commercetools.history.models.common.AttributeType getType() { } /** - *

                                                                                                                                                                                              The unique name of the attribute used in the API. The name must be between two and 256 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). When using the same name for an attribute in two or more product types all fields of the AttributeDefinition of this attribute need to be the same across the product types, otherwise an AttributeDefinitionAlreadyExists error code will be returned. An exception to this are the values of an enum or lenum type and sets thereof.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined name of the Attribute that is unique within the Project.

                                                                                                                                                                                              */ public String getName() { @@ -83,7 +87,7 @@ public String getName() { } /** - * + *

                                                                                                                                                                                              Human-readable label for the Attribute.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getLabel() { @@ -91,7 +95,7 @@ public com.commercetools.history.models.common.LocalizedString getLabel() { } /** - *

                                                                                                                                                                                              Whether the attribute is required to have a value.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute must have a value on a ProductVariant.

                                                                                                                                                                                              */ public Boolean getIsRequired() { @@ -99,7 +103,15 @@ public Boolean getIsRequired() { } /** - * + *

                                                                                                                                                                                              Specifies whether the Attribute is defined at the Product or Variant level.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.AttributeLevelEnum getLevel() { + return this.level; + } + + /** + *

                                                                                                                                                                                              Specifies how Attributes are validated across all variants of a Product.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.AttributeConstraintEnum getAttributeConstraint() { @@ -107,7 +119,7 @@ public com.commercetools.history.models.common.AttributeConstraintEnum getAttrib } /** - * + *

                                                                                                                                                                                              Provides additional Attribute information to aid content managers configure Product details.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getInputTip() { @@ -115,7 +127,7 @@ public com.commercetools.history.models.common.LocalizedString getInputTip() { } /** - * + *

                                                                                                                                                                                              Provides a visual representation directive for values of this Attribute (only relevant for AttributeTextType and AttributeLocalizableTextType).

                                                                                                                                                                                              */ public com.commercetools.history.models.common.TextInputHint getInputHint() { @@ -123,7 +135,8 @@ public com.commercetools.history.models.common.TextInputHint getInputHint() { } /** - *

                                                                                                                                                                                              Whether the attribute's values should generally be enabled in product search. This determines whether the value is stored in products for matching terms in the context of full-text search queries and can be used in facets & filters as part of product search queries. The exact features that are enabled/disabled with this flag depend on the concrete attribute type and are described there. The max size of a searchable field is restricted to 10922 characters. This constraint is enforced at both product creation and product update. If the length of the input exceeds the maximum size an InvalidField error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If true, the Attribute's values are available in the Product Search or the Product Projection Search API for use in full-text search queries, filters, and facets. However, if an Attribute's level is set as Product, then Product Projection Search does not support the Attribute.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The exact features that are available with this flag depend on the specific AttributeType. The maximum size of a searchable field is restricted by the Field content size limit. This constraint is enforced at both Product creation and Product update. If the length of the input exceeds the maximum size, an InvalidField error is returned.

                                                                                                                                                                                              */ public Boolean getIsSearchable() { @@ -146,6 +159,10 @@ public void setIsRequired(final Boolean isRequired) { this.isRequired = isRequired; } + public void setLevel(final com.commercetools.history.models.common.AttributeLevelEnum level) { + this.level = level; + } + public void setAttributeConstraint( final com.commercetools.history.models.common.AttributeConstraintEnum attributeConstraint) { this.attributeConstraint = attributeConstraint; @@ -177,6 +194,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(label, that.label) .append(isRequired, that.isRequired) + .append(level, that.level) .append(attributeConstraint, that.attributeConstraint) .append(inputTip, that.inputTip) .append(inputHint, that.inputHint) @@ -185,6 +203,7 @@ public boolean equals(Object o) { .append(name, that.name) .append(label, that.label) .append(isRequired, that.isRequired) + .append(level, that.level) .append(attributeConstraint, that.attributeConstraint) .append(inputTip, that.inputTip) .append(inputHint, that.inputHint) @@ -198,6 +217,7 @@ public int hashCode() { .append(name) .append(label) .append(isRequired) + .append(level) .append(attributeConstraint) .append(inputTip) .append(inputHint) @@ -211,6 +231,7 @@ public String toString() { .append("name", name) .append("label", label) .append("isRequired", isRequired) + .append("level", level) .append("attributeConstraint", attributeConstraint) .append("inputTip", inputTip) .append("inputHint", inputHint) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeImpl.java new file mode 100644 index 00000000000..ff18eb1c735 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeImpl.java @@ -0,0 +1,109 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * Attribute + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class AttributeImpl implements Attribute, ModelBase { + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + AttributeImpl(@JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.name = name; + this.value = value; + } + + /** + * create empty instance + */ + public AttributeImpl() { + } + + /** + *

                                                                                                                                                                                              Name of the Attribute.

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

                                                                                                                                                                                              The AttributeType determines the format of the Attribute value to be provided:

                                                                                                                                                                                              + * + */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + AttributeImpl that = (AttributeImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(value, that.value) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("value", value) + .build(); + } + + @Override + public Attribute copyDeep() { + return Attribute.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeLevelEnum.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeLevelEnum.java new file mode 100644 index 00000000000..974fbb56082 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeLevelEnum.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; + +/** + * AttributeLevelEnum + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface AttributeLevelEnum extends JsonEnum { + + AttributeLevelEnum PRODUCT = AttributeLevelEnumEnum.PRODUCT; + + AttributeLevelEnum VARIANT = AttributeLevelEnumEnum.VARIANT; + + /** + * possible values of AttributeLevelEnum + */ + enum AttributeLevelEnumEnum implements AttributeLevelEnum { + /** + * Product + */ + PRODUCT("Product"), + + /** + * Variant + */ + VARIANT("Variant"); + private final String jsonName; + + private AttributeLevelEnumEnum(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 AttributeLevelEnum + * 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 AttributeLevelEnum findEnum(String value) { + return findEnumViaJsonName(value).orElse(new AttributeLevelEnum() { + @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 AttributeLevelEnum[] values() { + return AttributeLevelEnumEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeType.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeType.java index ea781ae137a..959bb6e9540 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeType.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeType.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - * AttributeType + *

                                                                                                                                                                                              Umbrella type for specific attribute types discriminated by property name.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeTypeImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeTypeImpl.java index f553cdc6651..8fc9e660d7d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeTypeImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/AttributeTypeImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * AttributeType + *

                                                                                                                                                                                              Umbrella type for specific attribute types discriminated by property name.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class AttributeTypeImpl implements AttributeType, ModelBase { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddress.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddress.java new file mode 100644 index 00000000000..da18df4d754 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddress.java @@ -0,0 +1,538 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Polymorphic base type that represents a postal address and contact details. Depending on the read or write action, it can be either Address or AddressDraft that only differ in the data type for the optional custom field.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     BaseAddress baseAddress = BaseAddress.builder()
                                                                                                                                                                                              + *             .country("{country}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BaseAddressImpl.class) +public interface BaseAddress { + + /** + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              + * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

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

                                                                                                                                                                                              Name of the country.

                                                                                                                                                                                              + * @return country + */ + @NotNull + @JsonProperty("country") + public String getCountry(); + + /** + *

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              + * @return title + */ + + @JsonProperty("title") + public String getTitle(); + + /** + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              + * @return salutation + */ + + @JsonProperty("salutation") + public String getSalutation(); + + /** + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              + * @return firstName + */ + + @JsonProperty("firstName") + public String getFirstName(); + + /** + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              + * @return lastName + */ + + @JsonProperty("lastName") + public String getLastName(); + + /** + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              + * @return streetName + */ + + @JsonProperty("streetName") + public String getStreetName(); + + /** + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              + * @return streetNumber + */ + + @JsonProperty("streetNumber") + public String getStreetNumber(); + + /** + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              + * @return additionalStreetInfo + */ + + @JsonProperty("additionalStreetInfo") + public String getAdditionalStreetInfo(); + + /** + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              + * @return postalCode + */ + + @JsonProperty("postalCode") + public String getPostalCode(); + + /** + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              + * @return city + */ + + @JsonProperty("city") + public String getCity(); + + /** + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              + * @return region + */ + + @JsonProperty("region") + public String getRegion(); + + /** + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              + * @return state + */ + + @JsonProperty("state") + public String getState(); + + /** + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              + * @return company + */ + + @JsonProperty("company") + public String getCompany(); + + /** + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              + * @return department + */ + + @JsonProperty("department") + public String getDepartment(); + + /** + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              + * @return building + */ + + @JsonProperty("building") + public String getBuilding(); + + /** + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              + * @return apartment + */ + + @JsonProperty("apartment") + public String getApartment(); + + /** + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              + * @return pOBox + */ + + @JsonProperty("pOBox") + public String getPOBox(); + + /** + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              + * @return phone + */ + + @JsonProperty("phone") + public String getPhone(); + + /** + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              + * @return mobile + */ + + @JsonProperty("mobile") + public String getMobile(); + + /** + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              + * @return email + */ + + @JsonProperty("email") + public String getEmail(); + + /** + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              + * @return fax + */ + + @JsonProperty("fax") + public String getFax(); + + /** + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              + * @return additionalAddressInfo + */ + + @JsonProperty("additionalAddressInfo") + public String getAdditionalAddressInfo(); + + /** + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              + * @return externalId + */ + + @JsonProperty("externalId") + public String getExternalId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

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

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

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

                                                                                                                                                                                              Name of the country.

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

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

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

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

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

                                                                                                                                                                                              Given name (first name) of the contact.

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

                                                                                                                                                                                              Family name (last name) of the contact.

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

                                                                                                                                                                                              Name of the street.

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

                                                                                                                                                                                              Street number.

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

                                                                                                                                                                                              Further information on the street address.

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

                                                                                                                                                                                              Postal code.

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

                                                                                                                                                                                              Name of the city.

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

                                                                                                                                                                                              Name of the region.

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

                                                                                                                                                                                              Name of the state, for example, Colorado.

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

                                                                                                                                                                                              Name of the company.

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

                                                                                                                                                                                              Name of the department.

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

                                                                                                                                                                                              Number or name of the building.

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

                                                                                                                                                                                              Number or name of the apartment.

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

                                                                                                                                                                                              Post office box number.

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

                                                                                                                                                                                              Phone number of the contact.

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

                                                                                                                                                                                              Mobile phone number of the contact.

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

                                                                                                                                                                                              Email address of the contact.

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

                                                                                                                                                                                              Fax number of the contact.

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

                                                                                                                                                                                              Further information on the Address.

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

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              + * @param externalId value to be set + */ + + public void setExternalId(final String externalId); + + /** + * factory method + * @return instance of BaseAddress + */ + public static BaseAddress of() { + return new BaseAddressImpl(); + } + + /** + * factory method to create a shallow copy BaseAddress + * @param template instance to be copied + * @return copy instance + */ + public static BaseAddress of(final BaseAddress template) { + BaseAddressImpl instance = new BaseAddressImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setCountry(template.getCountry()); + instance.setTitle(template.getTitle()); + instance.setSalutation(template.getSalutation()); + instance.setFirstName(template.getFirstName()); + instance.setLastName(template.getLastName()); + instance.setStreetName(template.getStreetName()); + instance.setStreetNumber(template.getStreetNumber()); + instance.setAdditionalStreetInfo(template.getAdditionalStreetInfo()); + instance.setPostalCode(template.getPostalCode()); + instance.setCity(template.getCity()); + instance.setRegion(template.getRegion()); + instance.setState(template.getState()); + instance.setCompany(template.getCompany()); + instance.setDepartment(template.getDepartment()); + instance.setBuilding(template.getBuilding()); + instance.setApartment(template.getApartment()); + instance.setPOBox(template.getPOBox()); + instance.setPhone(template.getPhone()); + instance.setMobile(template.getMobile()); + instance.setEmail(template.getEmail()); + instance.setFax(template.getFax()); + instance.setAdditionalAddressInfo(template.getAdditionalAddressInfo()); + instance.setExternalId(template.getExternalId()); + return instance; + } + + public BaseAddress copyDeep(); + + /** + * factory method to create a deep copy of BaseAddress + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BaseAddress deepCopy(@Nullable final BaseAddress template) { + if (template == null) { + return null; + } + + if (!(template instanceof BaseAddressImpl)) { + return template.copyDeep(); + } + BaseAddressImpl instance = new BaseAddressImpl(); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setCountry(template.getCountry()); + instance.setTitle(template.getTitle()); + instance.setSalutation(template.getSalutation()); + instance.setFirstName(template.getFirstName()); + instance.setLastName(template.getLastName()); + instance.setStreetName(template.getStreetName()); + instance.setStreetNumber(template.getStreetNumber()); + instance.setAdditionalStreetInfo(template.getAdditionalStreetInfo()); + instance.setPostalCode(template.getPostalCode()); + instance.setCity(template.getCity()); + instance.setRegion(template.getRegion()); + instance.setState(template.getState()); + instance.setCompany(template.getCompany()); + instance.setDepartment(template.getDepartment()); + instance.setBuilding(template.getBuilding()); + instance.setApartment(template.getApartment()); + instance.setPOBox(template.getPOBox()); + instance.setPhone(template.getPhone()); + instance.setMobile(template.getMobile()); + instance.setEmail(template.getEmail()); + instance.setFax(template.getFax()); + instance.setAdditionalAddressInfo(template.getAdditionalAddressInfo()); + instance.setExternalId(template.getExternalId()); + return instance; + } + + /** + * builder factory method for BaseAddress + * @return builder + */ + public static BaseAddressBuilder builder() { + return BaseAddressBuilder.of(); + } + + /** + * create builder for BaseAddress instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BaseAddressBuilder builder(final BaseAddress template) { + return BaseAddressBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBaseAddress(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/BaseAddressBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddressBuilder.java new file mode 100644 index 00000000000..a7553bca4a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddressBuilder.java @@ -0,0 +1,690 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BaseAddressBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     BaseAddress baseAddress = BaseAddress.builder()
                                                                                                                                                                                              + *             .country("{country}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BaseAddressBuilder implements Builder { + + @Nullable + private String id; + + @Nullable + private String key; + + private String country; + + @Nullable + private String title; + + @Nullable + private String salutation; + + @Nullable + private String firstName; + + @Nullable + private String lastName; + + @Nullable + private String streetName; + + @Nullable + private String streetNumber; + + @Nullable + private String additionalStreetInfo; + + @Nullable + private String postalCode; + + @Nullable + private String city; + + @Nullable + private String region; + + @Nullable + private String state; + + @Nullable + private String company; + + @Nullable + private String department; + + @Nullable + private String building; + + @Nullable + private String apartment; + + @Nullable + private String pOBox; + + @Nullable + private String phone; + + @Nullable + private String mobile; + + @Nullable + private String email; + + @Nullable + private String fax; + + @Nullable + private String additionalAddressInfo; + + @Nullable + private String externalId; + + /** + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

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

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

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

                                                                                                                                                                                              Name of the country.

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

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

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

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

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

                                                                                                                                                                                              Given name (first name) of the contact.

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

                                                                                                                                                                                              Family name (last name) of the contact.

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

                                                                                                                                                                                              Name of the street.

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

                                                                                                                                                                                              Street number.

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

                                                                                                                                                                                              Further information on the street address.

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

                                                                                                                                                                                              Postal code.

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

                                                                                                                                                                                              Name of the city.

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

                                                                                                                                                                                              Name of the region.

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

                                                                                                                                                                                              Name of the state, for example, Colorado.

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

                                                                                                                                                                                              Name of the company.

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

                                                                                                                                                                                              Name of the department.

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

                                                                                                                                                                                              Number or name of the building.

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

                                                                                                                                                                                              Number or name of the apartment.

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

                                                                                                                                                                                              Post office box number.

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

                                                                                                                                                                                              Phone number of the contact.

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

                                                                                                                                                                                              Mobile phone number of the contact.

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

                                                                                                                                                                                              Email address of the contact.

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

                                                                                                                                                                                              Fax number of the contact.

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

                                                                                                                                                                                              Further information on the Address.

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

                                                                                                                                                                                              ID for the contact used in an external system.

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

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              + * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

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

                                                                                                                                                                                              Name of the country.

                                                                                                                                                                                              + * @return country + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              + * @return title + */ + + @Nullable + public String getTitle() { + return this.title; + } + + /** + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              + * @return salutation + */ + + @Nullable + public String getSalutation() { + return this.salutation; + } + + /** + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              + * @return firstName + */ + + @Nullable + public String getFirstName() { + return this.firstName; + } + + /** + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              + * @return lastName + */ + + @Nullable + public String getLastName() { + return this.lastName; + } + + /** + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              + * @return streetName + */ + + @Nullable + public String getStreetName() { + return this.streetName; + } + + /** + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              + * @return streetNumber + */ + + @Nullable + public String getStreetNumber() { + return this.streetNumber; + } + + /** + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              + * @return additionalStreetInfo + */ + + @Nullable + public String getAdditionalStreetInfo() { + return this.additionalStreetInfo; + } + + /** + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              + * @return postalCode + */ + + @Nullable + public String getPostalCode() { + return this.postalCode; + } + + /** + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              + * @return city + */ + + @Nullable + public String getCity() { + return this.city; + } + + /** + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              + * @return region + */ + + @Nullable + public String getRegion() { + return this.region; + } + + /** + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              + * @return state + */ + + @Nullable + public String getState() { + return this.state; + } + + /** + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              + * @return company + */ + + @Nullable + public String getCompany() { + return this.company; + } + + /** + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              + * @return department + */ + + @Nullable + public String getDepartment() { + return this.department; + } + + /** + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              + * @return building + */ + + @Nullable + public String getBuilding() { + return this.building; + } + + /** + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              + * @return apartment + */ + + @Nullable + public String getApartment() { + return this.apartment; + } + + /** + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              + * @return pOBox + */ + + @Nullable + public String getPOBox() { + return this.pOBox; + } + + /** + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              + * @return phone + */ + + @Nullable + public String getPhone() { + return this.phone; + } + + /** + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              + * @return mobile + */ + + @Nullable + public String getMobile() { + return this.mobile; + } + + /** + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              + * @return email + */ + + @Nullable + public String getEmail() { + return this.email; + } + + /** + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              + * @return fax + */ + + @Nullable + public String getFax() { + return this.fax; + } + + /** + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              + * @return additionalAddressInfo + */ + + @Nullable + public String getAdditionalAddressInfo() { + return this.additionalAddressInfo; + } + + /** + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              + * @return externalId + */ + + @Nullable + public String getExternalId() { + return this.externalId; + } + + /** + * builds BaseAddress with checking for non-null required values + * @return BaseAddress + */ + public BaseAddress build() { + Objects.requireNonNull(country, BaseAddress.class + ": country is missing"); + return new BaseAddressImpl(id, key, country, title, salutation, firstName, lastName, streetName, streetNumber, + additionalStreetInfo, postalCode, city, region, state, company, department, building, apartment, pOBox, + phone, mobile, email, fax, additionalAddressInfo, externalId); + } + + /** + * builds BaseAddress without checking for non-null required values + * @return BaseAddress + */ + public BaseAddress buildUnchecked() { + return new BaseAddressImpl(id, key, country, title, salutation, firstName, lastName, streetName, streetNumber, + additionalStreetInfo, postalCode, city, region, state, company, department, building, apartment, pOBox, + phone, mobile, email, fax, additionalAddressInfo, externalId); + } + + /** + * factory method for an instance of BaseAddressBuilder + * @return builder + */ + public static BaseAddressBuilder of() { + return new BaseAddressBuilder(); + } + + /** + * create builder for BaseAddress instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BaseAddressBuilder of(final BaseAddress template) { + BaseAddressBuilder builder = new BaseAddressBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + builder.country = template.getCountry(); + builder.title = template.getTitle(); + builder.salutation = template.getSalutation(); + builder.firstName = template.getFirstName(); + builder.lastName = template.getLastName(); + builder.streetName = template.getStreetName(); + builder.streetNumber = template.getStreetNumber(); + builder.additionalStreetInfo = template.getAdditionalStreetInfo(); + builder.postalCode = template.getPostalCode(); + builder.city = template.getCity(); + builder.region = template.getRegion(); + builder.state = template.getState(); + builder.company = template.getCompany(); + builder.department = template.getDepartment(); + builder.building = template.getBuilding(); + builder.apartment = template.getApartment(); + builder.pOBox = template.getPOBox(); + builder.phone = template.getPhone(); + builder.mobile = template.getMobile(); + builder.email = template.getEmail(); + builder.fax = template.getFax(); + builder.additionalAddressInfo = template.getAdditionalAddressInfo(); + builder.externalId = template.getExternalId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddressImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddressImpl.java new file mode 100644 index 00000000000..9aa7e0ad0f6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BaseAddressImpl.java @@ -0,0 +1,555 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Polymorphic base type that represents a postal address and contact details. Depending on the read or write action, it can be either Address or AddressDraft that only differ in the data type for the optional custom field.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BaseAddressImpl implements BaseAddress, ModelBase { + + private String id; + + private String key; + + private String country; + + private String title; + + private String salutation; + + private String firstName; + + private String lastName; + + private String streetName; + + private String streetNumber; + + private String additionalStreetInfo; + + private String postalCode; + + private String city; + + private String region; + + private String state; + + private String company; + + private String department; + + private String building; + + private String apartment; + + private String pOBox; + + private String phone; + + private String mobile; + + private String email; + + private String fax; + + private String additionalAddressInfo; + + private String externalId; + + /** + * create instance with all properties + */ + @JsonCreator + BaseAddressImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("country") final String country, @JsonProperty("title") final String title, + @JsonProperty("salutation") final String salutation, @JsonProperty("firstName") final String firstName, + @JsonProperty("lastName") final String lastName, @JsonProperty("streetName") final String streetName, + @JsonProperty("streetNumber") final String streetNumber, + @JsonProperty("additionalStreetInfo") final String additionalStreetInfo, + @JsonProperty("postalCode") final String postalCode, @JsonProperty("city") final String city, + @JsonProperty("region") final String region, @JsonProperty("state") final String state, + @JsonProperty("company") final String company, @JsonProperty("department") final String department, + @JsonProperty("building") final String building, @JsonProperty("apartment") final String apartment, + @JsonProperty("pOBox") final String pOBox, @JsonProperty("phone") final String phone, + @JsonProperty("mobile") final String mobile, @JsonProperty("email") final String email, + @JsonProperty("fax") final String fax, + @JsonProperty("additionalAddressInfo") final String additionalAddressInfo, + @JsonProperty("externalId") final String externalId) { + this.id = id; + this.key = key; + this.country = country; + this.title = title; + this.salutation = salutation; + this.firstName = firstName; + this.lastName = lastName; + this.streetName = streetName; + this.streetNumber = streetNumber; + this.additionalStreetInfo = additionalStreetInfo; + this.postalCode = postalCode; + this.city = city; + this.region = region; + this.state = state; + this.company = company; + this.department = department; + this.building = building; + this.apartment = apartment; + this.pOBox = pOBox; + this.phone = phone; + this.mobile = mobile; + this.email = email; + this.fax = fax; + this.additionalAddressInfo = additionalAddressInfo; + this.externalId = externalId; + } + + /** + * create empty instance + */ + public BaseAddressImpl() { + } + + /** + *

                                                                                                                                                                                              Unique identifier of the Address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use key instead and omit this field from the request to let the API generate the ID for the Address.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined identifier of the Address that must be unique when multiple addresses are referenced in BusinessUnits, Customers, and itemShippingAddresses (LineItem-specific addresses) of a Cart, Order, QuoteRequest, or Quote.

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

                                                                                                                                                                                              Name of the country.

                                                                                                                                                                                              + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Title of the contact, for example 'Dr.'

                                                                                                                                                                                              + */ + + public String getTitle() { + return this.title; + } + + /** + *

                                                                                                                                                                                              Salutation of the contact, for example 'Mr.' or 'Ms.'

                                                                                                                                                                                              + */ + + public String getSalutation() { + return this.salutation; + } + + /** + *

                                                                                                                                                                                              Given name (first name) of the contact.

                                                                                                                                                                                              + */ + + public String getFirstName() { + return this.firstName; + } + + /** + *

                                                                                                                                                                                              Family name (last name) of the contact.

                                                                                                                                                                                              + */ + + public String getLastName() { + return this.lastName; + } + + /** + *

                                                                                                                                                                                              Name of the street.

                                                                                                                                                                                              + */ + + public String getStreetName() { + return this.streetName; + } + + /** + *

                                                                                                                                                                                              Street number.

                                                                                                                                                                                              + */ + + public String getStreetNumber() { + return this.streetNumber; + } + + /** + *

                                                                                                                                                                                              Further information on the street address.

                                                                                                                                                                                              + */ + + public String getAdditionalStreetInfo() { + return this.additionalStreetInfo; + } + + /** + *

                                                                                                                                                                                              Postal code.

                                                                                                                                                                                              + */ + + public String getPostalCode() { + return this.postalCode; + } + + /** + *

                                                                                                                                                                                              Name of the city.

                                                                                                                                                                                              + */ + + public String getCity() { + return this.city; + } + + /** + *

                                                                                                                                                                                              Name of the region.

                                                                                                                                                                                              + */ + + public String getRegion() { + return this.region; + } + + /** + *

                                                                                                                                                                                              Name of the state, for example, Colorado.

                                                                                                                                                                                              + */ + + public String getState() { + return this.state; + } + + /** + *

                                                                                                                                                                                              Name of the company.

                                                                                                                                                                                              + */ + + public String getCompany() { + return this.company; + } + + /** + *

                                                                                                                                                                                              Name of the department.

                                                                                                                                                                                              + */ + + public String getDepartment() { + return this.department; + } + + /** + *

                                                                                                                                                                                              Number or name of the building.

                                                                                                                                                                                              + */ + + public String getBuilding() { + return this.building; + } + + /** + *

                                                                                                                                                                                              Number or name of the apartment.

                                                                                                                                                                                              + */ + + public String getApartment() { + return this.apartment; + } + + /** + *

                                                                                                                                                                                              Post office box number.

                                                                                                                                                                                              + */ + + public String getPOBox() { + return this.pOBox; + } + + /** + *

                                                                                                                                                                                              Phone number of the contact.

                                                                                                                                                                                              + */ + + public String getPhone() { + return this.phone; + } + + /** + *

                                                                                                                                                                                              Mobile phone number of the contact.

                                                                                                                                                                                              + */ + + public String getMobile() { + return this.mobile; + } + + /** + *

                                                                                                                                                                                              Email address of the contact.

                                                                                                                                                                                              + */ + + public String getEmail() { + return this.email; + } + + /** + *

                                                                                                                                                                                              Fax number of the contact.

                                                                                                                                                                                              + */ + + public String getFax() { + return this.fax; + } + + /** + *

                                                                                                                                                                                              Further information on the Address.

                                                                                                                                                                                              + */ + + public String getAdditionalAddressInfo() { + return this.additionalAddressInfo; + } + + /** + *

                                                                                                                                                                                              ID for the contact used in an external system.

                                                                                                                                                                                              + */ + + public String getExternalId() { + return this.externalId; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setTitle(final String title) { + this.title = title; + } + + public void setSalutation(final String salutation) { + this.salutation = salutation; + } + + public void setFirstName(final String firstName) { + this.firstName = firstName; + } + + public void setLastName(final String lastName) { + this.lastName = lastName; + } + + public void setStreetName(final String streetName) { + this.streetName = streetName; + } + + public void setStreetNumber(final String streetNumber) { + this.streetNumber = streetNumber; + } + + public void setAdditionalStreetInfo(final String additionalStreetInfo) { + this.additionalStreetInfo = additionalStreetInfo; + } + + public void setPostalCode(final String postalCode) { + this.postalCode = postalCode; + } + + public void setCity(final String city) { + this.city = city; + } + + public void setRegion(final String region) { + this.region = region; + } + + public void setState(final String state) { + this.state = state; + } + + public void setCompany(final String company) { + this.company = company; + } + + public void setDepartment(final String department) { + this.department = department; + } + + public void setBuilding(final String building) { + this.building = building; + } + + public void setApartment(final String apartment) { + this.apartment = apartment; + } + + public void setPOBox(final String pOBox) { + this.pOBox = pOBox; + } + + public void setPhone(final String phone) { + this.phone = phone; + } + + public void setMobile(final String mobile) { + this.mobile = mobile; + } + + public void setEmail(final String email) { + this.email = email; + } + + public void setFax(final String fax) { + this.fax = fax; + } + + public void setAdditionalAddressInfo(final String additionalAddressInfo) { + this.additionalAddressInfo = additionalAddressInfo; + } + + public void setExternalId(final String externalId) { + this.externalId = externalId; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BaseAddressImpl that = (BaseAddressImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(key, that.key) + .append(country, that.country) + .append(title, that.title) + .append(salutation, that.salutation) + .append(firstName, that.firstName) + .append(lastName, that.lastName) + .append(streetName, that.streetName) + .append(streetNumber, that.streetNumber) + .append(additionalStreetInfo, that.additionalStreetInfo) + .append(postalCode, that.postalCode) + .append(city, that.city) + .append(region, that.region) + .append(state, that.state) + .append(company, that.company) + .append(department, that.department) + .append(building, that.building) + .append(apartment, that.apartment) + .append(pOBox, that.pOBox) + .append(phone, that.phone) + .append(mobile, that.mobile) + .append(email, that.email) + .append(fax, that.fax) + .append(additionalAddressInfo, that.additionalAddressInfo) + .append(externalId, that.externalId) + .append(id, that.id) + .append(key, that.key) + .append(country, that.country) + .append(title, that.title) + .append(salutation, that.salutation) + .append(firstName, that.firstName) + .append(lastName, that.lastName) + .append(streetName, that.streetName) + .append(streetNumber, that.streetNumber) + .append(additionalStreetInfo, that.additionalStreetInfo) + .append(postalCode, that.postalCode) + .append(city, that.city) + .append(region, that.region) + .append(state, that.state) + .append(company, that.company) + .append(department, that.department) + .append(building, that.building) + .append(apartment, that.apartment) + .append(pOBox, that.pOBox) + .append(phone, that.phone) + .append(mobile, that.mobile) + .append(email, that.email) + .append(fax, that.fax) + .append(additionalAddressInfo, that.additionalAddressInfo) + .append(externalId, that.externalId) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(key) + .append(country) + .append(title) + .append(salutation) + .append(firstName) + .append(lastName) + .append(streetName) + .append(streetNumber) + .append(additionalStreetInfo) + .append(postalCode) + .append(city) + .append(region) + .append(state) + .append(company) + .append(department) + .append(building) + .append(apartment) + .append(pOBox) + .append(phone) + .append(mobile) + .append(email) + .append(fax) + .append(additionalAddressInfo) + .append(externalId) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) + .append("country", country) + .append("title", title) + .append("salutation", salutation) + .append("firstName", firstName) + .append("lastName", lastName) + .append("streetName", streetName) + .append("streetNumber", streetNumber) + .append("additionalStreetInfo", additionalStreetInfo) + .append("postalCode", postalCode) + .append("city", city) + .append("region", region) + .append("state", state) + .append("company", company) + .append("department", department) + .append("building", building) + .append("apartment", apartment) + .append("pOBox", pOBox) + .append("phone", phone) + .append("mobile", mobile) + .append("email", email) + .append("fax", fax) + .append("additionalAddressInfo", additionalAddressInfo) + .append("externalId", externalId) + .build(); + } + + @Override + public BaseAddress copyDeep() { + return BaseAddress.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitApprovalRuleMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitApprovalRuleMode.java new file mode 100644 index 00000000000..6d456a48a30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitApprovalRuleMode.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 Approval Rules from a parent. Only Business Units of type Division can use ExplicitAndFromParent.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitApprovalRuleMode extends JsonEnum { + + BusinessUnitApprovalRuleMode EXPLICIT = BusinessUnitApprovalRuleModeEnum.EXPLICIT; + + BusinessUnitApprovalRuleMode EXPLICIT_AND_FROM_PARENT = BusinessUnitApprovalRuleModeEnum.EXPLICIT_AND_FROM_PARENT; + + /** + * possible values of BusinessUnitApprovalRuleMode + */ + enum BusinessUnitApprovalRuleModeEnum implements BusinessUnitApprovalRuleMode { + /** + * Explicit + */ + EXPLICIT("Explicit"), + + /** + * ExplicitAndFromParent + */ + EXPLICIT_AND_FROM_PARENT("ExplicitAndFromParent"); + private final String jsonName; + + private BusinessUnitApprovalRuleModeEnum(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 BusinessUnitApprovalRuleMode + * 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 BusinessUnitApprovalRuleMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitApprovalRuleMode() { + @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 BusinessUnitApprovalRuleMode[] values() { + return BusinessUnitApprovalRuleModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReference.java new file mode 100644 index 00000000000..189e28ccf04 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              KeyReference to a BusinessUnit.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     BusinessUnitKeyReference businessUnitKeyReference = BusinessUnitKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("business-unit") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BusinessUnitKeyReferenceImpl.class) +public interface BusinessUnitKeyReference extends KeyReference { + + /** + * discriminator value for BusinessUnitKeyReference + */ + String BUSINESS_UNIT = "business-unit"; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced BusinessUnit.

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

                                                                                                                                                                                              Unique and immutable key of the referenced BusinessUnit.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of BusinessUnitKeyReference + */ + public static BusinessUnitKeyReference of() { + return new BusinessUnitKeyReferenceImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitKeyReference + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitKeyReference of(final BusinessUnitKeyReference template) { + BusinessUnitKeyReferenceImpl instance = new BusinessUnitKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public BusinessUnitKeyReference copyDeep(); + + /** + * factory method to create a deep copy of BusinessUnitKeyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitKeyReference deepCopy(@Nullable final BusinessUnitKeyReference template) { + if (template == null) { + return null; + } + BusinessUnitKeyReferenceImpl instance = new BusinessUnitKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for BusinessUnitKeyReference + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder builder() { + return BusinessUnitKeyReferenceBuilder.of(); + } + + /** + * create builder for BusinessUnitKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder builder(final BusinessUnitKeyReference template) { + return BusinessUnitKeyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withBusinessUnitKeyReference(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/BusinessUnitKeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceBuilder.java new file mode 100644 index 00000000000..3e7f305e9c1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * BusinessUnitKeyReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     BusinessUnitKeyReference businessUnitKeyReference = BusinessUnitKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitKeyReferenceBuilder implements Builder { + + private String key; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced BusinessUnit.

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

                                                                                                                                                                                              Unique and immutable key of the referenced BusinessUnit.

                                                                                                                                                                                              + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * builds BusinessUnitKeyReference with checking for non-null required values + * @return BusinessUnitKeyReference + */ + public BusinessUnitKeyReference build() { + Objects.requireNonNull(key, BusinessUnitKeyReference.class + ": key is missing"); + return new BusinessUnitKeyReferenceImpl(key); + } + + /** + * builds BusinessUnitKeyReference without checking for non-null required values + * @return BusinessUnitKeyReference + */ + public BusinessUnitKeyReference buildUnchecked() { + return new BusinessUnitKeyReferenceImpl(key); + } + + /** + * factory method for an instance of BusinessUnitKeyReferenceBuilder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder of() { + return new BusinessUnitKeyReferenceBuilder(); + } + + /** + * create builder for BusinessUnitKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitKeyReferenceBuilder of(final BusinessUnitKeyReference template) { + BusinessUnitKeyReferenceBuilder builder = new BusinessUnitKeyReferenceBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceImpl.java new file mode 100644 index 00000000000..7262d8de7c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              KeyReference to a BusinessUnit.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitKeyReferenceImpl implements BusinessUnitKeyReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitKeyReferenceImpl(@JsonProperty("key") final String key) { + this.key = key; + this.typeId = ReferenceTypeId.findEnum("business-unit"); + } + + /** + * create empty instance + */ + public BusinessUnitKeyReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("business-unit"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced BusinessUnit.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitKeyReferenceImpl that = (BusinessUnitKeyReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(key, that.key) + .append(typeId, that.typeId) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("key", key) + .build(); + } + + @Override + public BusinessUnitKeyReference copyDeep() { + return BusinessUnitKeyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifier.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifier.java new file mode 100644 index 00000000000..593caca12d4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifier.java @@ -0,0 +1,147 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

                                                                                                                                                                                              ResourceIdentifier to a BusinessUnit. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     BusinessUnitResourceIdentifier businessUnitResourceIdentifier = BusinessUnitResourceIdentifier.builder()
                                                                                                                                                                                              + *             .typeId(ReferenceTypeId.APPROVAL_FLOW)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("business-unit") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = BusinessUnitResourceIdentifierImpl.class) +public interface BusinessUnitResourceIdentifier extends ResourceIdentifier { + + /** + * discriminator value for BusinessUnitResourceIdentifier + */ + String BUSINESS_UNIT = "business-unit"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced BusinessUnit. Required if key is absent.

                                                                                                                                                                                              + * @return id + */ + + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique key of the referenced BusinessUnit. Required if id is absent.

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

                                                                                                                                                                                              Unique identifier of the referenced BusinessUnit. Required if key is absent.

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

                                                                                                                                                                                              Unique key of the referenced BusinessUnit. Required if id is absent.

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

                                                                                                                                                                                              Unique identifier of the referenced BusinessUnit. Required if key is absent.

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

                                                                                                                                                                                              Unique key of the referenced BusinessUnit. Required if id is absent.

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

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

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

                                                                                                                                                                                              Unique identifier of the referenced BusinessUnit. Required if key is absent.

                                                                                                                                                                                              + * @return id + */ + + @Nullable + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Unique key of the referenced BusinessUnit. Required if id is absent.

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

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              + * @return typeId + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + * builds BusinessUnitResourceIdentifier with checking for non-null required values + * @return BusinessUnitResourceIdentifier + */ + public BusinessUnitResourceIdentifier build() { + Objects.requireNonNull(typeId, BusinessUnitResourceIdentifier.class + ": typeId is missing"); + return new BusinessUnitResourceIdentifierImpl(id, key, typeId); + } + + /** + * builds BusinessUnitResourceIdentifier without checking for non-null required values + * @return BusinessUnitResourceIdentifier + */ + public BusinessUnitResourceIdentifier buildUnchecked() { + return new BusinessUnitResourceIdentifierImpl(id, key, typeId); + } + + /** + * factory method for an instance of BusinessUnitResourceIdentifierBuilder + * @return builder + */ + public static BusinessUnitResourceIdentifierBuilder of() { + return new BusinessUnitResourceIdentifierBuilder(); + } + + /** + * create builder for BusinessUnitResourceIdentifier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitResourceIdentifierBuilder of(final BusinessUnitResourceIdentifier template) { + BusinessUnitResourceIdentifierBuilder builder = new BusinessUnitResourceIdentifierBuilder(); + 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/BusinessUnitResourceIdentifierImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifierImpl.java new file mode 100644 index 00000000000..14c5fd29074 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifierImpl.java @@ -0,0 +1,120 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              ResourceIdentifier to a BusinessUnit. Either id or key is required. If both are set, an InvalidJsonInput error is returned.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitResourceIdentifierImpl implements BusinessUnitResourceIdentifier, ModelBase { + + private String id; + + private String key; + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitResourceIdentifierImpl(@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 BusinessUnitResourceIdentifierImpl() { + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced BusinessUnit. Required if key is absent.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Unique key of the referenced BusinessUnit. Required if id is absent.

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

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              + */ + + 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; + + BusinessUnitResourceIdentifierImpl that = (BusinessUnitResourceIdentifierImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(key, that.key) + .append(typeId, that.typeId) + .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(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) + .append("typeId", typeId) + .build(); + } + + @Override + public BusinessUnitResourceIdentifier copyDeep() { + return BusinessUnitResourceIdentifier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitType.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitType.java new file mode 100644 index 00000000000..612c657b47b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/BusinessUnitType.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; + +/** + *

                                                                                                                                                                                              The type of the Business Unit indicating its position in a hierarchy.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitType extends JsonEnum { + + BusinessUnitType COMPANY = BusinessUnitTypeEnum.COMPANY; + + BusinessUnitType DIVISION = BusinessUnitTypeEnum.DIVISION; + + /** + * possible values of BusinessUnitType + */ + enum BusinessUnitTypeEnum implements BusinessUnitType { + /** + * Company + */ + COMPANY("Company"), + + /** + * Division + */ + DIVISION("Division"); + private final String jsonName; + + private BusinessUnitTypeEnum(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 BusinessUnitType + * 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 BusinessUnitType findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitType() { + @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 BusinessUnitType[] values() { + return BusinessUnitTypeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReference.java new file mode 100644 index 00000000000..f59aba75a06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a CartDiscount.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountReference cartDiscountReference = CartDiscountReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("cart-discount") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartDiscountReferenceImpl.class) +public interface CartDiscountReference extends Reference { + + /** + * discriminator value for CartDiscountReference + */ + String CART_DISCOUNT = "cart-discount"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CartDiscount.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CartDiscount.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of CartDiscountReference + */ + public static CartDiscountReference of() { + return new CartDiscountReferenceImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountReference + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountReference of(final CartDiscountReference template) { + CartDiscountReferenceImpl instance = new CartDiscountReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public CartDiscountReference copyDeep(); + + /** + * factory method to create a deep copy of CartDiscountReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountReference deepCopy(@Nullable final CartDiscountReference template) { + if (template == null) { + return null; + } + CartDiscountReferenceImpl instance = new CartDiscountReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for CartDiscountReference + * @return builder + */ + public static CartDiscountReferenceBuilder builder() { + return CartDiscountReferenceBuilder.of(); + } + + /** + * create builder for CartDiscountReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountReferenceBuilder builder(final CartDiscountReference template) { + return CartDiscountReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartDiscountReference(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/CartDiscountReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReferenceBuilder.java new file mode 100644 index 00000000000..6fa01ba6840 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartDiscountReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountReference cartDiscountReference = CartDiscountReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CartDiscount.

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

                                                                                                                                                                                              Unique identifier of the referenced CartDiscount.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds CartDiscountReference with checking for non-null required values + * @return CartDiscountReference + */ + public CartDiscountReference build() { + Objects.requireNonNull(id, CartDiscountReference.class + ": id is missing"); + return new CartDiscountReferenceImpl(id); + } + + /** + * builds CartDiscountReference without checking for non-null required values + * @return CartDiscountReference + */ + public CartDiscountReference buildUnchecked() { + return new CartDiscountReferenceImpl(id); + } + + /** + * factory method for an instance of CartDiscountReferenceBuilder + * @return builder + */ + public static CartDiscountReferenceBuilder of() { + return new CartDiscountReferenceBuilder(); + } + + /** + * create builder for CartDiscountReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountReferenceBuilder of(final CartDiscountReference template) { + CartDiscountReferenceBuilder builder = new CartDiscountReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReferenceImpl.java new file mode 100644 index 00000000000..81555172f41 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a CartDiscount.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountReferenceImpl implements CartDiscountReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("cart-discount"); + } + + /** + * create empty instance + */ + public CartDiscountReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("cart-discount"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CartDiscount.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountReferenceImpl that = (CartDiscountReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public CartDiscountReference copyDeep() { + return CartDiscountReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTarget.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTarget.java new file mode 100644 index 00000000000..0f8209f9103 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTarget.java @@ -0,0 +1,124 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * CartDiscountTarget + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountTarget cartDiscountTarget = CartDiscountTarget.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartDiscountTargetImpl.class) +public interface CartDiscountTarget { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set type + * @param type value to be set + */ + + public void setType(final String type); + + /** + * factory method + * @return instance of CartDiscountTarget + */ + public static CartDiscountTarget of() { + return new CartDiscountTargetImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountTarget + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountTarget of(final CartDiscountTarget template) { + CartDiscountTargetImpl instance = new CartDiscountTargetImpl(); + instance.setType(template.getType()); + return instance; + } + + public CartDiscountTarget copyDeep(); + + /** + * factory method to create a deep copy of CartDiscountTarget + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountTarget deepCopy(@Nullable final CartDiscountTarget template) { + if (template == null) { + return null; + } + CartDiscountTargetImpl instance = new CartDiscountTargetImpl(); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for CartDiscountTarget + * @return builder + */ + public static CartDiscountTargetBuilder builder() { + return CartDiscountTargetBuilder.of(); + } + + /** + * create builder for CartDiscountTarget instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountTargetBuilder builder(final CartDiscountTarget template) { + return CartDiscountTargetBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartDiscountTarget(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/CartDiscountTargetBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetBuilder.java new file mode 100644 index 00000000000..2137e1bd9d8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartDiscountTargetBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountTarget cartDiscountTarget = CartDiscountTarget.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountTargetBuilder implements Builder { + + private String type; + + /** + * set the value to the type + * @param type value to be set + * @return Builder + */ + + public CartDiscountTargetBuilder type(final String type) { + this.type = type; + return this; + } + + /** + * value of type} + * @return type + */ + + public String getType() { + return this.type; + } + + /** + * builds CartDiscountTarget with checking for non-null required values + * @return CartDiscountTarget + */ + public CartDiscountTarget build() { + Objects.requireNonNull(type, CartDiscountTarget.class + ": type is missing"); + return new CartDiscountTargetImpl(type); + } + + /** + * builds CartDiscountTarget without checking for non-null required values + * @return CartDiscountTarget + */ + public CartDiscountTarget buildUnchecked() { + return new CartDiscountTargetImpl(type); + } + + /** + * factory method for an instance of CartDiscountTargetBuilder + * @return builder + */ + public static CartDiscountTargetBuilder of() { + return new CartDiscountTargetBuilder(); + } + + /** + * create builder for CartDiscountTarget instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountTargetBuilder of(final CartDiscountTarget template) { + CartDiscountTargetBuilder builder = new CartDiscountTargetBuilder(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetImpl.java new file mode 100644 index 00000000000..e5e54f70d67 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountTargetImpl.java @@ -0,0 +1,80 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CartDiscountTarget + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountTargetImpl implements CartDiscountTarget, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountTargetImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public CartDiscountTargetImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + public void setType(final String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountTargetImpl that = (CartDiscountTargetImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public CartDiscountTarget copyDeep() { + return CartDiscountTarget.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValue.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValue.java new file mode 100644 index 00000000000..bfbc8a82d2c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValue.java @@ -0,0 +1,124 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * CartDiscountValue + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountValue cartDiscountValue = CartDiscountValue.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CartDiscountValueImpl.class) +public interface CartDiscountValue { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set type + * @param type value to be set + */ + + public void setType(final String type); + + /** + * factory method + * @return instance of CartDiscountValue + */ + public static CartDiscountValue of() { + return new CartDiscountValueImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountValue + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountValue of(final CartDiscountValue template) { + CartDiscountValueImpl instance = new CartDiscountValueImpl(); + instance.setType(template.getType()); + return instance; + } + + public CartDiscountValue copyDeep(); + + /** + * factory method to create a deep copy of CartDiscountValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountValue deepCopy(@Nullable final CartDiscountValue template) { + if (template == null) { + return null; + } + CartDiscountValueImpl instance = new CartDiscountValueImpl(); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for CartDiscountValue + * @return builder + */ + public static CartDiscountValueBuilder builder() { + return CartDiscountValueBuilder.of(); + } + + /** + * create builder for CartDiscountValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountValueBuilder builder(final CartDiscountValue template) { + return CartDiscountValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCartDiscountValue(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/CartDiscountValueBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValueBuilder.java new file mode 100644 index 00000000000..aa01b97709f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValueBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CartDiscountValueBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CartDiscountValue cartDiscountValue = CartDiscountValue.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountValueBuilder implements Builder { + + private String type; + + /** + * set the value to the type + * @param type value to be set + * @return Builder + */ + + public CartDiscountValueBuilder type(final String type) { + this.type = type; + return this; + } + + /** + * value of type} + * @return type + */ + + public String getType() { + return this.type; + } + + /** + * builds CartDiscountValue with checking for non-null required values + * @return CartDiscountValue + */ + public CartDiscountValue build() { + Objects.requireNonNull(type, CartDiscountValue.class + ": type is missing"); + return new CartDiscountValueImpl(type); + } + + /** + * builds CartDiscountValue without checking for non-null required values + * @return CartDiscountValue + */ + public CartDiscountValue buildUnchecked() { + return new CartDiscountValueImpl(type); + } + + /** + * factory method for an instance of CartDiscountValueBuilder + * @return builder + */ + public static CartDiscountValueBuilder of() { + return new CartDiscountValueBuilder(); + } + + /** + * create builder for CartDiscountValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountValueBuilder of(final CartDiscountValue template) { + CartDiscountValueBuilder builder = new CartDiscountValueBuilder(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValueImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValueImpl.java new file mode 100644 index 00000000000..f9d080ff0c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CartDiscountValueImpl.java @@ -0,0 +1,80 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CartDiscountValue + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountValueImpl implements CartDiscountValue, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountValueImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public CartDiscountValueImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + public void setType(final String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountValueImpl that = (CartDiscountValueImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public CartDiscountValue copyDeep() { + return CartDiscountValue.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHints.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHints.java index 6ff629cc979..8f02ae6c2c1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHints.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHints.java @@ -15,14 +15,14 @@ import jakarta.validation.constraints.NotNull; /** - * CategoryOrderHints + *

                                                                                                                                                                                              JSON object where the keys are Category id, and the values are order hint values: strings representing a number between 0 and 1, but not ending in 0. Order hints allow controlling the order of Products and how they appear in Categories. Products without order hints have an order score below 0. Order hints are not unique. If a subset of Products have the same value for order hint in a specific category, the behavior is undetermined.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     CategoryOrderHints categoryOrderHints = CategoryOrderHints.builder()
                                                                                                                                                                                              - *             ./^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/("{/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/}")
                                                                                                                                                                                              + *             ./^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/("{/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -32,7 +32,7 @@ public interface CategoryOrderHints { /** - * + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              * @return map of the pattern property values */ @NotNull @@ -40,7 +40,7 @@ public interface CategoryOrderHints { public Map values(); /** - * set pattern property + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              * @param key property name * @param value property value */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsBuilder.java index 7f17ed3b947..bcf6b173a60 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsBuilder.java @@ -13,7 +13,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     CategoryOrderHints categoryOrderHints = CategoryOrderHints.builder()
                                                                                                                                                                                              - *             ./^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/("{/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/}")
                                                                                                                                                                                              + *             ./^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/("{/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -24,7 +24,7 @@ public class CategoryOrderHintsBuilder implements Builder { private Map values = new HashMap<>(); /** - * assign pattern properties to the builder + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              * @param values properties to be set * @return Builder */ @@ -35,7 +35,7 @@ public CategoryOrderHintsBuilder values(final Map values) { } /** - * assign a pattern property to the builder + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              * @param key property name * @param value property value * @return Builder @@ -50,7 +50,7 @@ public CategoryOrderHintsBuilder addValue(final String key, final String value) } /** - * values of pattern properties + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              * @return pattern properties */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsImpl.java index ecfd32cdd84..51f8792c7bf 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryOrderHintsImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * CategoryOrderHints + *

                                                                                                                                                                                              JSON object where the keys are Category id, and the values are order hint values: strings representing a number between 0 and 1, but not ending in 0. Order hints allow controlling the order of Products and how they appear in Categories. Products without order hints have an order score below 0. Order hints are not unique. If a subset of Products have the same value for order hint in a specific category, the behavior is undetermined.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CategoryOrderHintsImpl implements CategoryOrderHints, ModelBase { @@ -40,7 +40,7 @@ public CategoryOrderHintsImpl() { } /** - * + *

                                                                                                                                                                                              A string representing a number between 0 and 1, but not ending in 0.

                                                                                                                                                                                              */ public Map values() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReference.java new file mode 100644 index 00000000000..04cc45e503a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Category.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CategoryReference categoryReference = CategoryReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("category") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CategoryReferenceImpl.class) +public interface CategoryReference extends Reference { + + /** + * discriminator value for CategoryReference + */ + String CATEGORY = "category"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Category.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Category.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of CategoryReference + */ + public static CategoryReference of() { + return new CategoryReferenceImpl(); + } + + /** + * factory method to create a shallow copy CategoryReference + * @param template instance to be copied + * @return copy instance + */ + public static CategoryReference of(final CategoryReference template) { + CategoryReferenceImpl instance = new CategoryReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public CategoryReference copyDeep(); + + /** + * factory method to create a deep copy of CategoryReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CategoryReference deepCopy(@Nullable final CategoryReference template) { + if (template == null) { + return null; + } + CategoryReferenceImpl instance = new CategoryReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for CategoryReference + * @return builder + */ + public static CategoryReferenceBuilder builder() { + return CategoryReferenceBuilder.of(); + } + + /** + * create builder for CategoryReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CategoryReferenceBuilder builder(final CategoryReference template) { + return CategoryReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCategoryReference(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/CategoryReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReferenceBuilder.java new file mode 100644 index 00000000000..104416b4222 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CategoryReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CategoryReference categoryReference = CategoryReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CategoryReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Category.

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

                                                                                                                                                                                              Unique identifier of the referenced Category.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds CategoryReference with checking for non-null required values + * @return CategoryReference + */ + public CategoryReference build() { + Objects.requireNonNull(id, CategoryReference.class + ": id is missing"); + return new CategoryReferenceImpl(id); + } + + /** + * builds CategoryReference without checking for non-null required values + * @return CategoryReference + */ + public CategoryReference buildUnchecked() { + return new CategoryReferenceImpl(id); + } + + /** + * factory method for an instance of CategoryReferenceBuilder + * @return builder + */ + public static CategoryReferenceBuilder of() { + return new CategoryReferenceBuilder(); + } + + /** + * create builder for CategoryReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CategoryReferenceBuilder of(final CategoryReference template) { + CategoryReferenceBuilder builder = new CategoryReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReferenceImpl.java new file mode 100644 index 00000000000..4897d81d998 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CategoryReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Category.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CategoryReferenceImpl implements CategoryReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + CategoryReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("category"); + } + + /** + * create empty instance + */ + public CategoryReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("category"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Category.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CategoryReferenceImpl that = (CategoryReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public CategoryReference copyDeep() { + return CategoryReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoney.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoney.java new file mode 100644 index 00000000000..d340f7172c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoney.java @@ -0,0 +1,136 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Object that stores money in cent amounts of a specific currency.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CentPrecisionMoney centPrecisionMoney = CentPrecisionMoney.builder()
                                                                                                                                                                                              + *             .centAmount(0.3)
                                                                                                                                                                                              + *             .currencyCode("{currencyCode}")
                                                                                                                                                                                              + *             .fractionDigits(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("centPrecision") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CentPrecisionMoneyImpl.class) +public interface CentPrecisionMoney extends TypedMoney { + + /** + * discriminator value for CentPrecisionMoney + */ + String CENT_PRECISION = "centPrecision"; + + /** + *

                                                                                                                                                                                              The number of default fraction digits for the given currency, like 2 for EUR or 0 for JPY.

                                                                                                                                                                                              + * @return fractionDigits + */ + @NotNull + @JsonProperty("fractionDigits") + public Integer getFractionDigits(); + + /** + *

                                                                                                                                                                                              The number of default fraction digits for the given currency, like 2 for EUR or 0 for JPY.

                                                                                                                                                                                              + * @param fractionDigits value to be set + */ + + public void setFractionDigits(final Integer fractionDigits); + + /** + * factory method + * @return instance of CentPrecisionMoney + */ + public static CentPrecisionMoney of() { + return new CentPrecisionMoneyImpl(); + } + + /** + * factory method to create a shallow copy CentPrecisionMoney + * @param template instance to be copied + * @return copy instance + */ + public static CentPrecisionMoney of(final CentPrecisionMoney template) { + CentPrecisionMoneyImpl instance = new CentPrecisionMoneyImpl(); + instance.setCentAmount(template.getCentAmount()); + instance.setCurrencyCode(template.getCurrencyCode()); + instance.setFractionDigits(template.getFractionDigits()); + return instance; + } + + public CentPrecisionMoney copyDeep(); + + /** + * factory method to create a deep copy of CentPrecisionMoney + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CentPrecisionMoney deepCopy(@Nullable final CentPrecisionMoney template) { + if (template == null) { + return null; + } + CentPrecisionMoneyImpl instance = new CentPrecisionMoneyImpl(); + instance.setCentAmount(template.getCentAmount()); + instance.setCurrencyCode(template.getCurrencyCode()); + instance.setFractionDigits(template.getFractionDigits()); + return instance; + } + + /** + * builder factory method for CentPrecisionMoney + * @return builder + */ + public static CentPrecisionMoneyBuilder builder() { + return CentPrecisionMoneyBuilder.of(); + } + + /** + * create builder for CentPrecisionMoney instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CentPrecisionMoneyBuilder builder(final CentPrecisionMoney template) { + return CentPrecisionMoneyBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCentPrecisionMoney(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/CentPrecisionMoneyBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyBuilder.java new file mode 100644 index 00000000000..0b187f5cab2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyBuilder.java @@ -0,0 +1,140 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CentPrecisionMoneyBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CentPrecisionMoney centPrecisionMoney = CentPrecisionMoney.builder()
                                                                                                                                                                                              + *             .centAmount(0.3)
                                                                                                                                                                                              + *             .currencyCode("{currencyCode}")
                                                                                                                                                                                              + *             .fractionDigits(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CentPrecisionMoneyBuilder implements Builder { + + private Long centAmount; + + private String currencyCode; + + private Integer fractionDigits; + + /** + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param centAmount value to be set + * @return Builder + */ + + public CentPrecisionMoneyBuilder centAmount(final Long centAmount) { + this.centAmount = centAmount; + return this; + } + + /** + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

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

                                                                                                                                                                                              The number of default fraction digits for the given currency, like 2 for EUR or 0 for JPY.

                                                                                                                                                                                              + * @param fractionDigits value to be set + * @return Builder + */ + + public CentPrecisionMoneyBuilder fractionDigits(final Integer fractionDigits) { + this.fractionDigits = fractionDigits; + return this; + } + + /** + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return centAmount + */ + + public Long getCentAmount() { + return this.centAmount; + } + + /** + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + * @return currencyCode + */ + + public String getCurrencyCode() { + return this.currencyCode; + } + + /** + *

                                                                                                                                                                                              The number of default fraction digits for the given currency, like 2 for EUR or 0 for JPY.

                                                                                                                                                                                              + * @return fractionDigits + */ + + public Integer getFractionDigits() { + return this.fractionDigits; + } + + /** + * builds CentPrecisionMoney with checking for non-null required values + * @return CentPrecisionMoney + */ + public CentPrecisionMoney build() { + Objects.requireNonNull(centAmount, CentPrecisionMoney.class + ": centAmount is missing"); + Objects.requireNonNull(currencyCode, CentPrecisionMoney.class + ": currencyCode is missing"); + Objects.requireNonNull(fractionDigits, CentPrecisionMoney.class + ": fractionDigits is missing"); + return new CentPrecisionMoneyImpl(centAmount, currencyCode, fractionDigits); + } + + /** + * builds CentPrecisionMoney without checking for non-null required values + * @return CentPrecisionMoney + */ + public CentPrecisionMoney buildUnchecked() { + return new CentPrecisionMoneyImpl(centAmount, currencyCode, fractionDigits); + } + + /** + * factory method for an instance of CentPrecisionMoneyBuilder + * @return builder + */ + public static CentPrecisionMoneyBuilder of() { + return new CentPrecisionMoneyBuilder(); + } + + /** + * create builder for CentPrecisionMoney instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CentPrecisionMoneyBuilder of(final CentPrecisionMoney template) { + CentPrecisionMoneyBuilder builder = new CentPrecisionMoneyBuilder(); + builder.centAmount = template.getCentAmount(); + builder.currencyCode = template.getCurrencyCode(); + builder.fractionDigits = template.getFractionDigits(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyImpl.java new file mode 100644 index 00000000000..64d4488258e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyImpl.java @@ -0,0 +1,144 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Object that stores money in cent amounts of a specific currency.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CentPrecisionMoneyImpl implements CentPrecisionMoney, ModelBase { + + private Long centAmount; + + private String currencyCode; + + private com.commercetools.history.models.common.MoneyType type; + + private Integer fractionDigits; + + /** + * create instance with all properties + */ + @JsonCreator + CentPrecisionMoneyImpl(@JsonProperty("centAmount") final Long centAmount, + @JsonProperty("currencyCode") final String currencyCode, + @JsonProperty("fractionDigits") final Integer fractionDigits) { + this.centAmount = centAmount; + this.currencyCode = currencyCode; + this.fractionDigits = fractionDigits; + this.type = MoneyType.findEnum("centPrecision"); + } + + /** + * create empty instance + */ + public CentPrecisionMoneyImpl() { + this.type = MoneyType.findEnum("centPrecision"); + } + + /** + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + */ + + public Long getCentAmount() { + return this.centAmount; + } + + /** + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + */ + + public String getCurrencyCode() { + return this.currencyCode; + } + + /** + *

                                                                                                                                                                                              Type of money used.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.MoneyType getType() { + return this.type; + } + + /** + *

                                                                                                                                                                                              The number of default fraction digits for the given currency, like 2 for EUR or 0 for JPY.

                                                                                                                                                                                              + */ + + public Integer getFractionDigits() { + return this.fractionDigits; + } + + public void setCentAmount(final Long centAmount) { + this.centAmount = centAmount; + } + + public void setCurrencyCode(final String currencyCode) { + this.currencyCode = currencyCode; + } + + public void setFractionDigits(final Integer fractionDigits) { + this.fractionDigits = fractionDigits; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CentPrecisionMoneyImpl that = (CentPrecisionMoneyImpl) o; + + return new EqualsBuilder().append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .append(type, that.type) + .append(fractionDigits, that.fractionDigits) + .append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .append(type, that.type) + .append(fractionDigits, that.fractionDigits) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(centAmount) + .append(currencyCode) + .append(type) + .append(fractionDigits) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("centAmount", centAmount) + .append("currencyCode", currencyCode) + .append("type", type) + .append("fractionDigits", fractionDigits) + .build(); + } + + @Override + public CentPrecisionMoney copyDeep() { + return CentPrecisionMoney.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReference.java new file mode 100644 index 00000000000..45b44e251f1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ChannelReference channelReference = ChannelReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("channel") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ChannelReferenceImpl.class) +public interface ChannelReference extends Reference { + + /** + * discriminator value for ChannelReference + */ + String CHANNEL = "channel"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Channel.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Channel.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ChannelReference + */ + public static ChannelReference of() { + return new ChannelReferenceImpl(); + } + + /** + * factory method to create a shallow copy ChannelReference + * @param template instance to be copied + * @return copy instance + */ + public static ChannelReference of(final ChannelReference template) { + ChannelReferenceImpl instance = new ChannelReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ChannelReference copyDeep(); + + /** + * factory method to create a deep copy of ChannelReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ChannelReference deepCopy(@Nullable final ChannelReference template) { + if (template == null) { + return null; + } + ChannelReferenceImpl instance = new ChannelReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ChannelReference + * @return builder + */ + public static ChannelReferenceBuilder builder() { + return ChannelReferenceBuilder.of(); + } + + /** + * create builder for ChannelReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChannelReferenceBuilder builder(final ChannelReference template) { + return ChannelReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withChannelReference(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/ChannelReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReferenceBuilder.java new file mode 100644 index 00000000000..4d9bec6e3e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ChannelReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ChannelReference channelReference = ChannelReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChannelReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Channel.

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

                                                                                                                                                                                              Unique identifier of the referenced Channel.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ChannelReference with checking for non-null required values + * @return ChannelReference + */ + public ChannelReference build() { + Objects.requireNonNull(id, ChannelReference.class + ": id is missing"); + return new ChannelReferenceImpl(id); + } + + /** + * builds ChannelReference without checking for non-null required values + * @return ChannelReference + */ + public ChannelReference buildUnchecked() { + return new ChannelReferenceImpl(id); + } + + /** + * factory method for an instance of ChannelReferenceBuilder + * @return builder + */ + public static ChannelReferenceBuilder of() { + return new ChannelReferenceBuilder(); + } + + /** + * create builder for ChannelReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ChannelReferenceBuilder of(final ChannelReference template) { + ChannelReferenceBuilder builder = new ChannelReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReferenceImpl.java new file mode 100644 index 00000000000..3bc12f60765 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ChannelReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ChannelReferenceImpl implements ChannelReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ChannelReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("channel"); + } + + /** + * create empty instance + */ + public ChannelReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("channel"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Channel.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ChannelReferenceImpl that = (ChannelReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ChannelReference copyDeep() { + return ChannelReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLogging.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLogging.java new file mode 100644 index 00000000000..693648bb82d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLogging.java @@ -0,0 +1,193 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

                                                                                                                                                                                              These objects represent information about which API Client created or modified a resource. For more information, see Client Logging.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ClientLogging clientLogging = ClientLogging.builder()
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ClientLoggingImpl.class) +public interface ClientLogging { + + /** + *

                                                                                                                                                                                              id of the API Client which created the resource.

                                                                                                                                                                                              + * @return clientId + */ + + @JsonProperty("clientId") + public String getClientId(); + + /** + *

                                                                                                                                                                                              External user ID provided by X-External-User-ID HTTP Header.

                                                                                                                                                                                              + * @return externalUserId + */ + + @JsonProperty("externalUserId") + public String getExternalUserId(); + + /** + *

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

                                                                                                                                                                                              + * @return customer + */ + @Valid + @JsonProperty("customer") + public CustomerReference getCustomer(); + + /** + *

                                                                                                                                                                                              Indicates that the resource was modified during an anonymous session with the logged ID.

                                                                                                                                                                                              + * @return anonymousId + */ + + @JsonProperty("anonymousId") + public String getAnonymousId(); + + /** + *

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + * @return associate + */ + @Valid + @JsonProperty("associate") + public CustomerReference getAssociate(); + + /** + *

                                                                                                                                                                                              id of the API Client which created the resource.

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

                                                                                                                                                                                              External user ID provided by X-External-User-ID HTTP Header.

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

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

                                                                                                                                                                                              + * @param customer value to be set + */ + + public void setCustomer(final CustomerReference customer); + + /** + *

                                                                                                                                                                                              Indicates that the resource was modified during an anonymous session with the logged ID.

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

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + * @param associate value to be set + */ + + public void setAssociate(final CustomerReference associate); + + /** + * factory method + * @return instance of ClientLogging + */ + public static ClientLogging of() { + return new ClientLoggingImpl(); + } + + /** + * factory method to create a shallow copy ClientLogging + * @param template instance to be copied + * @return copy instance + */ + public static ClientLogging of(final ClientLogging template) { + ClientLoggingImpl instance = new ClientLoggingImpl(); + instance.setClientId(template.getClientId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setCustomer(template.getCustomer()); + instance.setAnonymousId(template.getAnonymousId()); + instance.setAssociate(template.getAssociate()); + return instance; + } + + public ClientLogging copyDeep(); + + /** + * factory method to create a deep copy of ClientLogging + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ClientLogging deepCopy(@Nullable final ClientLogging template) { + if (template == null) { + return null; + } + ClientLoggingImpl instance = new ClientLoggingImpl(); + instance.setClientId(template.getClientId()); + instance.setExternalUserId(template.getExternalUserId()); + instance.setCustomer( + com.commercetools.history.models.common.CustomerReference.deepCopy(template.getCustomer())); + instance.setAnonymousId(template.getAnonymousId()); + instance.setAssociate( + com.commercetools.history.models.common.CustomerReference.deepCopy(template.getAssociate())); + return instance; + } + + /** + * builder factory method for ClientLogging + * @return builder + */ + public static ClientLoggingBuilder builder() { + return ClientLoggingBuilder.of(); + } + + /** + * create builder for ClientLogging instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ClientLoggingBuilder builder(final ClientLogging template) { + return ClientLoggingBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withClientLogging(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/ClientLoggingBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLoggingBuilder.java new file mode 100644 index 00000000000..dd6f1ee559e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLoggingBuilder.java @@ -0,0 +1,235 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ClientLoggingBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ClientLogging clientLogging = ClientLogging.builder()
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ClientLoggingBuilder implements Builder { + + @Nullable + private String clientId; + + @Nullable + private String externalUserId; + + @Nullable + private com.commercetools.history.models.common.CustomerReference customer; + + @Nullable + private String anonymousId; + + @Nullable + private com.commercetools.history.models.common.CustomerReference associate; + + /** + *

                                                                                                                                                                                              id of the API Client which created the resource.

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

                                                                                                                                                                                              External user ID provided by X-External-User-ID HTTP Header.

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

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

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

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

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

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

                                                                                                                                                                                              + * @param customer value to be set + * @return Builder + */ + + public ClientLoggingBuilder customer( + @Nullable final com.commercetools.history.models.common.CustomerReference customer) { + this.customer = customer; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates that the resource was modified during an anonymous session with the logged ID.

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

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

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

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

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

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + * @param associate value to be set + * @return Builder + */ + + public ClientLoggingBuilder associate( + @Nullable final com.commercetools.history.models.common.CustomerReference associate) { + this.associate = associate; + return this; + } + + /** + *

                                                                                                                                                                                              id of the API Client which created the resource.

                                                                                                                                                                                              + * @return clientId + */ + + @Nullable + public String getClientId() { + return this.clientId; + } + + /** + *

                                                                                                                                                                                              External user ID provided by X-External-User-ID HTTP Header.

                                                                                                                                                                                              + * @return externalUserId + */ + + @Nullable + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

                                                                                                                                                                                              + * @return customer + */ + + @Nullable + public com.commercetools.history.models.common.CustomerReference getCustomer() { + return this.customer; + } + + /** + *

                                                                                                                                                                                              Indicates that the resource was modified during an anonymous session with the logged ID.

                                                                                                                                                                                              + * @return anonymousId + */ + + @Nullable + public String getAnonymousId() { + return this.anonymousId; + } + + /** + *

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + * @return associate + */ + + @Nullable + public com.commercetools.history.models.common.CustomerReference getAssociate() { + return this.associate; + } + + /** + * builds ClientLogging with checking for non-null required values + * @return ClientLogging + */ + public ClientLogging build() { + return new ClientLoggingImpl(clientId, externalUserId, customer, anonymousId, associate); + } + + /** + * builds ClientLogging without checking for non-null required values + * @return ClientLogging + */ + public ClientLogging buildUnchecked() { + return new ClientLoggingImpl(clientId, externalUserId, customer, anonymousId, associate); + } + + /** + * factory method for an instance of ClientLoggingBuilder + * @return builder + */ + public static ClientLoggingBuilder of() { + return new ClientLoggingBuilder(); + } + + /** + * create builder for ClientLogging instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ClientLoggingBuilder of(final ClientLogging template) { + ClientLoggingBuilder builder = new ClientLoggingBuilder(); + builder.clientId = template.getClientId(); + builder.externalUserId = template.getExternalUserId(); + builder.customer = template.getCustomer(); + builder.anonymousId = template.getAnonymousId(); + builder.associate = template.getAssociate(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLoggingImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLoggingImpl.java new file mode 100644 index 00000000000..83657474956 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ClientLoggingImpl.java @@ -0,0 +1,164 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              These objects represent information about which API Client created or modified a resource. For more information, see Client Logging.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ClientLoggingImpl implements ClientLogging, ModelBase { + + private String clientId; + + private String externalUserId; + + private com.commercetools.history.models.common.CustomerReference customer; + + private String anonymousId; + + private com.commercetools.history.models.common.CustomerReference associate; + + /** + * create instance with all properties + */ + @JsonCreator + ClientLoggingImpl(@JsonProperty("clientId") final String clientId, + @JsonProperty("externalUserId") final String externalUserId, + @JsonProperty("customer") final com.commercetools.history.models.common.CustomerReference customer, + @JsonProperty("anonymousId") final String anonymousId, + @JsonProperty("associate") final com.commercetools.history.models.common.CustomerReference associate) { + this.clientId = clientId; + this.externalUserId = externalUserId; + this.customer = customer; + this.anonymousId = anonymousId; + this.associate = associate; + } + + /** + * create empty instance + */ + public ClientLoggingImpl() { + } + + /** + *

                                                                                                                                                                                              id of the API Client which created the resource.

                                                                                                                                                                                              + */ + + public String getClientId() { + return this.clientId; + } + + /** + *

                                                                                                                                                                                              External user ID provided by X-External-User-ID HTTP Header.

                                                                                                                                                                                              + */ + + public String getExternalUserId() { + return this.externalUserId; + } + + /** + *

                                                                                                                                                                                              Indicates the Customer who modified the resource using a token from the password flow.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomerReference getCustomer() { + return this.customer; + } + + /** + *

                                                                                                                                                                                              Indicates that the resource was modified during an anonymous session with the logged ID.

                                                                                                                                                                                              + */ + + public String getAnonymousId() { + return this.anonymousId; + } + + /** + *

                                                                                                                                                                                              Indicates the Customer who created or modified the resource in the context of a Business Unit. Only available for B2B-enabled Projects when an Associate acts on behalf of a company using the associate endpoints.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomerReference getAssociate() { + return this.associate; + } + + public void setClientId(final String clientId) { + this.clientId = clientId; + } + + public void setExternalUserId(final String externalUserId) { + this.externalUserId = externalUserId; + } + + public void setCustomer(final com.commercetools.history.models.common.CustomerReference customer) { + this.customer = customer; + } + + public void setAnonymousId(final String anonymousId) { + this.anonymousId = anonymousId; + } + + public void setAssociate(final com.commercetools.history.models.common.CustomerReference associate) { + this.associate = associate; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ClientLoggingImpl that = (ClientLoggingImpl) o; + + return new EqualsBuilder().append(clientId, that.clientId) + .append(externalUserId, that.externalUserId) + .append(customer, that.customer) + .append(anonymousId, that.anonymousId) + .append(associate, that.associate) + .append(clientId, that.clientId) + .append(externalUserId, that.externalUserId) + .append(customer, that.customer) + .append(anonymousId, that.anonymousId) + .append(associate, that.associate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(clientId) + .append(externalUserId) + .append(customer) + .append(anonymousId) + .append(associate) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("clientId", clientId) + .append("externalUserId", externalUserId) + .append("customer", customer) + .append("anonymousId", anonymousId) + .append("associate", associate) + .build(); + } + + @Override + public ClientLogging copyDeep() { + return ClientLogging.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValue.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValue.java new file mode 100644 index 00000000000..68282353eb7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValue.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 com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Defines an allowed value of a CustomFieldEnumType field.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomFieldEnumValue customFieldEnumValue = CustomFieldEnumValue.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .label("{label}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomFieldEnumValueImpl.class) +public interface CustomFieldEnumValue { + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive label of the value.

                                                                                                                                                                                              + * @return label + */ + @NotNull + @JsonProperty("label") + public String getLabel(); + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive label of the value.

                                                                                                                                                                                              + * @param label value to be set + */ + + public void setLabel(final String label); + + /** + * factory method + * @return instance of CustomFieldEnumValue + */ + public static CustomFieldEnumValue of() { + return new CustomFieldEnumValueImpl(); + } + + /** + * factory method to create a shallow copy CustomFieldEnumValue + * @param template instance to be copied + * @return copy instance + */ + public static CustomFieldEnumValue of(final CustomFieldEnumValue template) { + CustomFieldEnumValueImpl instance = new CustomFieldEnumValueImpl(); + instance.setKey(template.getKey()); + instance.setLabel(template.getLabel()); + return instance; + } + + public CustomFieldEnumValue copyDeep(); + + /** + * factory method to create a deep copy of CustomFieldEnumValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomFieldEnumValue deepCopy(@Nullable final CustomFieldEnumValue template) { + if (template == null) { + return null; + } + CustomFieldEnumValueImpl instance = new CustomFieldEnumValueImpl(); + instance.setKey(template.getKey()); + instance.setLabel(template.getLabel()); + return instance; + } + + /** + * builder factory method for CustomFieldEnumValue + * @return builder + */ + public static CustomFieldEnumValueBuilder builder() { + return CustomFieldEnumValueBuilder.of(); + } + + /** + * create builder for CustomFieldEnumValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomFieldEnumValueBuilder builder(final CustomFieldEnumValue template) { + return CustomFieldEnumValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomFieldEnumValue(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/CustomFieldEnumValueBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueBuilder.java new file mode 100644 index 00000000000..a99fe58a2e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomFieldEnumValueBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomFieldEnumValue customFieldEnumValue = CustomFieldEnumValue.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .label("{label}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomFieldEnumValueBuilder implements Builder { + + private String key; + + private String label; + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive label of the value.

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

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive label of the value.

                                                                                                                                                                                              + * @return label + */ + + public String getLabel() { + return this.label; + } + + /** + * builds CustomFieldEnumValue with checking for non-null required values + * @return CustomFieldEnumValue + */ + public CustomFieldEnumValue build() { + Objects.requireNonNull(key, CustomFieldEnumValue.class + ": key is missing"); + Objects.requireNonNull(label, CustomFieldEnumValue.class + ": label is missing"); + return new CustomFieldEnumValueImpl(key, label); + } + + /** + * builds CustomFieldEnumValue without checking for non-null required values + * @return CustomFieldEnumValue + */ + public CustomFieldEnumValue buildUnchecked() { + return new CustomFieldEnumValueImpl(key, label); + } + + /** + * factory method for an instance of CustomFieldEnumValueBuilder + * @return builder + */ + public static CustomFieldEnumValueBuilder of() { + return new CustomFieldEnumValueBuilder(); + } + + /** + * create builder for CustomFieldEnumValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomFieldEnumValueBuilder of(final CustomFieldEnumValue template) { + CustomFieldEnumValueBuilder builder = new CustomFieldEnumValueBuilder(); + builder.key = template.getKey(); + builder.label = template.getLabel(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueImpl.java new file mode 100644 index 00000000000..481af7ed7c9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueImpl.java @@ -0,0 +1,101 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Defines an allowed value of a CustomFieldEnumType field.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomFieldEnumValueImpl implements CustomFieldEnumValue, ModelBase { + + private String key; + + private String label; + + /** + * create instance with all properties + */ + @JsonCreator + CustomFieldEnumValueImpl(@JsonProperty("key") final String key, @JsonProperty("label") final String label) { + this.key = key; + this.label = label; + } + + /** + * create empty instance + */ + public CustomFieldEnumValueImpl() { + } + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive label of the value.

                                                                                                                                                                                              + */ + + public String getLabel() { + return this.label; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setLabel(final String label) { + this.label = label; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomFieldEnumValueImpl that = (CustomFieldEnumValueImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(label, that.label) + .append(key, that.key) + .append(label, that.label) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key).append(label).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("label", label) + .build(); + } + + @Override + public CustomFieldEnumValue copyDeep() { + return CustomFieldEnumValue.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValue.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValue.java new file mode 100644 index 00000000000..4d0e5471383 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValue.java @@ -0,0 +1,144 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Defines an allowed value of a CustomFieldLocalizedEnumType field.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomFieldLocalizedEnumValue customFieldLocalizedEnumValue = CustomFieldLocalizedEnumValue.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .label(labelBuilder -> labelBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomFieldLocalizedEnumValueImpl.class) +public interface CustomFieldLocalizedEnumValue { + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive localized label of the value.

                                                                                                                                                                                              + * @return label + */ + @NotNull + @Valid + @JsonProperty("label") + public LocalizedString getLabel(); + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive localized label of the value.

                                                                                                                                                                                              + * @param label value to be set + */ + + public void setLabel(final LocalizedString label); + + /** + * factory method + * @return instance of CustomFieldLocalizedEnumValue + */ + public static CustomFieldLocalizedEnumValue of() { + return new CustomFieldLocalizedEnumValueImpl(); + } + + /** + * factory method to create a shallow copy CustomFieldLocalizedEnumValue + * @param template instance to be copied + * @return copy instance + */ + public static CustomFieldLocalizedEnumValue of(final CustomFieldLocalizedEnumValue template) { + CustomFieldLocalizedEnumValueImpl instance = new CustomFieldLocalizedEnumValueImpl(); + instance.setKey(template.getKey()); + instance.setLabel(template.getLabel()); + return instance; + } + + public CustomFieldLocalizedEnumValue copyDeep(); + + /** + * factory method to create a deep copy of CustomFieldLocalizedEnumValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomFieldLocalizedEnumValue deepCopy(@Nullable final CustomFieldLocalizedEnumValue template) { + if (template == null) { + return null; + } + CustomFieldLocalizedEnumValueImpl instance = new CustomFieldLocalizedEnumValueImpl(); + instance.setKey(template.getKey()); + instance.setLabel(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLabel())); + return instance; + } + + /** + * builder factory method for CustomFieldLocalizedEnumValue + * @return builder + */ + public static CustomFieldLocalizedEnumValueBuilder builder() { + return CustomFieldLocalizedEnumValueBuilder.of(); + } + + /** + * create builder for CustomFieldLocalizedEnumValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomFieldLocalizedEnumValueBuilder builder(final CustomFieldLocalizedEnumValue template) { + return CustomFieldLocalizedEnumValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomFieldLocalizedEnumValue(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/CustomFieldLocalizedEnumValueBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueBuilder.java new file mode 100644 index 00000000000..ee0e5ebbc5f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueBuilder.java @@ -0,0 +1,133 @@ + +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; + +/** + * CustomFieldLocalizedEnumValueBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomFieldLocalizedEnumValue customFieldLocalizedEnumValue = CustomFieldLocalizedEnumValue.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .label(labelBuilder -> labelBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomFieldLocalizedEnumValueBuilder implements Builder { + + private String key; + + private com.commercetools.history.models.common.LocalizedString label; + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive localized label of the value.

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

                                                                                                                                                                                              Descriptive localized label of the value.

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

                                                                                                                                                                                              Descriptive localized label of the value.

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

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive localized label of the value.

                                                                                                                                                                                              + * @return label + */ + + public com.commercetools.history.models.common.LocalizedString getLabel() { + return this.label; + } + + /** + * builds CustomFieldLocalizedEnumValue with checking for non-null required values + * @return CustomFieldLocalizedEnumValue + */ + public CustomFieldLocalizedEnumValue build() { + Objects.requireNonNull(key, CustomFieldLocalizedEnumValue.class + ": key is missing"); + Objects.requireNonNull(label, CustomFieldLocalizedEnumValue.class + ": label is missing"); + return new CustomFieldLocalizedEnumValueImpl(key, label); + } + + /** + * builds CustomFieldLocalizedEnumValue without checking for non-null required values + * @return CustomFieldLocalizedEnumValue + */ + public CustomFieldLocalizedEnumValue buildUnchecked() { + return new CustomFieldLocalizedEnumValueImpl(key, label); + } + + /** + * factory method for an instance of CustomFieldLocalizedEnumValueBuilder + * @return builder + */ + public static CustomFieldLocalizedEnumValueBuilder of() { + return new CustomFieldLocalizedEnumValueBuilder(); + } + + /** + * create builder for CustomFieldLocalizedEnumValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomFieldLocalizedEnumValueBuilder of(final CustomFieldLocalizedEnumValue template) { + CustomFieldLocalizedEnumValueBuilder builder = new CustomFieldLocalizedEnumValueBuilder(); + builder.key = template.getKey(); + builder.label = template.getLabel(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueImpl.java new file mode 100644 index 00000000000..ab5adabd650 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueImpl.java @@ -0,0 +1,102 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Defines an allowed value of a CustomFieldLocalizedEnumType field.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomFieldLocalizedEnumValueImpl implements CustomFieldLocalizedEnumValue, ModelBase { + + private String key; + + private com.commercetools.history.models.common.LocalizedString label; + + /** + * create instance with all properties + */ + @JsonCreator + CustomFieldLocalizedEnumValueImpl(@JsonProperty("key") final String key, + @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label) { + this.key = key; + this.label = label; + } + + /** + * create empty instance + */ + public CustomFieldLocalizedEnumValueImpl() { + } + + /** + *

                                                                                                                                                                                              Key of the value used as a programmatic identifier.

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

                                                                                                                                                                                              Descriptive localized label of the value.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LocalizedString getLabel() { + return this.label; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setLabel(final com.commercetools.history.models.common.LocalizedString label) { + this.label = label; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomFieldLocalizedEnumValueImpl that = (CustomFieldLocalizedEnumValueImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(label, that.label) + .append(key, that.key) + .append(label, that.label) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key).append(label).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("label", label) + .build(); + } + + @Override + public CustomFieldLocalizedEnumValue copyDeep() { + return CustomFieldLocalizedEnumValue.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFields.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFields.java index b7945206ab9..5df1fd20f36 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFields.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFields.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - * CustomFields + *

                                                                                                                                                                                              Serves as value of the custom field on a resource or data type customized with a Type.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -34,36 +34,36 @@ public interface CustomFields { /** - * + *

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

                                                                                                                                                                                              * @return type */ @NotNull @Valid @JsonProperty("type") - public Reference getType(); + public TypeReference getType(); /** - *

                                                                                                                                                                                              A valid JSON object, based on FieldDefinition.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

                                                                                                                                                                                              * @return fields */ @NotNull @Valid @JsonProperty("fields") - public Object getFields(); + public FieldContainer getFields(); /** - * set type + *

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

                                                                                                                                                                                              * @param type value to be set */ - public void setType(final Reference type); + public void setType(final TypeReference type); /** - *

                                                                                                                                                                                              A valid JSON object, based on FieldDefinition.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

                                                                                                                                                                                              * @param fields value to be set */ - public void setFields(final Object fields); + public void setFields(final FieldContainer fields); /** * factory method @@ -98,8 +98,8 @@ public static CustomFields deepCopy(@Nullable final CustomFields template) { return null; } CustomFieldsImpl instance = new CustomFieldsImpl(); - instance.setType(com.commercetools.history.models.common.Reference.deepCopy(template.getType())); - instance.setFields(template.getFields()); + instance.setType(com.commercetools.history.models.common.TypeReference.deepCopy(template.getType())); + instance.setFields(com.commercetools.history.models.common.FieldContainer.deepCopy(template.getFields())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsBuilder.java index e0d18f0c65f..2bbd259942b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsBuilder.java @@ -23,71 +23,95 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomFieldsBuilder implements Builder { - private com.commercetools.history.models.common.Reference type; + private com.commercetools.history.models.common.TypeReference type; - private java.lang.Object fields; + private com.commercetools.history.models.common.FieldContainer fields; /** - * set the value to the type using the builder function + *

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

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

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

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

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

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

                                                                                                                                                                                              A valid JSON object, based on FieldDefinition.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

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

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

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

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

                                                                                                                                                                                              * @param fields value to be set * @return Builder */ - public CustomFieldsBuilder fields(final java.lang.Object fields) { + public CustomFieldsBuilder fields(final com.commercetools.history.models.common.FieldContainer fields) { this.fields = fields; return this; } /** - * value of type} + *

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

                                                                                                                                                                                              * @return type */ - public com.commercetools.history.models.common.Reference getType() { + public com.commercetools.history.models.common.TypeReference getType() { return this.type; } /** - *

                                                                                                                                                                                              A valid JSON object, based on FieldDefinition.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

                                                                                                                                                                                              * @return fields */ - public java.lang.Object getFields() { + public com.commercetools.history.models.common.FieldContainer getFields() { return this.fields; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsImpl.java index 0fc1c4a52f0..0d0ac36bbce 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomFieldsImpl.java @@ -17,21 +17,21 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * CustomFields + *

                                                                                                                                                                                              Serves as value of the custom field on a resource or data type customized with a Type.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomFieldsImpl implements CustomFields, ModelBase { - private com.commercetools.history.models.common.Reference type; + private com.commercetools.history.models.common.TypeReference type; - private java.lang.Object fields; + private com.commercetools.history.models.common.FieldContainer fields; /** * create instance with all properties */ @JsonCreator - CustomFieldsImpl(@JsonProperty("type") final com.commercetools.history.models.common.Reference type, - @JsonProperty("fields") final java.lang.Object fields) { + CustomFieldsImpl(@JsonProperty("type") final com.commercetools.history.models.common.TypeReference type, + @JsonProperty("fields") final com.commercetools.history.models.common.FieldContainer fields) { this.type = type; this.fields = fields; } @@ -43,26 +43,26 @@ public CustomFieldsImpl() { } /** - * + *

                                                                                                                                                                                              Reference to the Type that holds the FieldDefinitions for the Custom Fields.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getType() { + public com.commercetools.history.models.common.TypeReference getType() { return this.type; } /** - *

                                                                                                                                                                                              A valid JSON object, based on FieldDefinition.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Object containing the Custom Fields for the customized resource or data type.

                                                                                                                                                                                              */ - public java.lang.Object getFields() { + public com.commercetools.history.models.common.FieldContainer getFields() { return this.fields; } - public void setType(final com.commercetools.history.models.common.Reference type) { + public void setType(final com.commercetools.history.models.common.TypeReference type) { this.type = type; } - public void setFields(final java.lang.Object fields) { + public void setFields(final com.commercetools.history.models.common.FieldContainer fields) { this.fields = fields; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItem.java index 2c4d1747957..8fa9bc95812 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItem.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItem.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -16,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * CustomLineItem + *

                                                                                                                                                                                              A generic item that can be added to the Cart but is not bound to a Product that can be used for discounts (negative money), vouchers, complex cart rules, additional services, or fees. You control the lifecycle of this item.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -26,10 +27,14 @@ * .id("{id}") * .name(nameBuilder -> nameBuilder) * .money(moneyBuilder -> moneyBuilder) - * .taxedPrice(taxedPriceBuilder -> taxedPriceBuilder) + * .plusTaxedPricePortions(taxedPricePortionsBuilder -> taxedPricePortionsBuilder) * .totalPrice(totalPriceBuilder -> totalPriceBuilder) * .slug("{slug}") - * .quantity(1) + * .quantity(0.3) + * .plusState(stateBuilder -> stateBuilder) + * .plusPerMethodTaxRate(perMethodTaxRateBuilder -> perMethodTaxRateBuilder) + * .plusDiscountedPricePerQuantity(discountedPricePerQuantityBuilder -> discountedPricePerQuantityBuilder) + * .priceMode(CustomLineItemPriceMode.STANDARD) * .build() * * @@ -39,7 +44,7 @@ public interface CustomLineItem { /** - *

                                                                                                                                                                                              The unique ID of this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Unique identifier of the Custom Line Item.

                                                                                                                                                                                              * @return id */ @NotNull @@ -47,7 +52,15 @@ public interface CustomLineItem { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              * @return name */ @NotNull @@ -56,34 +69,43 @@ public interface CustomLineItem { public LocalizedString getName(); /** - * + *

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              * @return money */ @NotNull @Valid @JsonProperty("money") - public Money getMoney(); + public TypedMoney getMoney(); /** - * + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @return taxedPrice */ - @NotNull @Valid @JsonProperty("taxedPrice") public TaxedItemPrice getTaxedPrice(); /** - * + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @return taxedPricePortions + */ + @NotNull + @Valid + @JsonProperty("taxedPricePortions") + public List getTaxedPricePortions(); + + /** + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @return totalPrice */ @NotNull @Valid @JsonProperty("totalPrice") - public Money getTotalPrice(); + public CentPrecisionMoney getTotalPrice(); /** - *

                                                                                                                                                                                              A unique String in the cart to identify this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern [a-zA-Z0-9_-]{2,256}.

                                                                                                                                                                                              * @return slug */ @NotNull @@ -91,61 +113,253 @@ public interface CustomLineItem { public String getSlug(); /** - *

                                                                                                                                                                                              The amount of a CustomLineItem in the cart. Must be a positive integer.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Number of Custom Line Items in the Cart or Order.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @return state + */ + @NotNull + @Valid + @JsonProperty("state") + public List getState(); + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @return taxCategory + */ + @Valid + @JsonProperty("taxCategory") + public TaxCategoryReference getTaxCategory(); + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return taxRate + */ + @Valid + @JsonProperty("taxRate") + public TaxRate getTaxRate(); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return perMethodTaxRate + */ + @NotNull + @Valid + @JsonProperty("perMethodTaxRate") + public List getPerMethodTaxRate(); /** - *

                                                                                                                                                                                              The unique ID of this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @return discountedPricePerQuantity + */ + @NotNull + @Valid + @JsonProperty("discountedPricePerQuantity") + public List getDiscountedPricePerQuantity(); + + /** + *

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

                                                                                                                                                                                              + * @return shippingDetails + */ + @Valid + @JsonProperty("shippingDetails") + public ItemShippingDetails getShippingDetails(); + + /** + *

                                                                                                                                                                                              Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.

                                                                                                                                                                                              + * @return priceMode + */ + @NotNull + @JsonProperty("priceMode") + public CustomLineItemPriceMode getPriceMode(); + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public CustomLineItemRecurrenceInfo getRecurrenceInfo(); + + /** + *

                                                                                                                                                                                              Unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              User-defined unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              Name of the Custom Line Item.

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

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              * @param money value to be set */ - public void setMoney(final Money money); + public void setMoney(final TypedMoney money); /** - * set taxedPrice + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @param taxedPrice value to be set */ public void setTaxedPrice(final TaxedItemPrice taxedPrice); /** - * set totalPrice + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions values to be set + */ + + @JsonIgnore + public void setTaxedPricePortions(final MethodTaxedPrice... taxedPricePortions); + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions values to be set + */ + + public void setTaxedPricePortions(final List taxedPricePortions); + + /** + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @param totalPrice value to be set */ - public void setTotalPrice(final Money totalPrice); + public void setTotalPrice(final CentPrecisionMoney totalPrice); /** - *

                                                                                                                                                                                              A unique String in the cart to identify this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern [a-zA-Z0-9_-]{2,256}.

                                                                                                                                                                                              * @param slug value to be set */ public void setSlug(final String slug); /** - *

                                                                                                                                                                                              The amount of a CustomLineItem in the cart. Must be a positive integer.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Number of Custom Line Items in the Cart or Order.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state values to be set + */ + + @JsonIgnore + public void setState(final ItemState... state); + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state values to be set + */ + + public void setState(final List state); + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param taxCategory value to be set + */ + + public void setTaxCategory(final TaxCategoryReference taxCategory); + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param taxRate value to be set + */ + + public void setTaxRate(final TaxRate taxRate); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate values to be set + */ + + @JsonIgnore + public void setPerMethodTaxRate(final MethodTaxRate... perMethodTaxRate); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate values to be set + */ + + public void setPerMethodTaxRate(final List perMethodTaxRate); + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity values to be set + */ + + @JsonIgnore + public void setDiscountedPricePerQuantity(final DiscountedLineItemPriceForQuantity... discountedPricePerQuantity); + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity values to be set + */ + + public void setDiscountedPricePerQuantity( + final List discountedPricePerQuantity); + + /** + *

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

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

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

                                                                                                                                                                                              + * @param shippingDetails value to be set + */ + + public void setShippingDetails(final ItemShippingDetails shippingDetails); + + /** + *

                                                                                                                                                                                              Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.

                                                                                                                                                                                              + * @param priceMode value to be set + */ + + public void setPriceMode(final CustomLineItemPriceMode priceMode); + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param recurrenceInfo value to be set + */ + + public void setRecurrenceInfo(final CustomLineItemRecurrenceInfo recurrenceInfo); /** * factory method @@ -163,12 +377,23 @@ public static CustomLineItem of() { public static CustomLineItem of(final CustomLineItem template) { CustomLineItemImpl instance = new CustomLineItemImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(template.getName()); instance.setMoney(template.getMoney()); instance.setTaxedPrice(template.getTaxedPrice()); + instance.setTaxedPricePortions(template.getTaxedPricePortions()); instance.setTotalPrice(template.getTotalPrice()); instance.setSlug(template.getSlug()); instance.setQuantity(template.getQuantity()); + instance.setState(template.getState()); + instance.setTaxCategory(template.getTaxCategory()); + instance.setTaxRate(template.getTaxRate()); + instance.setPerMethodTaxRate(template.getPerMethodTaxRate()); + instance.setDiscountedPricePerQuantity(template.getDiscountedPricePerQuantity()); + instance.setCustom(template.getCustom()); + instance.setShippingDetails(template.getShippingDetails()); + instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -186,13 +411,44 @@ public static CustomLineItem deepCopy(@Nullable final CustomLineItem template) { } CustomLineItemImpl instance = new CustomLineItemImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); - instance.setMoney(com.commercetools.history.models.common.Money.deepCopy(template.getMoney())); + instance.setMoney(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getMoney())); instance.setTaxedPrice( com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getTaxedPrice())); - instance.setTotalPrice(com.commercetools.history.models.common.Money.deepCopy(template.getTotalPrice())); + instance.setTaxedPricePortions(Optional.ofNullable(template.getTaxedPricePortions()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.MethodTaxedPrice::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTotalPrice( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalPrice())); instance.setSlug(template.getSlug()); instance.setQuantity(template.getQuantity()); + instance.setState(Optional.ofNullable(template.getState()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.ItemState::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTaxCategory( + com.commercetools.history.models.common.TaxCategoryReference.deepCopy(template.getTaxCategory())); + instance.setTaxRate(com.commercetools.history.models.common.TaxRate.deepCopy(template.getTaxRate())); + instance.setPerMethodTaxRate(Optional.ofNullable(template.getPerMethodTaxRate()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.MethodTaxRate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setDiscountedPricePerQuantity(Optional.ofNullable(template.getDiscountedPricePerQuantity()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); + instance.setShippingDetails( + com.commercetools.history.models.common.ItemShippingDetails.deepCopy(template.getShippingDetails())); + instance.setPriceMode(template.getPriceMode()); + instance.setRecurrenceInfo(com.commercetools.history.models.common.CustomLineItemRecurrenceInfo + .deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemBuilder.java index e49050ee351..58d451601b2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -17,10 +19,14 @@ * .id("{id}") * .name(nameBuilder -> nameBuilder) * .money(moneyBuilder -> moneyBuilder) - * .taxedPrice(taxedPriceBuilder -> taxedPriceBuilder) + * .plusTaxedPricePortions(taxedPricePortionsBuilder -> taxedPricePortionsBuilder) * .totalPrice(totalPriceBuilder -> totalPriceBuilder) * .slug("{slug}") - * .quantity(1) + * .quantity(0.3) + * .plusState(stateBuilder -> stateBuilder) + * .plusPerMethodTaxRate(perMethodTaxRateBuilder -> perMethodTaxRateBuilder) + * .plusDiscountedPricePerQuantity(discountedPricePerQuantityBuilder -> discountedPricePerQuantityBuilder) + * .priceMode(CustomLineItemPriceMode.STANDARD) * .build() * * @@ -30,20 +36,49 @@ public class CustomLineItemBuilder implements Builder { private String id; + @Nullable + private String key; + private com.commercetools.history.models.common.LocalizedString name; - private com.commercetools.history.models.common.Money money; + private com.commercetools.history.models.common.TypedMoney money; + @Nullable private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; - private com.commercetools.history.models.common.Money totalPrice; + private java.util.List taxedPricePortions; + + private com.commercetools.history.models.common.CentPrecisionMoney totalPrice; private String slug; - private Integer quantity; + private Long quantity; + + private java.util.List state; + + @Nullable + private com.commercetools.history.models.common.TaxCategoryReference taxCategory; + + @Nullable + private com.commercetools.history.models.common.TaxRate taxRate; + + private java.util.List perMethodTaxRate; + + private java.util.List discountedPricePerQuantity; + + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + @Nullable + private com.commercetools.history.models.common.ItemShippingDetails shippingDetails; + + private com.commercetools.history.models.common.CustomLineItemPriceMode priceMode; + + @Nullable + private com.commercetools.history.models.common.CustomLineItemRecurrenceInfo recurrenceInfo; /** - *

                                                                                                                                                                                              The unique ID of this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Unique identifier of the Custom Line Item.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -54,7 +89,18 @@ public CustomLineItemBuilder id(final String id) { } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              User-defined unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -66,7 +112,7 @@ public CustomLineItemBuilder name( } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -78,7 +124,7 @@ public CustomLineItemBuilder withName( } /** - * set the value to the name + *

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -89,42 +135,30 @@ public CustomLineItemBuilder name(final com.commercetools.history.models.common. } /** - * set the value to the money using the builder function - * @param builder function to build the money value + *

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              + * @param money value to be set * @return Builder */ - public CustomLineItemBuilder money( - Function builder) { - this.money = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + public CustomLineItemBuilder money(final com.commercetools.history.models.common.TypedMoney money) { + this.money = money; return this; } /** - * set the value to the money using the builder function + *

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the money value * @return Builder */ - public CustomLineItemBuilder withMoney( - Function builder) { - this.money = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); - return this; - } - - /** - * set the value to the money - * @param money value to be set - * @return Builder - */ - - public CustomLineItemBuilder money(final com.commercetools.history.models.common.Money money) { - this.money = money; + public CustomLineItemBuilder money( + Function> builder) { + this.money = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); return this; } /** - * set the value to the taxedPrice using the builder function + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @param builder function to build the taxedPrice value * @return Builder */ @@ -136,7 +170,7 @@ public CustomLineItemBuilder taxedPrice( } /** - * set the value to the taxedPrice using the builder function + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @param builder function to build the taxedPrice value * @return Builder */ @@ -148,53 +182,150 @@ public CustomLineItemBuilder withTaxedPrice( } /** - * set the value to the taxedPrice + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @param taxedPrice value to be set * @return Builder */ - public CustomLineItemBuilder taxedPrice(final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + public CustomLineItemBuilder taxedPrice( + @Nullable final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { this.taxedPrice = taxedPrice; return this; } /** - * set the value to the totalPrice using the builder function + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder + */ + + public CustomLineItemBuilder taxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + this.taxedPricePortions = new ArrayList<>(Arrays.asList(taxedPricePortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder + */ + + public CustomLineItemBuilder taxedPricePortions( + final java.util.List taxedPricePortions) { + this.taxedPricePortions = taxedPricePortions; + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder + */ + + public CustomLineItemBuilder plusTaxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + if (this.taxedPricePortions == null) { + this.taxedPricePortions = new ArrayList<>(); + } + this.taxedPricePortions.addAll(Arrays.asList(taxedPricePortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public CustomLineItemBuilder plusTaxedPricePortions( + Function builder) { + if (this.taxedPricePortions == null) { + this.taxedPricePortions = new ArrayList<>(); + } + this.taxedPricePortions + .add(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public CustomLineItemBuilder withTaxedPricePortions( + Function builder) { + this.taxedPricePortions = new ArrayList<>(); + this.taxedPricePortions + .add(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public CustomLineItemBuilder addTaxedPricePortions( + Function builder) { + return plusTaxedPricePortions( + builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public CustomLineItemBuilder setTaxedPricePortions( + Function builder) { + return taxedPricePortions(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @param builder function to build the totalPrice value * @return Builder */ public CustomLineItemBuilder totalPrice( - Function builder) { - this.totalPrice = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.totalPrice = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the totalPrice using the builder function + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @param builder function to build the totalPrice value * @return Builder */ public CustomLineItemBuilder withTotalPrice( - Function builder) { - this.totalPrice = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.totalPrice = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the totalPrice + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @param totalPrice value to be set * @return Builder */ - public CustomLineItemBuilder totalPrice(final com.commercetools.history.models.common.Money totalPrice) { + public CustomLineItemBuilder totalPrice( + final com.commercetools.history.models.common.CentPrecisionMoney totalPrice) { this.totalPrice = totalPrice; return this; } /** - *

                                                                                                                                                                                              A unique String in the cart to identify this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern [a-zA-Z0-9_-]{2,256}.

                                                                                                                                                                                              * @param slug value to be set * @return Builder */ @@ -205,18 +336,494 @@ public CustomLineItemBuilder slug(final String slug) { } /** - *

                                                                                                                                                                                              The amount of a CustomLineItem in the cart. Must be a positive integer.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Number of Custom Line Items in the Cart or Order.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public CustomLineItemBuilder quantity(final Integer quantity) { + public CustomLineItemBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - *

                                                                                                                                                                                              The unique ID of this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public CustomLineItemBuilder state(final com.commercetools.history.models.common.ItemState... state) { + this.state = new ArrayList<>(Arrays.asList(state)); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public CustomLineItemBuilder state(final java.util.List state) { + this.state = state; + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public CustomLineItemBuilder plusState(final com.commercetools.history.models.common.ItemState... state) { + if (this.state == null) { + this.state = new ArrayList<>(); + } + this.state.addAll(Arrays.asList(state)); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public CustomLineItemBuilder plusState( + Function builder) { + if (this.state == null) { + this.state = new ArrayList<>(); + } + this.state.add(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public CustomLineItemBuilder withState( + Function builder) { + this.state = new ArrayList<>(); + this.state.add(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public CustomLineItemBuilder addState( + Function builder) { + return plusState(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public CustomLineItemBuilder setState( + Function builder) { + return state(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

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

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

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

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param taxCategory value to be set + * @return Builder + */ + + public CustomLineItemBuilder taxCategory( + @Nullable final com.commercetools.history.models.common.TaxCategoryReference taxCategory) { + this.taxCategory = taxCategory; + return this; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public CustomLineItemBuilder taxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()).build(); + return this; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public CustomLineItemBuilder withTaxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()); + return this; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param taxRate value to be set + * @return Builder + */ + + public CustomLineItemBuilder taxRate(@Nullable final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public CustomLineItemBuilder perMethodTaxRate( + final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + this.perMethodTaxRate = new ArrayList<>(Arrays.asList(perMethodTaxRate)); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public CustomLineItemBuilder perMethodTaxRate( + final java.util.List perMethodTaxRate) { + this.perMethodTaxRate = perMethodTaxRate; + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public CustomLineItemBuilder plusPerMethodTaxRate( + final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + if (this.perMethodTaxRate == null) { + this.perMethodTaxRate = new ArrayList<>(); + } + this.perMethodTaxRate.addAll(Arrays.asList(perMethodTaxRate)); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public CustomLineItemBuilder plusPerMethodTaxRate( + Function builder) { + if (this.perMethodTaxRate == null) { + this.perMethodTaxRate = new ArrayList<>(); + } + this.perMethodTaxRate + .add(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public CustomLineItemBuilder withPerMethodTaxRate( + Function builder) { + this.perMethodTaxRate = new ArrayList<>(); + this.perMethodTaxRate + .add(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public CustomLineItemBuilder addPerMethodTaxRate( + Function builder) { + return plusPerMethodTaxRate(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public CustomLineItemBuilder setPerMethodTaxRate( + Function builder) { + return perMethodTaxRate(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set + * @return Builder + */ + + public CustomLineItemBuilder discountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + this.discountedPricePerQuantity = new ArrayList<>(Arrays.asList(discountedPricePerQuantity)); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set + * @return Builder + */ + + public CustomLineItemBuilder discountedPricePerQuantity( + final java.util.List discountedPricePerQuantity) { + this.discountedPricePerQuantity = discountedPricePerQuantity; + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set + * @return Builder + */ + + public CustomLineItemBuilder plusDiscountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + if (this.discountedPricePerQuantity == null) { + this.discountedPricePerQuantity = new ArrayList<>(); + } + this.discountedPricePerQuantity.addAll(Arrays.asList(discountedPricePerQuantity)); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder + */ + + public CustomLineItemBuilder plusDiscountedPricePerQuantity( + Function builder) { + if (this.discountedPricePerQuantity == null) { + this.discountedPricePerQuantity = new ArrayList<>(); + } + this.discountedPricePerQuantity.add( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of()) + .build()); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder + */ + + public CustomLineItemBuilder withDiscountedPricePerQuantity( + Function builder) { + this.discountedPricePerQuantity = new ArrayList<>(); + this.discountedPricePerQuantity.add( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of()) + .build()); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder + */ + + public CustomLineItemBuilder addDiscountedPricePerQuantity( + Function builder) { + return plusDiscountedPricePerQuantity( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder + */ + + public CustomLineItemBuilder setDiscountedPricePerQuantity( + Function builder) { + return discountedPricePerQuantity( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

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

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

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

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

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

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

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

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

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

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

                                                                                                                                                                                              + * @param shippingDetails value to be set + * @return Builder + */ + + public CustomLineItemBuilder shippingDetails( + @Nullable final com.commercetools.history.models.common.ItemShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.

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

                                                                                                                                                                                              Recurring Order and frequency data.

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

                                                                                                                                                                                              Recurring Order and frequency data.

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

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param recurrenceInfo value to be set + * @return Builder + */ + + public CustomLineItemBuilder recurrenceInfo( + @Nullable final com.commercetools.history.models.common.CustomLineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the Custom Line Item.

                                                                                                                                                                                              * @return id */ @@ -225,7 +832,17 @@ public String getId() { } /** - * value of name} + *

                                                                                                                                                                                              User-defined unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              * @return name */ @@ -234,34 +851,45 @@ public com.commercetools.history.models.common.LocalizedString getName() { } /** - * value of money} + *

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              * @return money */ - public com.commercetools.history.models.common.Money getMoney() { + public com.commercetools.history.models.common.TypedMoney getMoney() { return this.money; } /** - * value of taxedPrice} + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              * @return taxedPrice */ + @Nullable public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { return this.taxedPrice; } /** - * value of totalPrice} + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @return taxedPricePortions + */ + + public java.util.List getTaxedPricePortions() { + return this.taxedPricePortions; + } + + /** + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              * @return totalPrice */ - public com.commercetools.history.models.common.Money getTotalPrice() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalPrice() { return this.totalPrice; } /** - *

                                                                                                                                                                                              A unique String in the cart to identify this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern [a-zA-Z0-9_-]{2,256}.

                                                                                                                                                                                              * @return slug */ @@ -270,14 +898,103 @@ public String getSlug() { } /** - *

                                                                                                                                                                                              The amount of a CustomLineItem in the cart. Must be a positive integer.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Number of Custom Line Items in the Cart or Order.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + * @return state + */ + + public java.util.List getState() { + return this.state; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @return taxCategory + */ + + @Nullable + public com.commercetools.history.models.common.TaxCategoryReference getTaxCategory() { + return this.taxCategory; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return taxRate + */ + + @Nullable + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return perMethodTaxRate + */ + + public java.util.List getPerMethodTaxRate() { + return this.perMethodTaxRate; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + * @return discountedPricePerQuantity + */ + + public java.util.List getDiscountedPricePerQuantity() { + return this.discountedPricePerQuantity; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

                                                                                                                                                                                              + * @return shippingDetails + */ + + @Nullable + public com.commercetools.history.models.common.ItemShippingDetails getShippingDetails() { + return this.shippingDetails; + } + + /** + *

                                                                                                                                                                                              Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.

                                                                                                                                                                                              + * @return priceMode + */ + + public com.commercetools.history.models.common.CustomLineItemPriceMode getPriceMode() { + return this.priceMode; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.history.models.common.CustomLineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + /** * builds CustomLineItem with checking for non-null required values * @return CustomLineItem @@ -286,11 +1003,18 @@ public CustomLineItem build() { Objects.requireNonNull(id, CustomLineItem.class + ": id is missing"); Objects.requireNonNull(name, CustomLineItem.class + ": name is missing"); Objects.requireNonNull(money, CustomLineItem.class + ": money is missing"); - Objects.requireNonNull(taxedPrice, CustomLineItem.class + ": taxedPrice is missing"); + Objects.requireNonNull(taxedPricePortions, CustomLineItem.class + ": taxedPricePortions is missing"); Objects.requireNonNull(totalPrice, CustomLineItem.class + ": totalPrice is missing"); Objects.requireNonNull(slug, CustomLineItem.class + ": slug is missing"); Objects.requireNonNull(quantity, CustomLineItem.class + ": quantity is missing"); - return new CustomLineItemImpl(id, name, money, taxedPrice, totalPrice, slug, quantity); + Objects.requireNonNull(state, CustomLineItem.class + ": state is missing"); + Objects.requireNonNull(perMethodTaxRate, CustomLineItem.class + ": perMethodTaxRate is missing"); + Objects.requireNonNull(discountedPricePerQuantity, + CustomLineItem.class + ": discountedPricePerQuantity is missing"); + Objects.requireNonNull(priceMode, CustomLineItem.class + ": priceMode is missing"); + return new CustomLineItemImpl(id, key, name, money, taxedPrice, taxedPricePortions, totalPrice, slug, quantity, + state, taxCategory, taxRate, perMethodTaxRate, discountedPricePerQuantity, custom, shippingDetails, + priceMode, recurrenceInfo); } /** @@ -298,7 +1022,9 @@ public CustomLineItem build() { * @return CustomLineItem */ public CustomLineItem buildUnchecked() { - return new CustomLineItemImpl(id, name, money, taxedPrice, totalPrice, slug, quantity); + return new CustomLineItemImpl(id, key, name, money, taxedPrice, taxedPricePortions, totalPrice, slug, quantity, + state, taxCategory, taxRate, perMethodTaxRate, discountedPricePerQuantity, custom, shippingDetails, + priceMode, recurrenceInfo); } /** @@ -317,12 +1043,23 @@ public static CustomLineItemBuilder of() { public static CustomLineItemBuilder of(final CustomLineItem template) { CustomLineItemBuilder builder = new CustomLineItemBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.name = template.getName(); builder.money = template.getMoney(); builder.taxedPrice = template.getTaxedPrice(); + builder.taxedPricePortions = template.getTaxedPricePortions(); builder.totalPrice = template.getTotalPrice(); builder.slug = template.getSlug(); builder.quantity = template.getQuantity(); + builder.state = template.getState(); + builder.taxCategory = template.getTaxCategory(); + builder.taxRate = template.getTaxRate(); + builder.perMethodTaxRate = template.getPerMethodTaxRate(); + builder.discountedPricePerQuantity = template.getDiscountedPricePerQuantity(); + builder.custom = template.getCustom(); + builder.shippingDetails = template.getShippingDetails(); + builder.priceMode = template.getPriceMode(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemImpl.java index c8ff472fb21..39d8339e435 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemImpl.java @@ -17,42 +17,85 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * CustomLineItem + *

                                                                                                                                                                                              A generic item that can be added to the Cart but is not bound to a Product that can be used for discounts (negative money), vouchers, complex cart rules, additional services, or fees. You control the lifecycle of this item.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CustomLineItemImpl implements CustomLineItem, ModelBase { private String id; + private String key; + private com.commercetools.history.models.common.LocalizedString name; - private com.commercetools.history.models.common.Money money; + private com.commercetools.history.models.common.TypedMoney money; private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; - private com.commercetools.history.models.common.Money totalPrice; + private java.util.List taxedPricePortions; + + private com.commercetools.history.models.common.CentPrecisionMoney totalPrice; private String slug; - private Integer quantity; + private Long quantity; + + private java.util.List state; + + private com.commercetools.history.models.common.TaxCategoryReference taxCategory; + + private com.commercetools.history.models.common.TaxRate taxRate; + + private java.util.List perMethodTaxRate; + + private java.util.List discountedPricePerQuantity; + + private com.commercetools.history.models.common.CustomFields custom; + + private com.commercetools.history.models.common.ItemShippingDetails shippingDetails; + + private com.commercetools.history.models.common.CustomLineItemPriceMode priceMode; + + private com.commercetools.history.models.common.CustomLineItemRecurrenceInfo recurrenceInfo; /** * create instance with all properties */ @JsonCreator - CustomLineItemImpl(@JsonProperty("id") final String id, + CustomLineItemImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, - @JsonProperty("money") final com.commercetools.history.models.common.Money money, + @JsonProperty("money") final com.commercetools.history.models.common.TypedMoney money, @JsonProperty("taxedPrice") final com.commercetools.history.models.common.TaxedItemPrice taxedPrice, - @JsonProperty("totalPrice") final com.commercetools.history.models.common.Money totalPrice, - @JsonProperty("slug") final String slug, @JsonProperty("quantity") final Integer quantity) { + @JsonProperty("taxedPricePortions") final java.util.List taxedPricePortions, + @JsonProperty("totalPrice") final com.commercetools.history.models.common.CentPrecisionMoney totalPrice, + @JsonProperty("slug") final String slug, @JsonProperty("quantity") final Long quantity, + @JsonProperty("state") final java.util.List state, + @JsonProperty("taxCategory") final com.commercetools.history.models.common.TaxCategoryReference taxCategory, + @JsonProperty("taxRate") final com.commercetools.history.models.common.TaxRate taxRate, + @JsonProperty("perMethodTaxRate") final java.util.List perMethodTaxRate, + @JsonProperty("discountedPricePerQuantity") final java.util.List discountedPricePerQuantity, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, + @JsonProperty("shippingDetails") final com.commercetools.history.models.common.ItemShippingDetails shippingDetails, + @JsonProperty("priceMode") final com.commercetools.history.models.common.CustomLineItemPriceMode priceMode, + @JsonProperty("recurrenceInfo") final com.commercetools.history.models.common.CustomLineItemRecurrenceInfo recurrenceInfo) { this.id = id; + this.key = key; this.name = name; this.money = money; this.taxedPrice = taxedPrice; + this.taxedPricePortions = taxedPricePortions; this.totalPrice = totalPrice; this.slug = slug; this.quantity = quantity; + this.state = state; + this.taxCategory = taxCategory; + this.taxRate = taxRate; + this.perMethodTaxRate = perMethodTaxRate; + this.discountedPricePerQuantity = discountedPricePerQuantity; + this.custom = custom; + this.shippingDetails = shippingDetails; + this.priceMode = priceMode; + this.recurrenceInfo = recurrenceInfo; } /** @@ -62,7 +105,7 @@ public CustomLineItemImpl() { } /** - *

                                                                                                                                                                                              The unique ID of this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Unique identifier of the Custom Line Item.

                                                                                                                                                                                              */ public String getId() { @@ -70,7 +113,15 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Custom Line Item.

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

                                                                                                                                                                                              Name of the Custom Line Item.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getName() { @@ -78,15 +129,15 @@ public com.commercetools.history.models.common.LocalizedString getName() { } /** - * + *

                                                                                                                                                                                              Money value of the Custom Line Item.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getMoney() { + public com.commercetools.history.models.common.TypedMoney getMoney() { return this.money; } /** - * + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { @@ -94,15 +145,24 @@ public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { } /** - * + *

                                                                                                                                                                                              Total taxed prices based on the quantity of the Custom Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + */ + + public java.util.List getTaxedPricePortions() { + return this.taxedPricePortions; + } + + /** + *

                                                                                                                                                                                              Total price of the Custom Line Item (money multiplied by quantity). If the Custom Line Item is discounted, the total price is discountedPricePerQuantity multiplied by quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getTotalPrice() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalPrice() { return this.totalPrice; } /** - *

                                                                                                                                                                                              A unique String in the cart to identify this CustomLineItem.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier used in a deep-link URL for the Custom Line Item. It matches the pattern [a-zA-Z0-9_-]{2,256}.

                                                                                                                                                                                              */ public String getSlug() { @@ -110,22 +170,101 @@ public String getSlug() { } /** - *

                                                                                                                                                                                              The amount of a CustomLineItem in the cart. Must be a positive integer.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Number of Custom Line Items in the Cart or Order.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Custom Line Item within a given State. When a Custom Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Custom Line Items are managed on the Order.

                                                                                                                                                                                              + */ + + public java.util.List getState() { + return this.state; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxCategoryReference getTaxCategory() { + return this.taxCategory; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Custom Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Custom Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + */ + + public java.util.List getPerMethodTaxRate() { + return this.perMethodTaxRate; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Custom Line Item.

                                                                                                                                                                                              + */ + + public java.util.List getDiscountedPricePerQuantity() { + return this.discountedPricePerQuantity; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Custom Line Item.

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

                                                                                                                                                                                              Container for Custom Line Item-specific addresses.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ItemShippingDetails getShippingDetails() { + return this.shippingDetails; + } + + /** + *

                                                                                                                                                                                              Indicates whether Cart Discounts with a matching CartDiscountCustomLineItemsTarget, MultiBuyCustomLineItemsTarget, or CartDiscountPatternTarget are applied to the Custom Line Item.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomLineItemPriceMode getPriceMode() { + return this.priceMode; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomLineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + public void setId(final String id) { this.id = id; } + public void setKey(final String key) { + this.key = key; + } + public void setName(final com.commercetools.history.models.common.LocalizedString name) { this.name = name; } - public void setMoney(final com.commercetools.history.models.common.Money money) { + public void setMoney(final com.commercetools.history.models.common.TypedMoney money) { this.money = money; } @@ -133,7 +272,17 @@ public void setTaxedPrice(final com.commercetools.history.models.common.TaxedIte this.taxedPrice = taxedPrice; } - public void setTotalPrice(final com.commercetools.history.models.common.Money totalPrice) { + public void setTaxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + this.taxedPricePortions = new ArrayList<>(Arrays.asList(taxedPricePortions)); + } + + public void setTaxedPricePortions( + final java.util.List taxedPricePortions) { + this.taxedPricePortions = taxedPricePortions; + } + + public void setTotalPrice(final com.commercetools.history.models.common.CentPrecisionMoney totalPrice) { this.totalPrice = totalPrice; } @@ -141,10 +290,62 @@ public void setSlug(final String slug) { this.slug = slug; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } + public void setState(final com.commercetools.history.models.common.ItemState... state) { + this.state = new ArrayList<>(Arrays.asList(state)); + } + + public void setState(final java.util.List state) { + this.state = state; + } + + public void setTaxCategory(final com.commercetools.history.models.common.TaxCategoryReference taxCategory) { + this.taxCategory = taxCategory; + } + + public void setTaxRate(final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + } + + public void setPerMethodTaxRate(final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + this.perMethodTaxRate = new ArrayList<>(Arrays.asList(perMethodTaxRate)); + } + + public void setPerMethodTaxRate( + final java.util.List perMethodTaxRate) { + this.perMethodTaxRate = perMethodTaxRate; + } + + public void setDiscountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + this.discountedPricePerQuantity = new ArrayList<>(Arrays.asList(discountedPricePerQuantity)); + } + + public void setDiscountedPricePerQuantity( + final java.util.List discountedPricePerQuantity) { + this.discountedPricePerQuantity = discountedPricePerQuantity; + } + + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + public void setShippingDetails(final com.commercetools.history.models.common.ItemShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + } + + public void setPriceMode(final com.commercetools.history.models.common.CustomLineItemPriceMode priceMode) { + this.priceMode = priceMode; + } + + public void setRecurrenceInfo( + final com.commercetools.history.models.common.CustomLineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + } + @Override public boolean equals(Object o) { if (this == o) @@ -156,43 +357,87 @@ public boolean equals(Object o) { CustomLineItemImpl that = (CustomLineItemImpl) o; return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(money, that.money) .append(taxedPrice, that.taxedPrice) + .append(taxedPricePortions, that.taxedPricePortions) .append(totalPrice, that.totalPrice) .append(slug, that.slug) .append(quantity, that.quantity) + .append(state, that.state) + .append(taxCategory, that.taxCategory) + .append(taxRate, that.taxRate) + .append(perMethodTaxRate, that.perMethodTaxRate) + .append(discountedPricePerQuantity, that.discountedPricePerQuantity) + .append(custom, that.custom) + .append(shippingDetails, that.shippingDetails) + .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(money, that.money) .append(taxedPrice, that.taxedPrice) + .append(taxedPricePortions, that.taxedPricePortions) .append(totalPrice, that.totalPrice) .append(slug, that.slug) .append(quantity, that.quantity) + .append(state, that.state) + .append(taxCategory, that.taxCategory) + .append(taxRate, that.taxRate) + .append(perMethodTaxRate, that.perMethodTaxRate) + .append(discountedPricePerQuantity, that.discountedPricePerQuantity) + .append(custom, that.custom) + .append(shippingDetails, that.shippingDetails) + .append(priceMode, that.priceMode) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(id) + .append(key) .append(name) .append(money) .append(taxedPrice) + .append(taxedPricePortions) .append(totalPrice) .append(slug) .append(quantity) + .append(state) + .append(taxCategory) + .append(taxRate) + .append(perMethodTaxRate) + .append(discountedPricePerQuantity) + .append(custom) + .append(shippingDetails) + .append(priceMode) + .append(recurrenceInfo) .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("name", name) .append("money", money) .append("taxedPrice", taxedPrice) + .append("taxedPricePortions", taxedPricePortions) .append("totalPrice", totalPrice) .append("slug", slug) .append("quantity", quantity) + .append("state", state) + .append("taxCategory", taxCategory) + .append("taxRate", taxRate) + .append("perMethodTaxRate", perMethodTaxRate) + .append("discountedPricePerQuantity", discountedPricePerQuantity) + .append("custom", custom) + .append("shippingDetails", shippingDetails) + .append("priceMode", priceMode) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemPriceMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemPriceMode.java new file mode 100644 index 00000000000..06b229a73bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemPriceMode.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 if Cart Discounts can be applied to a Custom Line Item in the Cart.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface CustomLineItemPriceMode extends JsonEnum { + + CustomLineItemPriceMode STANDARD = CustomLineItemPriceModeEnum.STANDARD; + + CustomLineItemPriceMode EXTERNAL = CustomLineItemPriceModeEnum.EXTERNAL; + + /** + * possible values of CustomLineItemPriceMode + */ + enum CustomLineItemPriceModeEnum implements CustomLineItemPriceMode { + /** + * Standard + */ + STANDARD("Standard"), + + /** + * External + */ + EXTERNAL("External"); + private final String jsonName; + + private CustomLineItemPriceModeEnum(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 CustomLineItemPriceMode + * 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 CustomLineItemPriceMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new CustomLineItemPriceMode() { + @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 CustomLineItemPriceMode[] values() { + return CustomLineItemPriceModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfo.java new file mode 100644 index 00000000000..42d4ab978c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfo.java @@ -0,0 +1,127 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Information about recurring orders and frequencies.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = CustomLineItemRecurrenceInfo.builder()
                                                                                                                                                                                              + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomLineItemRecurrenceInfoImpl.class) +public interface CustomLineItemRecurrenceInfo { + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + * factory method + * @return instance of CustomLineItemRecurrenceInfo + */ + public static CustomLineItemRecurrenceInfo of() { + return new CustomLineItemRecurrenceInfoImpl(); + } + + /** + * factory method to create a shallow copy CustomLineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + public static CustomLineItemRecurrenceInfo of(final CustomLineItemRecurrenceInfo template) { + CustomLineItemRecurrenceInfoImpl instance = new CustomLineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public CustomLineItemRecurrenceInfo copyDeep(); + + /** + * factory method to create a deep copy of CustomLineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomLineItemRecurrenceInfo deepCopy(@Nullable final CustomLineItemRecurrenceInfo template) { + if (template == null) { + return null; + } + CustomLineItemRecurrenceInfoImpl instance = new CustomLineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy( + com.commercetools.history.models.common.RecurrencePolicyReference.deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for CustomLineItemRecurrenceInfo + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder builder() { + return CustomLineItemRecurrenceInfoBuilder.of(); + } + + /** + * create builder for CustomLineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder builder(final CustomLineItemRecurrenceInfo template) { + return CustomLineItemRecurrenceInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomLineItemRecurrenceInfo(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/CustomLineItemRecurrenceInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoBuilder.java new file mode 100644 index 00000000000..963b31a9982 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoBuilder.java @@ -0,0 +1,111 @@ + +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; + +/** + * CustomLineItemRecurrenceInfoBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = CustomLineItemRecurrenceInfo.builder()
                                                                                                                                                                                              + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoBuilder implements Builder { + + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

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

                                                                                                                                                                                              Reference to a RecurrencePolicy.

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

                                                                                                                                                                                              Reference to a RecurrencePolicy.

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

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds CustomLineItemRecurrenceInfo with checking for non-null required values + * @return CustomLineItemRecurrenceInfo + */ + public CustomLineItemRecurrenceInfo build() { + Objects.requireNonNull(recurrencePolicy, CustomLineItemRecurrenceInfo.class + ": recurrencePolicy is missing"); + return new CustomLineItemRecurrenceInfoImpl(recurrencePolicy); + } + + /** + * builds CustomLineItemRecurrenceInfo without checking for non-null required values + * @return CustomLineItemRecurrenceInfo + */ + public CustomLineItemRecurrenceInfo buildUnchecked() { + return new CustomLineItemRecurrenceInfoImpl(recurrencePolicy); + } + + /** + * factory method for an instance of CustomLineItemRecurrenceInfoBuilder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder of() { + return new CustomLineItemRecurrenceInfoBuilder(); + } + + /** + * create builder for CustomLineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomLineItemRecurrenceInfoBuilder of(final CustomLineItemRecurrenceInfo template) { + CustomLineItemRecurrenceInfoBuilder builder = new CustomLineItemRecurrenceInfoBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoImpl.java new file mode 100644 index 00000000000..8a9e7d68222 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoImpl.java @@ -0,0 +1,85 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Information about recurring orders and frequencies.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomLineItemRecurrenceInfoImpl implements CustomLineItemRecurrenceInfo, ModelBase { + + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + CustomLineItemRecurrenceInfoImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + /** + * create empty instance + */ + public CustomLineItemRecurrenceInfoImpl() { + } + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setRecurrencePolicy( + final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomLineItemRecurrenceInfoImpl that = (CustomLineItemRecurrenceInfoImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public CustomLineItemRecurrenceInfo copyDeep() { + return CustomLineItemRecurrenceInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignment.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignment.java new file mode 100644 index 00000000000..67217e1452d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignment.java @@ -0,0 +1,127 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * CustomerGroupAssignment + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerGroupAssignment customerGroupAssignment = CustomerGroupAssignment.builder()
                                                                                                                                                                                              + *             .customerGroup(customerGroupBuilder -> customerGroupBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerGroupAssignmentImpl.class) +public interface CustomerGroupAssignment { + + /** + *

                                                                                                                                                                                              Reference to a Customer Group.

                                                                                                                                                                                              + * @return customerGroup + */ + @NotNull + @Valid + @JsonProperty("customerGroup") + public CustomerGroupReference getCustomerGroup(); + + /** + *

                                                                                                                                                                                              Reference to a Customer Group.

                                                                                                                                                                                              + * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupReference customerGroup); + + /** + * factory method + * @return instance of CustomerGroupAssignment + */ + public static CustomerGroupAssignment of() { + return new CustomerGroupAssignmentImpl(); + } + + /** + * factory method to create a shallow copy CustomerGroupAssignment + * @param template instance to be copied + * @return copy instance + */ + public static CustomerGroupAssignment of(final CustomerGroupAssignment template) { + CustomerGroupAssignmentImpl instance = new CustomerGroupAssignmentImpl(); + instance.setCustomerGroup(template.getCustomerGroup()); + return instance; + } + + public CustomerGroupAssignment copyDeep(); + + /** + * factory method to create a deep copy of CustomerGroupAssignment + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerGroupAssignment deepCopy(@Nullable final CustomerGroupAssignment template) { + if (template == null) { + return null; + } + CustomerGroupAssignmentImpl instance = new CustomerGroupAssignmentImpl(); + instance.setCustomerGroup( + com.commercetools.history.models.common.CustomerGroupReference.deepCopy(template.getCustomerGroup())); + return instance; + } + + /** + * builder factory method for CustomerGroupAssignment + * @return builder + */ + public static CustomerGroupAssignmentBuilder builder() { + return CustomerGroupAssignmentBuilder.of(); + } + + /** + * create builder for CustomerGroupAssignment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerGroupAssignmentBuilder builder(final CustomerGroupAssignment template) { + return CustomerGroupAssignmentBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerGroupAssignment(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/CustomerGroupAssignmentBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentBuilder.java new file mode 100644 index 00000000000..869212b5af8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentBuilder.java @@ -0,0 +1,109 @@ + +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; + +/** + * CustomerGroupAssignmentBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerGroupAssignment customerGroupAssignment = CustomerGroupAssignment.builder()
                                                                                                                                                                                              + *             .customerGroup(customerGroupBuilder -> customerGroupBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerGroupAssignmentBuilder implements Builder { + + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + /** + *

                                                                                                                                                                                              Reference to a Customer Group.

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

                                                                                                                                                                                              Reference to a Customer Group.

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

                                                                                                                                                                                              Reference to a Customer Group.

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

                                                                                                                                                                                              Reference to a Customer Group.

                                                                                                                                                                                              + * @return customerGroup + */ + + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + /** + * builds CustomerGroupAssignment with checking for non-null required values + * @return CustomerGroupAssignment + */ + public CustomerGroupAssignment build() { + Objects.requireNonNull(customerGroup, CustomerGroupAssignment.class + ": customerGroup is missing"); + return new CustomerGroupAssignmentImpl(customerGroup); + } + + /** + * builds CustomerGroupAssignment without checking for non-null required values + * @return CustomerGroupAssignment + */ + public CustomerGroupAssignment buildUnchecked() { + return new CustomerGroupAssignmentImpl(customerGroup); + } + + /** + * factory method for an instance of CustomerGroupAssignmentBuilder + * @return builder + */ + public static CustomerGroupAssignmentBuilder of() { + return new CustomerGroupAssignmentBuilder(); + } + + /** + * create builder for CustomerGroupAssignment instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerGroupAssignmentBuilder of(final CustomerGroupAssignment template) { + CustomerGroupAssignmentBuilder builder = new CustomerGroupAssignmentBuilder(); + builder.customerGroup = template.getCustomerGroup(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentImpl.java new file mode 100644 index 00000000000..d7163f16de5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentImpl.java @@ -0,0 +1,84 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CustomerGroupAssignment + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerGroupAssignmentImpl implements CustomerGroupAssignment, ModelBase { + + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerGroupAssignmentImpl( + @JsonProperty("customerGroup") final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + } + + /** + * create empty instance + */ + public CustomerGroupAssignmentImpl() { + } + + /** + *

                                                                                                                                                                                              Reference to a Customer Group.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + public void setCustomerGroup(final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerGroupAssignmentImpl that = (CustomerGroupAssignmentImpl) o; + + return new EqualsBuilder().append(customerGroup, that.customerGroup) + .append(customerGroup, that.customerGroup) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(customerGroup).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("customerGroup", customerGroup) + .build(); + } + + @Override + public CustomerGroupAssignment copyDeep() { + return CustomerGroupAssignment.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReference.java new file mode 100644 index 00000000000..01303d8017a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerGroupReference customerGroupReference = CustomerGroupReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("customer-group") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerGroupReferenceImpl.class) +public interface CustomerGroupReference extends Reference { + + /** + * discriminator value for CustomerGroupReference + */ + String CUSTOMER_GROUP = "customer-group"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CustomerGroup.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CustomerGroup.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of CustomerGroupReference + */ + public static CustomerGroupReference of() { + return new CustomerGroupReferenceImpl(); + } + + /** + * factory method to create a shallow copy CustomerGroupReference + * @param template instance to be copied + * @return copy instance + */ + public static CustomerGroupReference of(final CustomerGroupReference template) { + CustomerGroupReferenceImpl instance = new CustomerGroupReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public CustomerGroupReference copyDeep(); + + /** + * factory method to create a deep copy of CustomerGroupReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerGroupReference deepCopy(@Nullable final CustomerGroupReference template) { + if (template == null) { + return null; + } + CustomerGroupReferenceImpl instance = new CustomerGroupReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for CustomerGroupReference + * @return builder + */ + public static CustomerGroupReferenceBuilder builder() { + return CustomerGroupReferenceBuilder.of(); + } + + /** + * create builder for CustomerGroupReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerGroupReferenceBuilder builder(final CustomerGroupReference template) { + return CustomerGroupReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerGroupReference(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/CustomerGroupReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceBuilder.java new file mode 100644 index 00000000000..8ad79d7ed6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerGroupReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerGroupReference customerGroupReference = CustomerGroupReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerGroupReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CustomerGroup.

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

                                                                                                                                                                                              Unique identifier of the referenced CustomerGroup.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds CustomerGroupReference with checking for non-null required values + * @return CustomerGroupReference + */ + public CustomerGroupReference build() { + Objects.requireNonNull(id, CustomerGroupReference.class + ": id is missing"); + return new CustomerGroupReferenceImpl(id); + } + + /** + * builds CustomerGroupReference without checking for non-null required values + * @return CustomerGroupReference + */ + public CustomerGroupReference buildUnchecked() { + return new CustomerGroupReferenceImpl(id); + } + + /** + * factory method for an instance of CustomerGroupReferenceBuilder + * @return builder + */ + public static CustomerGroupReferenceBuilder of() { + return new CustomerGroupReferenceBuilder(); + } + + /** + * create builder for CustomerGroupReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerGroupReferenceBuilder of(final CustomerGroupReference template) { + CustomerGroupReferenceBuilder builder = new CustomerGroupReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceImpl.java new file mode 100644 index 00000000000..2ad24231e72 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerGroupReferenceImpl implements CustomerGroupReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerGroupReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("customer-group"); + } + + /** + * create empty instance + */ + public CustomerGroupReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("customer-group"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced CustomerGroup.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerGroupReferenceImpl that = (CustomerGroupReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public CustomerGroupReference copyDeep() { + return CustomerGroupReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReference.java new file mode 100644 index 00000000000..264b7b154fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Customer.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerReference customerReference = CustomerReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("customer") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerReferenceImpl.class) +public interface CustomerReference extends Reference { + + /** + * discriminator value for CustomerReference + */ + String CUSTOMER = "customer"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Customer.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Customer.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of CustomerReference + */ + public static CustomerReference of() { + return new CustomerReferenceImpl(); + } + + /** + * factory method to create a shallow copy CustomerReference + * @param template instance to be copied + * @return copy instance + */ + public static CustomerReference of(final CustomerReference template) { + CustomerReferenceImpl instance = new CustomerReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public CustomerReference copyDeep(); + + /** + * factory method to create a deep copy of CustomerReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerReference deepCopy(@Nullable final CustomerReference template) { + if (template == null) { + return null; + } + CustomerReferenceImpl instance = new CustomerReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for CustomerReference + * @return builder + */ + public static CustomerReferenceBuilder builder() { + return CustomerReferenceBuilder.of(); + } + + /** + * create builder for CustomerReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerReferenceBuilder builder(final CustomerReference template) { + return CustomerReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerReference(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/CustomerReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReferenceBuilder.java new file mode 100644 index 00000000000..8394553a7bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     CustomerReference customerReference = CustomerReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Customer.

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

                                                                                                                                                                                              Unique identifier of the referenced Customer.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds CustomerReference with checking for non-null required values + * @return CustomerReference + */ + public CustomerReference build() { + Objects.requireNonNull(id, CustomerReference.class + ": id is missing"); + return new CustomerReferenceImpl(id); + } + + /** + * builds CustomerReference without checking for non-null required values + * @return CustomerReference + */ + public CustomerReference buildUnchecked() { + return new CustomerReferenceImpl(id); + } + + /** + * factory method for an instance of CustomerReferenceBuilder + * @return builder + */ + public static CustomerReferenceBuilder of() { + return new CustomerReferenceBuilder(); + } + + /** + * create builder for CustomerReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerReferenceBuilder of(final CustomerReference template) { + CustomerReferenceBuilder builder = new CustomerReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReferenceImpl.java new file mode 100644 index 00000000000..cb5d1150165 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/CustomerReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Customer.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerReferenceImpl implements CustomerReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("customer"); + } + + /** + * create empty instance + */ + public CustomerReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("customer"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Customer.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerReferenceImpl that = (CustomerReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public CustomerReference copyDeep() { + return CustomerReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Delivery.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Delivery.java index 78a81cb9299..f65636d392d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Delivery.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Delivery.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -17,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * Delivery + *

                                                                                                                                                                                              Contains information on how items are shipped to Customers, for example, a delivery note.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -25,7 +26,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Delivery delivery = Delivery.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                                *             .plusParcels(parcelsBuilder -> parcelsBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                              @@ -37,7 +38,7 @@
                                                                                                                                                                                               public interface Delivery {
                                                                                                                                                                                               
                                                                                                                                                                                                   /**
                                                                                                                                                                                              -     *
                                                                                                                                                                                              +     *  

                                                                                                                                                                                              Unique identifier of the Delivery.

                                                                                                                                                                                              * @return id */ @NotNull @@ -45,15 +46,23 @@ public interface Delivery { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Delivery.

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

                                                                                                                                                                                              Date and time (UTC) the Delivery was created.

                                                                                                                                                                                              * @return createdAt */ @NotNull @JsonProperty("createdAt") - public String getCreatedAt(); + public ZonedDateTime getCreatedAt(); /** - * + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @return items */ @NotNull @@ -62,7 +71,7 @@ public interface Delivery { public List getItems(); /** - * + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @return parcels */ @NotNull @@ -71,7 +80,7 @@ public interface Delivery { public List getParcels(); /** - * + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @return address */ @Valid @@ -79,7 +88,7 @@ public interface Delivery { public Address getAddress(); /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @return custom */ @Valid @@ -87,21 +96,28 @@ public interface Delivery { public CustomFields getCustom(); /** - * set id + *

                                                                                                                                                                                              Unique identifier of the Delivery.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set createdAt + *

                                                                                                                                                                                              User-defined unique identifier of the Delivery.

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

                                                                                                                                                                                              Date and time (UTC) the Delivery was created.

                                                                                                                                                                                              * @param createdAt value to be set */ - public void setCreatedAt(final String createdAt); + public void setCreatedAt(final ZonedDateTime createdAt); /** - * set items + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param items values to be set */ @@ -109,14 +125,14 @@ public interface Delivery { public void setItems(final DeliveryItem... items); /** - * set items + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param items values to be set */ public void setItems(final List items); /** - * set parcels + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param parcels values to be set */ @@ -124,21 +140,21 @@ public interface Delivery { public void setParcels(final Parcel... parcels); /** - * set parcels + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param parcels values to be set */ public void setParcels(final List parcels); /** - * set address + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @param address value to be set */ public void setAddress(final Address address); /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @param custom value to be set */ @@ -160,6 +176,7 @@ public static Delivery of() { public static Delivery of(final Delivery template) { DeliveryImpl instance = new DeliveryImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setCreatedAt(template.getCreatedAt()); instance.setItems(template.getItems()); instance.setParcels(template.getParcels()); @@ -182,6 +199,7 @@ public static Delivery deepCopy(@Nullable final Delivery template) { } DeliveryImpl instance = new DeliveryImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setCreatedAt(template.getCreatedAt()); instance.setItems(Optional.ofNullable(template.getItems()) .map(t -> t.stream() diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryBuilder.java index a58dd9e155f..80fedac179d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryBuilder.java @@ -17,7 +17,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Delivery delivery = Delivery.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                                *             .plusParcels(parcelsBuilder -> parcelsBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                              @@ -29,7 +29,10 @@ public class DeliveryBuilder implements Builder {
                                                                                                                                                                                               
                                                                                                                                                                                                   private String id;
                                                                                                                                                                                               
                                                                                                                                                                                              -    private String createdAt;
                                                                                                                                                                                              +    @Nullable
                                                                                                                                                                                              +    private String key;
                                                                                                                                                                                              +
                                                                                                                                                                                              +    private java.time.ZonedDateTime createdAt;
                                                                                                                                                                                               
                                                                                                                                                                                                   private java.util.List items;
                                                                                                                                                                                               
                                                                                                                                                                                              @@ -42,7 +45,7 @@ public class DeliveryBuilder implements Builder {
                                                                                                                                                                                                   private com.commercetools.history.models.common.CustomFields custom;
                                                                                                                                                                                               
                                                                                                                                                                                                   /**
                                                                                                                                                                                              -     * set the value to the id
                                                                                                                                                                                              +     *  

                                                                                                                                                                                              Unique identifier of the Delivery.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -53,18 +56,29 @@ public DeliveryBuilder id(final String id) { } /** - * set the value to the createdAt + *

                                                                                                                                                                                              User-defined unique identifier of the Delivery.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public DeliveryBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Delivery was created.

                                                                                                                                                                                              * @param createdAt value to be set * @return Builder */ - public DeliveryBuilder createdAt(final String createdAt) { + public DeliveryBuilder createdAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * set values to the items + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -75,7 +89,7 @@ public DeliveryBuilder items(final com.commercetools.history.models.common.Deliv } /** - * set value to the items + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -86,7 +100,7 @@ public DeliveryBuilder items(final java.util.ListLine Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -100,7 +114,7 @@ public DeliveryBuilder plusItems(final com.commercetools.history.models.common.D } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -115,7 +129,7 @@ public DeliveryBuilder plusItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -128,7 +142,7 @@ public DeliveryBuilder withItems( } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -139,7 +153,7 @@ public DeliveryBuilder addItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -150,7 +164,7 @@ public DeliveryBuilder setItems( } /** - * set values to the parcels + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param parcels value to be set * @return Builder */ @@ -161,7 +175,7 @@ public DeliveryBuilder parcels(final com.commercetools.history.models.common.Par } /** - * set value to the parcels + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param parcels value to be set * @return Builder */ @@ -172,7 +186,7 @@ public DeliveryBuilder parcels(final java.util.ListInformation regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param parcels value to be set * @return Builder */ @@ -186,7 +200,7 @@ public DeliveryBuilder plusParcels(final com.commercetools.history.models.common } /** - * add the value to the parcels using the builder function + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param builder function to build the parcels value * @return Builder */ @@ -201,7 +215,7 @@ public DeliveryBuilder plusParcels( } /** - * set the value to the parcels using the builder function + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param builder function to build the parcels value * @return Builder */ @@ -214,7 +228,7 @@ public DeliveryBuilder withParcels( } /** - * add the value to the parcels using the builder function + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param builder function to build the parcels value * @return Builder */ @@ -225,7 +239,7 @@ public DeliveryBuilder addParcels( } /** - * set the value to the parcels using the builder function + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @param builder function to build the parcels value * @return Builder */ @@ -236,7 +250,7 @@ public DeliveryBuilder setParcels( } /** - * set the value to the address using the builder function + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @param builder function to build the address value * @return Builder */ @@ -248,7 +262,7 @@ public DeliveryBuilder address( } /** - * set the value to the address using the builder function + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @param builder function to build the address value * @return Builder */ @@ -260,7 +274,7 @@ public DeliveryBuilder withAddress( } /** - * set the value to the address + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @param address value to be set * @return Builder */ @@ -271,7 +285,7 @@ public DeliveryBuilder address(@Nullable final com.commercetools.history.models. } /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -283,7 +297,7 @@ public DeliveryBuilder custom( } /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -295,7 +309,7 @@ public DeliveryBuilder withCustom( } /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @param custom value to be set * @return Builder */ @@ -306,7 +320,7 @@ public DeliveryBuilder custom(@Nullable final com.commercetools.history.models.c } /** - * value of id} + *

                                                                                                                                                                                              Unique identifier of the Delivery.

                                                                                                                                                                                              * @return id */ @@ -315,16 +329,26 @@ public String getId() { } /** - * value of createdAt} + *

                                                                                                                                                                                              User-defined unique identifier of the Delivery.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Delivery was created.

                                                                                                                                                                                              * @return createdAt */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } /** - * value of items} + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              * @return items */ @@ -333,7 +357,7 @@ public java.util.List getI } /** - * value of parcels} + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * @return parcels */ @@ -342,7 +366,7 @@ public java.util.List getParcels } /** - * value of address} + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              * @return address */ @@ -352,7 +376,7 @@ public com.commercetools.history.models.common.Address getAddress() { } /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              * @return custom */ @@ -370,7 +394,7 @@ public Delivery build() { Objects.requireNonNull(createdAt, Delivery.class + ": createdAt is missing"); Objects.requireNonNull(items, Delivery.class + ": items is missing"); Objects.requireNonNull(parcels, Delivery.class + ": parcels is missing"); - return new DeliveryImpl(id, createdAt, items, parcels, address, custom); + return new DeliveryImpl(id, key, createdAt, items, parcels, address, custom); } /** @@ -378,7 +402,7 @@ public Delivery build() { * @return Delivery */ public Delivery buildUnchecked() { - return new DeliveryImpl(id, createdAt, items, parcels, address, custom); + return new DeliveryImpl(id, key, createdAt, items, parcels, address, custom); } /** @@ -397,6 +421,7 @@ public static DeliveryBuilder of() { public static DeliveryBuilder of(final Delivery template) { DeliveryBuilder builder = new DeliveryBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.createdAt = template.getCreatedAt(); builder.items = template.getItems(); builder.parcels = template.getParcels(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryImpl.java index fa2cc90e88d..9c0289606ca 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryImpl.java @@ -17,14 +17,16 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Delivery + *

                                                                                                                                                                                              Contains information on how items are shipped to Customers, for example, a delivery note.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DeliveryImpl implements Delivery, ModelBase { private String id; - private String createdAt; + private String key; + + private java.time.ZonedDateTime createdAt; private java.util.List items; @@ -38,12 +40,14 @@ public class DeliveryImpl implements Delivery, ModelBase { * create instance with all properties */ @JsonCreator - DeliveryImpl(@JsonProperty("id") final String id, @JsonProperty("createdAt") final String createdAt, + DeliveryImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, @JsonProperty("items") final java.util.List items, @JsonProperty("parcels") final java.util.List parcels, @JsonProperty("address") final com.commercetools.history.models.common.Address address, @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) { this.id = id; + this.key = key; this.createdAt = createdAt; this.items = items; this.parcels = parcels; @@ -58,7 +62,7 @@ public DeliveryImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of the Delivery.

                                                                                                                                                                                              */ public String getId() { @@ -66,15 +70,23 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Delivery.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Delivery was created.

                                                                                                                                                                                              */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } /** - * + *

                                                                                                                                                                                              Line Items or Custom Line Items that are delivered.

                                                                                                                                                                                              */ public java.util.List getItems() { @@ -82,7 +94,7 @@ public java.util.List getI } /** - * + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              */ public java.util.List getParcels() { @@ -90,7 +102,7 @@ public java.util.List getParcels } /** - * + *

                                                                                                                                                                                              Address to which Parcels are delivered.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.Address getAddress() { @@ -98,7 +110,7 @@ public com.commercetools.history.models.common.Address getAddress() { } /** - *

                                                                                                                                                                                              Custom Fields for the Transaction.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Custom Fields of the Delivery.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.CustomFields getCustom() { @@ -109,7 +121,11 @@ public void setId(final String id) { this.id = id; } - public void setCreatedAt(final String createdAt) { + public void setKey(final String key) { + this.key = key; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; } @@ -148,12 +164,14 @@ public boolean equals(Object o) { DeliveryImpl that = (DeliveryImpl) o; return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(createdAt, that.createdAt) .append(items, that.items) .append(parcels, that.parcels) .append(address, that.address) .append(custom, that.custom) .append(id, that.id) + .append(key, that.key) .append(createdAt, that.createdAt) .append(items, that.items) .append(parcels, that.parcels) @@ -165,6 +183,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(id) + .append(key) .append(createdAt) .append(items) .append(parcels) @@ -176,6 +195,7 @@ public int hashCode() { @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("createdAt", createdAt) .append("items", items) .append("parcels", parcels) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItem.java index f293748d4bf..b5eebdbc83b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItem.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItem.java @@ -23,7 +23,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     DeliveryItem deliveryItem = DeliveryItem.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -33,7 +33,7 @@ public interface DeliveryItem { /** - * + *

                                                                                                                                                                                              id of the LineItem or CustomLineItem delivered.

                                                                                                                                                                                              * @return id */ @NotNull @@ -41,26 +41,26 @@ public interface DeliveryItem { public String getId(); /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items delivered.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - * set id + *

                                                                                                                                                                                              id of the LineItem or CustomLineItem delivered.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items delivered.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** * factory method diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemBuilder.java index ab3f8f9d83f..22656414655 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemBuilder.java @@ -14,7 +14,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     DeliveryItem deliveryItem = DeliveryItem.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -24,10 +24,10 @@ public class DeliveryItemBuilder implements Builder { private String id; - private Integer quantity; + private Long quantity; /** - * set the value to the id + *

                                                                                                                                                                                              id of the LineItem or CustomLineItem delivered.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -38,18 +38,18 @@ public DeliveryItemBuilder id(final String id) { } /** - * set the value to the quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items delivered.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public DeliveryItemBuilder quantity(final Integer quantity) { + public DeliveryItemBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - * value of id} + *

                                                                                                                                                                                              id of the LineItem or CustomLineItem delivered.

                                                                                                                                                                                              * @return id */ @@ -58,11 +58,11 @@ public String getId() { } /** - * value of quantity} + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items delivered.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemImpl.java index 4d270943038..f5af7b82e0a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DeliveryItemImpl.java @@ -24,13 +24,13 @@ public class DeliveryItemImpl implements DeliveryItem, ModelBase { private String id; - private Integer quantity; + private Long quantity; /** * create instance with all properties */ @JsonCreator - DeliveryItemImpl(@JsonProperty("id") final String id, @JsonProperty("quantity") final Integer quantity) { + DeliveryItemImpl(@JsonProperty("id") final String id, @JsonProperty("quantity") final Long quantity) { this.id = id; this.quantity = quantity; } @@ -42,7 +42,7 @@ public DeliveryItemImpl() { } /** - * + *

                                                                                                                                                                                              id of the LineItem or CustomLineItem delivered.

                                                                                                                                                                                              */ public String getId() { @@ -50,10 +50,10 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items delivered.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } @@ -61,7 +61,7 @@ public void setId(final String id) { this.id = id; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfo.java index bc7d50dda9f..14d0f103615 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfo.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfo.java @@ -34,16 +34,16 @@ public interface DiscountCodeInfo { /** - * + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @return discountCode */ @NotNull @Valid @JsonProperty("discountCode") - public Reference getDiscountCode(); + public DiscountCodeReference getDiscountCode(); /** - * + *

                                                                                                                                                                                              Indicates the state of the Discount Code applied to the Cart or Order.

                                                                                                                                                                                              * @return state */ @NotNull @@ -51,14 +51,14 @@ public interface DiscountCodeInfo { public DiscountCodeState getState(); /** - * set discountCode + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @param discountCode value to be set */ - public void setDiscountCode(final Reference discountCode); + public void setDiscountCode(final DiscountCodeReference discountCode); /** - * set state + *

                                                                                                                                                                                              Indicates the state of the Discount Code applied to the Cart or Order.

                                                                                                                                                                                              * @param state value to be set */ @@ -98,7 +98,7 @@ public static DiscountCodeInfo deepCopy(@Nullable final DiscountCodeInfo templat } DiscountCodeInfoImpl instance = new DiscountCodeInfoImpl(); instance.setDiscountCode( - com.commercetools.history.models.common.Reference.deepCopy(template.getDiscountCode())); + com.commercetools.history.models.common.DiscountCodeReference.deepCopy(template.getDiscountCode())); instance.setState(template.getState()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoBuilder.java index 614ea28f6f4..cafc66e8da0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoBuilder.java @@ -23,47 +23,49 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountCodeInfoBuilder implements Builder { - private com.commercetools.history.models.common.Reference discountCode; + private com.commercetools.history.models.common.DiscountCodeReference discountCode; private com.commercetools.history.models.common.DiscountCodeState state; /** - * set the value to the discountCode using the builder function + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the discountCode value * @return Builder */ public DiscountCodeInfoBuilder discountCode( - Function builder) { - this.discountCode = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.discountCode = builder.apply(com.commercetools.history.models.common.DiscountCodeReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the discountCode using the builder function + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the discountCode value * @return Builder */ public DiscountCodeInfoBuilder withDiscountCode( - Function builder) { - this.discountCode = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.discountCode = builder.apply(com.commercetools.history.models.common.DiscountCodeReferenceBuilder.of()); return this; } /** - * set the value to the discountCode + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @param discountCode value to be set * @return Builder */ - public DiscountCodeInfoBuilder discountCode(final com.commercetools.history.models.common.Reference discountCode) { + public DiscountCodeInfoBuilder discountCode( + final com.commercetools.history.models.common.DiscountCodeReference discountCode) { this.discountCode = discountCode; return this; } /** - * set the value to the state + *

                                                                                                                                                                                              Indicates the state of the Discount Code applied to the Cart or Order.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ @@ -74,16 +76,16 @@ public DiscountCodeInfoBuilder state(final com.commercetools.history.models.comm } /** - * value of discountCode} + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              * @return discountCode */ - public com.commercetools.history.models.common.Reference getDiscountCode() { + public com.commercetools.history.models.common.DiscountCodeReference getDiscountCode() { return this.discountCode; } /** - * value of state} + *

                                                                                                                                                                                              Indicates the state of the Discount Code applied to the Cart or Order.

                                                                                                                                                                                              * @return state */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoImpl.java index c910c83bf5c..aab5f79245f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeInfoImpl.java @@ -22,7 +22,7 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountCodeInfoImpl implements DiscountCodeInfo, ModelBase { - private com.commercetools.history.models.common.Reference discountCode; + private com.commercetools.history.models.common.DiscountCodeReference discountCode; private com.commercetools.history.models.common.DiscountCodeState state; @@ -31,7 +31,7 @@ public class DiscountCodeInfoImpl implements DiscountCodeInfo, ModelBase { */ @JsonCreator DiscountCodeInfoImpl( - @JsonProperty("discountCode") final com.commercetools.history.models.common.Reference discountCode, + @JsonProperty("discountCode") final com.commercetools.history.models.common.DiscountCodeReference discountCode, @JsonProperty("state") final com.commercetools.history.models.common.DiscountCodeState state) { this.discountCode = discountCode; this.state = state; @@ -44,22 +44,22 @@ public DiscountCodeInfoImpl() { } /** - * + *

                                                                                                                                                                                              Discount Code associated with the Cart or Order.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getDiscountCode() { + public com.commercetools.history.models.common.DiscountCodeReference getDiscountCode() { return this.discountCode; } /** - * + *

                                                                                                                                                                                              Indicates the state of the Discount Code applied to the Cart or Order.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.DiscountCodeState getState() { return this.state; } - public void setDiscountCode(final com.commercetools.history.models.common.Reference discountCode) { + public void setDiscountCode(final com.commercetools.history.models.common.DiscountCodeReference discountCode) { this.discountCode = discountCode; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReference.java new file mode 100644 index 00000000000..4a14b9d80db --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a DiscountCode.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountCodeReference discountCodeReference = DiscountCodeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("discount-code") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountCodeReferenceImpl.class) +public interface DiscountCodeReference extends Reference { + + /** + * discriminator value for DiscountCodeReference + */ + String DISCOUNT_CODE = "discount-code"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced DiscountCode.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced DiscountCode.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of DiscountCodeReference + */ + public static DiscountCodeReference of() { + return new DiscountCodeReferenceImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeReference + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeReference of(final DiscountCodeReference template) { + DiscountCodeReferenceImpl instance = new DiscountCodeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public DiscountCodeReference copyDeep(); + + /** + * factory method to create a deep copy of DiscountCodeReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeReference deepCopy(@Nullable final DiscountCodeReference template) { + if (template == null) { + return null; + } + DiscountCodeReferenceImpl instance = new DiscountCodeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for DiscountCodeReference + * @return builder + */ + public static DiscountCodeReferenceBuilder builder() { + return DiscountCodeReferenceBuilder.of(); + } + + /** + * create builder for DiscountCodeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeReferenceBuilder builder(final DiscountCodeReference template) { + return DiscountCodeReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountCodeReference(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/DiscountCodeReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceBuilder.java new file mode 100644 index 00000000000..9834da47c68 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountCodeReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountCodeReference discountCodeReference = DiscountCodeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced DiscountCode.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public DiscountCodeReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced DiscountCode.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds DiscountCodeReference with checking for non-null required values + * @return DiscountCodeReference + */ + public DiscountCodeReference build() { + Objects.requireNonNull(id, DiscountCodeReference.class + ": id is missing"); + return new DiscountCodeReferenceImpl(id); + } + + /** + * builds DiscountCodeReference without checking for non-null required values + * @return DiscountCodeReference + */ + public DiscountCodeReference buildUnchecked() { + return new DiscountCodeReferenceImpl(id); + } + + /** + * factory method for an instance of DiscountCodeReferenceBuilder + * @return builder + */ + public static DiscountCodeReferenceBuilder of() { + return new DiscountCodeReferenceBuilder(); + } + + /** + * create builder for DiscountCodeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeReferenceBuilder of(final DiscountCodeReference template) { + DiscountCodeReferenceBuilder builder = new DiscountCodeReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceImpl.java new file mode 100644 index 00000000000..b84990d3459 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a DiscountCode.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeReferenceImpl implements DiscountCodeReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("discount-code"); + } + + /** + * create empty instance + */ + public DiscountCodeReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("discount-code"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced DiscountCode.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeReferenceImpl that = (DiscountCodeReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public DiscountCodeReference copyDeep() { + return DiscountCodeReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeState.java index 2cfb7846f5f..f8b6e0f4dfd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountCodeState.java @@ -11,13 +11,17 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * DiscountCodeState + *

                                                                                                                                                                                              Indicates the state of a Discount Code in a Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If an Order is created from a Cart with a state other than MatchesCart or ApplicationStoppedByGroupBestDeal, a DiscountCodeNonApplicable error is returned.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For Orders created from a Cart with a ApplicationStoppedByGroupBestDeal state, the discount code is not applied.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface DiscountCodeState extends JsonEnum { DiscountCodeState NOT_ACTIVE = DiscountCodeStateEnum.NOT_ACTIVE; + DiscountCodeState NOT_VALID = DiscountCodeStateEnum.NOT_VALID; + DiscountCodeState DOES_NOT_MATCH_CART = DiscountCodeStateEnum.DOES_NOT_MATCH_CART; DiscountCodeState MATCHES_CART = DiscountCodeStateEnum.MATCHES_CART; @@ -28,8 +32,6 @@ public interface DiscountCodeState extends JsonEnum { DiscountCodeState APPLICATION_STOPPED_BY_GROUP_BEST_DEAL = DiscountCodeStateEnum.APPLICATION_STOPPED_BY_GROUP_BEST_DEAL; - DiscountCodeState NOT_VALID = DiscountCodeStateEnum.NOT_VALID; - /** * possible values of DiscountCodeState */ @@ -39,6 +41,11 @@ enum DiscountCodeStateEnum implements DiscountCodeState { */ NOT_ACTIVE("NotActive"), + /** + * NotValid + */ + NOT_VALID("NotValid"), + /** * DoesNotMatchCart */ @@ -62,12 +69,7 @@ enum DiscountCodeStateEnum implements DiscountCodeState { /** * ApplicationStoppedByGroupBestDeal */ - APPLICATION_STOPPED_BY_GROUP_BEST_DEAL("ApplicationStoppedByGroupBestDeal"), - - /** - * NotValid - */ - NOT_VALID("NotValid"); + APPLICATION_STOPPED_BY_GROUP_BEST_DEAL("ApplicationStoppedByGroupBestDeal"); private final String jsonName; private DiscountCodeStateEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPrice.java new file mode 100644 index 00000000000..2b1e858798a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPrice.java @@ -0,0 +1,199 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * DiscountOnTotalPrice + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountOnTotalPrice discountOnTotalPrice = DiscountOnTotalPrice.builder()
                                                                                                                                                                                              + *             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
                                                                                                                                                                                              + *             .plusIncludedDiscounts(includedDiscountsBuilder -> includedDiscountsBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountOnTotalPriceImpl.class) +public interface DiscountOnTotalPrice { + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + * @return discountedAmount + */ + @NotNull + @Valid + @JsonProperty("discountedAmount") + public TypedMoney getDiscountedAmount(); + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @return includedDiscounts + */ + @NotNull + @Valid + @JsonProperty("includedDiscounts") + public List getIncludedDiscounts(); + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @return discountedNetAmount + */ + @Valid + @JsonProperty("discountedNetAmount") + public TypedMoney getDiscountedNetAmount(); + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @return discountedGrossAmount + */ + @Valid + @JsonProperty("discountedGrossAmount") + public TypedMoney getDiscountedGrossAmount(); + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + * @param discountedAmount value to be set + */ + + public void setDiscountedAmount(final TypedMoney discountedAmount); + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param includedDiscounts values to be set + */ + + @JsonIgnore + public void setIncludedDiscounts(final DiscountedTotalPricePortion... includedDiscounts); + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param includedDiscounts values to be set + */ + + public void setIncludedDiscounts(final List includedDiscounts); + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param discountedNetAmount value to be set + */ + + public void setDiscountedNetAmount(final TypedMoney discountedNetAmount); + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param discountedGrossAmount value to be set + */ + + public void setDiscountedGrossAmount(final TypedMoney discountedGrossAmount); + + /** + * factory method + * @return instance of DiscountOnTotalPrice + */ + public static DiscountOnTotalPrice of() { + return new DiscountOnTotalPriceImpl(); + } + + /** + * factory method to create a shallow copy DiscountOnTotalPrice + * @param template instance to be copied + * @return copy instance + */ + public static DiscountOnTotalPrice of(final DiscountOnTotalPrice template) { + DiscountOnTotalPriceImpl instance = new DiscountOnTotalPriceImpl(); + instance.setDiscountedAmount(template.getDiscountedAmount()); + instance.setIncludedDiscounts(template.getIncludedDiscounts()); + instance.setDiscountedNetAmount(template.getDiscountedNetAmount()); + instance.setDiscountedGrossAmount(template.getDiscountedGrossAmount()); + return instance; + } + + public DiscountOnTotalPrice copyDeep(); + + /** + * factory method to create a deep copy of DiscountOnTotalPrice + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountOnTotalPrice deepCopy(@Nullable final DiscountOnTotalPrice template) { + if (template == null) { + return null; + } + DiscountOnTotalPriceImpl instance = new DiscountOnTotalPriceImpl(); + instance.setDiscountedAmount( + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getDiscountedAmount())); + instance.setIncludedDiscounts(Optional.ofNullable(template.getIncludedDiscounts()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.DiscountedTotalPricePortion::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setDiscountedNetAmount( + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getDiscountedNetAmount())); + instance.setDiscountedGrossAmount( + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getDiscountedGrossAmount())); + return instance; + } + + /** + * builder factory method for DiscountOnTotalPrice + * @return builder + */ + public static DiscountOnTotalPriceBuilder builder() { + return DiscountOnTotalPriceBuilder.of(); + } + + /** + * create builder for DiscountOnTotalPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountOnTotalPriceBuilder builder(final DiscountOnTotalPrice template) { + return DiscountOnTotalPriceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountOnTotalPrice(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/DiscountOnTotalPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceBuilder.java new file mode 100644 index 00000000000..6ccf050438b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceBuilder.java @@ -0,0 +1,291 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountOnTotalPriceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountOnTotalPrice discountOnTotalPrice = DiscountOnTotalPrice.builder()
                                                                                                                                                                                              + *             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
                                                                                                                                                                                              + *             .plusIncludedDiscounts(includedDiscountsBuilder -> includedDiscountsBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountOnTotalPriceBuilder implements Builder { + + private com.commercetools.history.models.common.TypedMoney discountedAmount; + + private java.util.List includedDiscounts; + + @Nullable + private com.commercetools.history.models.common.TypedMoney discountedNetAmount; + + @Nullable + private com.commercetools.history.models.common.TypedMoney discountedGrossAmount; + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + * @param discountedAmount value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedAmount( + final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discountedAmount = discountedAmount; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + * @param builder function to build the discountedAmount value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedAmount( + Function> builder) { + this.discountedAmount = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param includedDiscounts value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder includedDiscounts( + final com.commercetools.history.models.common.DiscountedTotalPricePortion... includedDiscounts) { + this.includedDiscounts = new ArrayList<>(Arrays.asList(includedDiscounts)); + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param includedDiscounts value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder includedDiscounts( + final java.util.List includedDiscounts) { + this.includedDiscounts = includedDiscounts; + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param includedDiscounts value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder plusIncludedDiscounts( + final com.commercetools.history.models.common.DiscountedTotalPricePortion... includedDiscounts) { + if (this.includedDiscounts == null) { + this.includedDiscounts = new ArrayList<>(); + } + this.includedDiscounts.addAll(Arrays.asList(includedDiscounts)); + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param builder function to build the includedDiscounts value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder plusIncludedDiscounts( + Function builder) { + if (this.includedDiscounts == null) { + this.includedDiscounts = new ArrayList<>(); + } + this.includedDiscounts.add( + builder.apply(com.commercetools.history.models.common.DiscountedTotalPricePortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param builder function to build the includedDiscounts value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder withIncludedDiscounts( + Function builder) { + this.includedDiscounts = new ArrayList<>(); + this.includedDiscounts.add( + builder.apply(com.commercetools.history.models.common.DiscountedTotalPricePortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param builder function to build the includedDiscounts value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder addIncludedDiscounts( + Function builder) { + return plusIncludedDiscounts( + builder.apply(com.commercetools.history.models.common.DiscountedTotalPricePortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @param builder function to build the includedDiscounts value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder setIncludedDiscounts( + Function builder) { + return includedDiscounts( + builder.apply(com.commercetools.history.models.common.DiscountedTotalPricePortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param discountedNetAmount value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedNetAmount( + @Nullable final com.commercetools.history.models.common.TypedMoney discountedNetAmount) { + this.discountedNetAmount = discountedNetAmount; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param builder function to build the discountedNetAmount value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedNetAmount( + Function> builder) { + this.discountedNetAmount = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param discountedGrossAmount value to be set + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedGrossAmount( + @Nullable final com.commercetools.history.models.common.TypedMoney discountedGrossAmount) { + this.discountedGrossAmount = discountedGrossAmount; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @param builder function to build the discountedGrossAmount value + * @return Builder + */ + + public DiscountOnTotalPriceBuilder discountedGrossAmount( + Function> builder) { + this.discountedGrossAmount = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + * @return discountedAmount + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { + return this.discountedAmount; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + * @return includedDiscounts + */ + + public java.util.List getIncludedDiscounts() { + return this.includedDiscounts; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @return discountedNetAmount + */ + + @Nullable + public com.commercetools.history.models.common.TypedMoney getDiscountedNetAmount() { + return this.discountedNetAmount; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + * @return discountedGrossAmount + */ + + @Nullable + public com.commercetools.history.models.common.TypedMoney getDiscountedGrossAmount() { + return this.discountedGrossAmount; + } + + /** + * builds DiscountOnTotalPrice with checking for non-null required values + * @return DiscountOnTotalPrice + */ + public DiscountOnTotalPrice build() { + Objects.requireNonNull(discountedAmount, DiscountOnTotalPrice.class + ": discountedAmount is missing"); + Objects.requireNonNull(includedDiscounts, DiscountOnTotalPrice.class + ": includedDiscounts is missing"); + return new DiscountOnTotalPriceImpl(discountedAmount, includedDiscounts, discountedNetAmount, + discountedGrossAmount); + } + + /** + * builds DiscountOnTotalPrice without checking for non-null required values + * @return DiscountOnTotalPrice + */ + public DiscountOnTotalPrice buildUnchecked() { + return new DiscountOnTotalPriceImpl(discountedAmount, includedDiscounts, discountedNetAmount, + discountedGrossAmount); + } + + /** + * factory method for an instance of DiscountOnTotalPriceBuilder + * @return builder + */ + public static DiscountOnTotalPriceBuilder of() { + return new DiscountOnTotalPriceBuilder(); + } + + /** + * create builder for DiscountOnTotalPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountOnTotalPriceBuilder of(final DiscountOnTotalPrice template) { + DiscountOnTotalPriceBuilder builder = new DiscountOnTotalPriceBuilder(); + builder.discountedAmount = template.getDiscountedAmount(); + builder.includedDiscounts = template.getIncludedDiscounts(); + builder.discountedNetAmount = template.getDiscountedNetAmount(); + builder.discountedGrossAmount = template.getDiscountedGrossAmount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceImpl.java new file mode 100644 index 00000000000..3676bb70a3a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceImpl.java @@ -0,0 +1,154 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * DiscountOnTotalPrice + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountOnTotalPriceImpl implements DiscountOnTotalPrice, ModelBase { + + private com.commercetools.history.models.common.TypedMoney discountedAmount; + + private java.util.List includedDiscounts; + + private com.commercetools.history.models.common.TypedMoney discountedNetAmount; + + private com.commercetools.history.models.common.TypedMoney discountedGrossAmount; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountOnTotalPriceImpl( + @JsonProperty("discountedAmount") final com.commercetools.history.models.common.TypedMoney discountedAmount, + @JsonProperty("includedDiscounts") final java.util.List includedDiscounts, + @JsonProperty("discountedNetAmount") final com.commercetools.history.models.common.TypedMoney discountedNetAmount, + @JsonProperty("discountedGrossAmount") final com.commercetools.history.models.common.TypedMoney discountedGrossAmount) { + this.discountedAmount = discountedAmount; + this.includedDiscounts = includedDiscounts; + this.discountedNetAmount = discountedNetAmount; + this.discountedGrossAmount = discountedGrossAmount; + } + + /** + * create empty instance + */ + public DiscountOnTotalPriceImpl() { + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total price of the Cart or Order.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { + return this.discountedAmount; + } + + /** + *

                                                                                                                                                                                              Discounts that impact the total price of the Cart or Order.

                                                                                                                                                                                              + */ + + public java.util.List getIncludedDiscounts() { + return this.includedDiscounts; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total net price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedNetAmount() { + return this.discountedNetAmount; + } + + /** + *

                                                                                                                                                                                              Money value of the discount on the total gross price of the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The same percentage of discount applies as on the discountedAmount. Present only when taxedPrice of the Cart or Order exists.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedGrossAmount() { + return this.discountedGrossAmount; + } + + public void setDiscountedAmount(final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discountedAmount = discountedAmount; + } + + public void setIncludedDiscounts( + final com.commercetools.history.models.common.DiscountedTotalPricePortion... includedDiscounts) { + this.includedDiscounts = new ArrayList<>(Arrays.asList(includedDiscounts)); + } + + public void setIncludedDiscounts( + final java.util.List includedDiscounts) { + this.includedDiscounts = includedDiscounts; + } + + public void setDiscountedNetAmount(final com.commercetools.history.models.common.TypedMoney discountedNetAmount) { + this.discountedNetAmount = discountedNetAmount; + } + + public void setDiscountedGrossAmount( + final com.commercetools.history.models.common.TypedMoney discountedGrossAmount) { + this.discountedGrossAmount = discountedGrossAmount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountOnTotalPriceImpl that = (DiscountOnTotalPriceImpl) o; + + return new EqualsBuilder().append(discountedAmount, that.discountedAmount) + .append(includedDiscounts, that.includedDiscounts) + .append(discountedNetAmount, that.discountedNetAmount) + .append(discountedGrossAmount, that.discountedGrossAmount) + .append(discountedAmount, that.discountedAmount) + .append(includedDiscounts, that.includedDiscounts) + .append(discountedNetAmount, that.discountedNetAmount) + .append(discountedGrossAmount, that.discountedGrossAmount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(discountedAmount) + .append(includedDiscounts) + .append(discountedNetAmount) + .append(discountedGrossAmount) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("discountedAmount", discountedAmount) + .append("includedDiscounts", includedDiscounts) + .append("discountedNetAmount", discountedNetAmount) + .append("discountedGrossAmount", discountedGrossAmount) + .build(); + } + + @Override + public DiscountOnTotalPrice copyDeep() { + return DiscountOnTotalPrice.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortion.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortion.java index 1700de3275d..cf9a4917a5b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortion.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortion.java @@ -34,7 +34,7 @@ public interface DiscountedLineItemPortion { /** - * + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              * @return discount */ @NotNull @@ -43,27 +43,27 @@ public interface DiscountedLineItemPortion { public Reference getDiscount(); /** - * + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              * @return discountedAmount */ @NotNull @Valid @JsonProperty("discountedAmount") - public Money getDiscountedAmount(); + public TypedMoney getDiscountedAmount(); /** - * set discount + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              * @param discount value to be set */ public void setDiscount(final Reference discount); /** - * set discountedAmount + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              * @param discountedAmount value to be set */ - public void setDiscountedAmount(final Money discountedAmount); + public void setDiscountedAmount(final TypedMoney discountedAmount); /** * factory method @@ -100,7 +100,7 @@ public static DiscountedLineItemPortion deepCopy(@Nullable final DiscountedLineI DiscountedLineItemPortionImpl instance = new DiscountedLineItemPortionImpl(); instance.setDiscount(com.commercetools.history.models.common.Reference.deepCopy(template.getDiscount())); instance.setDiscountedAmount( - com.commercetools.history.models.common.Money.deepCopy(template.getDiscountedAmount())); + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getDiscountedAmount())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionBuilder.java index c01a30dbfa0..0299ffac74c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionBuilder.java @@ -25,34 +25,10 @@ public class DiscountedLineItemPortionBuilder implements Builder builder) { - this.discount = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); - return this; - } - - /** - * set the value to the discount using the builder function - * @param builder function to build the discount value - * @return Builder - */ - - public DiscountedLineItemPortionBuilder withDiscount( - Function builder) { - this.discount = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - * set the value to the discount + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              * @param discount value to be set * @return Builder */ @@ -63,43 +39,43 @@ public DiscountedLineItemPortionBuilder discount(final com.commercetools.history } /** - * set the value to the discountedAmount using the builder function - * @param builder function to build the discountedAmount value + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              + * @param builder function to build the discount value * @return Builder */ - public DiscountedLineItemPortionBuilder discountedAmount( - Function builder) { - this.discountedAmount = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + public DiscountedLineItemPortionBuilder discount( + Function> builder) { + this.discount = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - * set the value to the discountedAmount using the builder function - * @param builder function to build the discountedAmount value + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              + * @param discountedAmount value to be set * @return Builder */ - public DiscountedLineItemPortionBuilder withDiscountedAmount( - Function builder) { - this.discountedAmount = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + public DiscountedLineItemPortionBuilder discountedAmount( + final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discountedAmount = discountedAmount; return this; } /** - * set the value to the discountedAmount - * @param discountedAmount value to be set + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              + * @param builder function to build the discountedAmount value * @return Builder */ public DiscountedLineItemPortionBuilder discountedAmount( - final com.commercetools.history.models.common.Money discountedAmount) { - this.discountedAmount = discountedAmount; + Function> builder) { + this.discountedAmount = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); return this; } /** - * value of discount} + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              * @return discount */ @@ -108,11 +84,11 @@ public com.commercetools.history.models.common.Reference getDiscount() { } /** - * value of discountedAmount} + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              * @return discountedAmount */ - public com.commercetools.history.models.common.Money getDiscountedAmount() { + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { return this.discountedAmount; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionImpl.java index ec48f178648..1d075ebf5af 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionImpl.java @@ -24,7 +24,7 @@ public class DiscountedLineItemPortionImpl implements DiscountedLineItemPortion, private com.commercetools.history.models.common.Reference discount; - private com.commercetools.history.models.common.Money discountedAmount; + private com.commercetools.history.models.common.TypedMoney discountedAmount; /** * create instance with all properties @@ -32,7 +32,7 @@ public class DiscountedLineItemPortionImpl implements DiscountedLineItemPortion, @JsonCreator DiscountedLineItemPortionImpl( @JsonProperty("discount") final com.commercetools.history.models.common.Reference discount, - @JsonProperty("discountedAmount") final com.commercetools.history.models.common.Money discountedAmount) { + @JsonProperty("discountedAmount") final com.commercetools.history.models.common.TypedMoney discountedAmount) { this.discount = discount; this.discountedAmount = discountedAmount; } @@ -44,7 +44,7 @@ public DiscountedLineItemPortionImpl() { } /** - * + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference of the applicable discount on the Line Item.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.Reference getDiscount() { @@ -52,10 +52,10 @@ public com.commercetools.history.models.common.Reference getDiscount() { } /** - * + *

                                                                                                                                                                                              Money value of the applicable discount.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getDiscountedAmount() { + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { return this.discountedAmount; } @@ -63,7 +63,7 @@ public void setDiscount(final com.commercetools.history.models.common.Reference this.discount = discount; } - public void setDiscountedAmount(final com.commercetools.history.models.common.Money discountedAmount) { + public void setDiscountedAmount(final com.commercetools.history.models.common.TypedMoney discountedAmount) { this.discountedAmount = discountedAmount; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPrice.java index a4dac2f6317..9a16564268d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPrice.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPrice.java @@ -35,16 +35,16 @@ public interface DiscountedLineItemPrice { /** - * + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              * @return value */ @NotNull @Valid @JsonProperty("value") - public Money getValue(); + public TypedMoney getValue(); /** - * + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return includedDiscounts */ @NotNull @@ -53,14 +53,14 @@ public interface DiscountedLineItemPrice { public List getIncludedDiscounts(); /** - * set value + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              * @param value value to be set */ - public void setValue(final Money value); + public void setValue(final TypedMoney value); /** - * set includedDiscounts + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param includedDiscounts values to be set */ @@ -68,7 +68,7 @@ public interface DiscountedLineItemPrice { public void setIncludedDiscounts(final DiscountedLineItemPortion... includedDiscounts); /** - * set includedDiscounts + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param includedDiscounts values to be set */ @@ -107,7 +107,7 @@ public static DiscountedLineItemPrice deepCopy(@Nullable final DiscountedLineIte return null; } DiscountedLineItemPriceImpl instance = new DiscountedLineItemPriceImpl(); - instance.setValue(com.commercetools.history.models.common.Money.deepCopy(template.getValue())); + instance.setValue(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getValue())); instance.setIncludedDiscounts(Optional.ofNullable(template.getIncludedDiscounts()) .map(t -> t.stream() .map(com.commercetools.history.models.common.DiscountedLineItemPortion::deepCopy) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceBuilder.java index 1631c92504a..7b51f517709 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceBuilder.java @@ -23,47 +23,35 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountedLineItemPriceBuilder implements Builder { - private com.commercetools.history.models.common.Money value; + private com.commercetools.history.models.common.TypedMoney value; private java.util.List includedDiscounts; /** - * set the value to the value using the builder function - * @param builder function to build the value value + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              + * @param value value to be set * @return Builder */ - public DiscountedLineItemPriceBuilder value( - Function builder) { - this.value = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + public DiscountedLineItemPriceBuilder value(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; return this; } /** - * set the value to the value using the builder function + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the value value * @return Builder */ - public DiscountedLineItemPriceBuilder withValue( - Function builder) { - this.value = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); - return this; - } - - /** - * set the value to the value - * @param value value to be set - * @return Builder - */ - - public DiscountedLineItemPriceBuilder value(final com.commercetools.history.models.common.Money value) { - this.value = value; + public DiscountedLineItemPriceBuilder value( + Function> builder) { + this.value = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); return this; } /** - * set values to the includedDiscounts + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param includedDiscounts value to be set * @return Builder */ @@ -75,7 +63,7 @@ public DiscountedLineItemPriceBuilder includedDiscounts( } /** - * set value to the includedDiscounts + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param includedDiscounts value to be set * @return Builder */ @@ -87,7 +75,7 @@ public DiscountedLineItemPriceBuilder includedDiscounts( } /** - * add values to the includedDiscounts + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param includedDiscounts value to be set * @return Builder */ @@ -102,7 +90,7 @@ public DiscountedLineItemPriceBuilder plusIncludedDiscounts( } /** - * add the value to the includedDiscounts using the builder function + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the includedDiscounts value * @return Builder */ @@ -118,7 +106,7 @@ public DiscountedLineItemPriceBuilder plusIncludedDiscounts( } /** - * set the value to the includedDiscounts using the builder function + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the includedDiscounts value * @return Builder */ @@ -132,7 +120,7 @@ public DiscountedLineItemPriceBuilder withIncludedDiscounts( } /** - * add the value to the includedDiscounts using the builder function + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the includedDiscounts value * @return Builder */ @@ -144,7 +132,7 @@ public DiscountedLineItemPriceBuilder addIncludedDiscounts( } /** - * set the value to the includedDiscounts using the builder function + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the includedDiscounts value * @return Builder */ @@ -156,16 +144,16 @@ public DiscountedLineItemPriceBuilder setIncludedDiscounts( } /** - * value of value} + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              * @return value */ - public com.commercetools.history.models.common.Money getValue() { + public com.commercetools.history.models.common.TypedMoney getValue() { return this.value; } /** - * value of includedDiscounts} + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return includedDiscounts */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantity.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantity.java index e54b01a3517..b033d96c942 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantity.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantity.java @@ -23,7 +23,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     DiscountedLineItemPriceForQuantity discountedLineItemPriceForQuantity = DiscountedLineItemPriceForQuantity.builder()
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .discountedPrice(discountedPriceBuilder -> discountedPriceBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -34,15 +34,15 @@ public interface DiscountedLineItemPriceForQuantity { /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in the Cart.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - * + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return discountedPrice */ @NotNull @@ -51,14 +51,14 @@ public interface DiscountedLineItemPriceForQuantity { public DiscountedLineItemPrice getDiscountedPrice(); /** - * set quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in the Cart.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** - * set discountedPrice + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param discountedPrice value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityBuilder.java index f4d45bf06ec..02059e85061 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityBuilder.java @@ -14,7 +14,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     DiscountedLineItemPriceForQuantity discountedLineItemPriceForQuantity = DiscountedLineItemPriceForQuantity.builder()
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .discountedPrice(discountedPriceBuilder -> discountedPriceBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -23,23 +23,23 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountedLineItemPriceForQuantityBuilder implements Builder { - private Integer quantity; + private Long quantity; private com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice; /** - * set the value to the quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in the Cart.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public DiscountedLineItemPriceForQuantityBuilder quantity(final Integer quantity) { + public DiscountedLineItemPriceForQuantityBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - * set the value to the discountedPrice using the builder function + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the discountedPrice value * @return Builder */ @@ -53,7 +53,7 @@ public DiscountedLineItemPriceForQuantityBuilder discountedPrice( } /** - * set the value to the discountedPrice using the builder function + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the discountedPrice value * @return Builder */ @@ -66,7 +66,7 @@ public DiscountedLineItemPriceForQuantityBuilder withDiscountedPrice( } /** - * set the value to the discountedPrice + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param discountedPrice value to be set * @return Builder */ @@ -78,16 +78,16 @@ public DiscountedLineItemPriceForQuantityBuilder discountedPrice( } /** - * value of quantity} + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in the Cart.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } /** - * value of discountedPrice} + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return discountedPrice */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityImpl.java index 69fbfa9db8b..32ed72655a5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityImpl.java @@ -22,7 +22,7 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountedLineItemPriceForQuantityImpl implements DiscountedLineItemPriceForQuantity, ModelBase { - private Integer quantity; + private Long quantity; private com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice; @@ -30,7 +30,7 @@ public class DiscountedLineItemPriceForQuantityImpl implements DiscountedLineIte * create instance with all properties */ @JsonCreator - DiscountedLineItemPriceForQuantityImpl(@JsonProperty("quantity") final Integer quantity, + DiscountedLineItemPriceForQuantityImpl(@JsonProperty("quantity") final Long quantity, @JsonProperty("discountedPrice") final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice) { this.quantity = quantity; this.discountedPrice = discountedPrice; @@ -43,22 +43,22 @@ public DiscountedLineItemPriceForQuantityImpl() { } /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in the Cart.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } /** - * + *

                                                                                                                                                                                              Discounted price of the Line Item or Custom Line Item.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.DiscountedLineItemPrice getDiscountedPrice() { return this.discountedPrice; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceImpl.java index a50fa817b95..ff8ecc50828 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceImpl.java @@ -22,7 +22,7 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountedLineItemPriceImpl implements DiscountedLineItemPrice, ModelBase { - private com.commercetools.history.models.common.Money value; + private com.commercetools.history.models.common.TypedMoney value; private java.util.List includedDiscounts; @@ -30,7 +30,7 @@ public class DiscountedLineItemPriceImpl implements DiscountedLineItemPrice, Mod * create instance with all properties */ @JsonCreator - DiscountedLineItemPriceImpl(@JsonProperty("value") final com.commercetools.history.models.common.Money value, + DiscountedLineItemPriceImpl(@JsonProperty("value") final com.commercetools.history.models.common.TypedMoney value, @JsonProperty("includedDiscounts") final java.util.List includedDiscounts) { this.value = value; this.includedDiscounts = includedDiscounts; @@ -43,22 +43,22 @@ public DiscountedLineItemPriceImpl() { } /** - * + *

                                                                                                                                                                                              Money value of the discounted Line Item or Custom Line Item.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getValue() { + public com.commercetools.history.models.common.TypedMoney getValue() { return this.value; } /** - * + *

                                                                                                                                                                                              Discount applicable on the Line Item or Custom Line Item.

                                                                                                                                                                                              */ public java.util.List getIncludedDiscounts() { return this.includedDiscounts; } - public void setValue(final com.commercetools.history.models.common.Money value) { + public void setValue(final com.commercetools.history.models.common.TypedMoney value) { this.value = value; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPrice.java new file mode 100644 index 00000000000..c77c9c1dd0b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPrice.java @@ -0,0 +1,146 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * DiscountedPrice + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountedPrice discountedPrice = DiscountedPrice.builder()
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .discount(discountBuilder -> discountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountedPriceImpl.class) +public interface DiscountedPrice { + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + * @return value + */ + @NotNull + @Valid + @JsonProperty("value") + public TypedMoney getValue(); + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @return discount + */ + @NotNull + @Valid + @JsonProperty("discount") + public ProductDiscountReference getDiscount(); + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + * @param value value to be set + */ + + public void setValue(final TypedMoney value); + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @param discount value to be set + */ + + public void setDiscount(final ProductDiscountReference discount); + + /** + * factory method + * @return instance of DiscountedPrice + */ + public static DiscountedPrice of() { + return new DiscountedPriceImpl(); + } + + /** + * factory method to create a shallow copy DiscountedPrice + * @param template instance to be copied + * @return copy instance + */ + public static DiscountedPrice of(final DiscountedPrice template) { + DiscountedPriceImpl instance = new DiscountedPriceImpl(); + instance.setValue(template.getValue()); + instance.setDiscount(template.getDiscount()); + return instance; + } + + public DiscountedPrice copyDeep(); + + /** + * factory method to create a deep copy of DiscountedPrice + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountedPrice deepCopy(@Nullable final DiscountedPrice template) { + if (template == null) { + return null; + } + DiscountedPriceImpl instance = new DiscountedPriceImpl(); + instance.setValue(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getValue())); + instance.setDiscount( + com.commercetools.history.models.common.ProductDiscountReference.deepCopy(template.getDiscount())); + return instance; + } + + /** + * builder factory method for DiscountedPrice + * @return builder + */ + public static DiscountedPriceBuilder builder() { + return DiscountedPriceBuilder.of(); + } + + /** + * create builder for DiscountedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountedPriceBuilder builder(final DiscountedPrice template) { + return DiscountedPriceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountedPrice(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/DiscountedPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPriceBuilder.java new file mode 100644 index 00000000000..2fcfd5ae3f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPriceBuilder.java @@ -0,0 +1,146 @@ + +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; + +/** + * DiscountedPriceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountedPrice discountedPrice = DiscountedPrice.builder()
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .discount(discountBuilder -> discountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountedPriceBuilder implements Builder { + + private com.commercetools.history.models.common.TypedMoney value; + + private com.commercetools.history.models.common.ProductDiscountReference discount; + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + * @param value value to be set + * @return Builder + */ + + public DiscountedPriceBuilder value(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + * @param builder function to build the value value + * @return Builder + */ + + public DiscountedPriceBuilder value( + Function> builder) { + this.value = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @param builder function to build the discount value + * @return Builder + */ + + public DiscountedPriceBuilder discount( + Function builder) { + this.discount = builder.apply(com.commercetools.history.models.common.ProductDiscountReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @param builder function to build the discount value + * @return Builder + */ + + public DiscountedPriceBuilder withDiscount( + Function builder) { + this.discount = builder.apply(com.commercetools.history.models.common.ProductDiscountReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @param discount value to be set + * @return Builder + */ + + public DiscountedPriceBuilder discount( + final com.commercetools.history.models.common.ProductDiscountReference discount) { + this.discount = discount; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + * @return value + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + * @return discount + */ + + public com.commercetools.history.models.common.ProductDiscountReference getDiscount() { + return this.discount; + } + + /** + * builds DiscountedPrice with checking for non-null required values + * @return DiscountedPrice + */ + public DiscountedPrice build() { + Objects.requireNonNull(value, DiscountedPrice.class + ": value is missing"); + Objects.requireNonNull(discount, DiscountedPrice.class + ": discount is missing"); + return new DiscountedPriceImpl(value, discount); + } + + /** + * builds DiscountedPrice without checking for non-null required values + * @return DiscountedPrice + */ + public DiscountedPrice buildUnchecked() { + return new DiscountedPriceImpl(value, discount); + } + + /** + * factory method for an instance of DiscountedPriceBuilder + * @return builder + */ + public static DiscountedPriceBuilder of() { + return new DiscountedPriceBuilder(); + } + + /** + * create builder for DiscountedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountedPriceBuilder of(final DiscountedPrice template) { + DiscountedPriceBuilder builder = new DiscountedPriceBuilder(); + builder.value = template.getValue(); + builder.discount = template.getDiscount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPriceImpl.java new file mode 100644 index 00000000000..5b0ae8e2d2d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedPriceImpl.java @@ -0,0 +1,102 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * DiscountedPrice + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountedPriceImpl implements DiscountedPrice, ModelBase { + + private com.commercetools.history.models.common.TypedMoney value; + + private com.commercetools.history.models.common.ProductDiscountReference discount; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountedPriceImpl(@JsonProperty("value") final com.commercetools.history.models.common.TypedMoney value, + @JsonProperty("discount") final com.commercetools.history.models.common.ProductDiscountReference discount) { + this.value = value; + this.discount = discount; + } + + /** + * create empty instance + */ + public DiscountedPriceImpl() { + } + + /** + *

                                                                                                                                                                                              Money value of the discounted price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + /** + *

                                                                                                                                                                                              ProductDiscount related to the discounted price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductDiscountReference getDiscount() { + return this.discount; + } + + public void setValue(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + } + + public void setDiscount(final com.commercetools.history.models.common.ProductDiscountReference discount) { + this.discount = discount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountedPriceImpl that = (DiscountedPriceImpl) o; + + return new EqualsBuilder().append(value, that.value) + .append(discount, that.discount) + .append(value, that.value) + .append(discount, that.discount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(value).append(discount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("value", value) + .append("discount", discount) + .build(); + } + + @Override + public DiscountedPrice copyDeep() { + return DiscountedPrice.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortion.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortion.java new file mode 100644 index 00000000000..b06da4c2889 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortion.java @@ -0,0 +1,146 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * DiscountedTotalPricePortion + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountedTotalPricePortion discountedTotalPricePortion = DiscountedTotalPricePortion.builder()
                                                                                                                                                                                              + *             .discount(discountBuilder -> discountBuilder)
                                                                                                                                                                                              + *             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountedTotalPricePortionImpl.class) +public interface DiscountedTotalPricePortion { + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + * @return discount + */ + @NotNull + @Valid + @JsonProperty("discount") + public Reference getDiscount(); + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + * @return discountedAmount + */ + @NotNull + @Valid + @JsonProperty("discountedAmount") + public TypedMoney getDiscountedAmount(); + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + * @param discount value to be set + */ + + public void setDiscount(final Reference discount); + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + * @param discountedAmount value to be set + */ + + public void setDiscountedAmount(final TypedMoney discountedAmount); + + /** + * factory method + * @return instance of DiscountedTotalPricePortion + */ + public static DiscountedTotalPricePortion of() { + return new DiscountedTotalPricePortionImpl(); + } + + /** + * factory method to create a shallow copy DiscountedTotalPricePortion + * @param template instance to be copied + * @return copy instance + */ + public static DiscountedTotalPricePortion of(final DiscountedTotalPricePortion template) { + DiscountedTotalPricePortionImpl instance = new DiscountedTotalPricePortionImpl(); + instance.setDiscount(template.getDiscount()); + instance.setDiscountedAmount(template.getDiscountedAmount()); + return instance; + } + + public DiscountedTotalPricePortion copyDeep(); + + /** + * factory method to create a deep copy of DiscountedTotalPricePortion + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountedTotalPricePortion deepCopy(@Nullable final DiscountedTotalPricePortion template) { + if (template == null) { + return null; + } + DiscountedTotalPricePortionImpl instance = new DiscountedTotalPricePortionImpl(); + instance.setDiscount(com.commercetools.history.models.common.Reference.deepCopy(template.getDiscount())); + instance.setDiscountedAmount( + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getDiscountedAmount())); + return instance; + } + + /** + * builder factory method for DiscountedTotalPricePortion + * @return builder + */ + public static DiscountedTotalPricePortionBuilder builder() { + return DiscountedTotalPricePortionBuilder.of(); + } + + /** + * create builder for DiscountedTotalPricePortion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountedTotalPricePortionBuilder builder(final DiscountedTotalPricePortion template) { + return DiscountedTotalPricePortionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountedTotalPricePortion(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/DiscountedTotalPricePortionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionBuilder.java new file mode 100644 index 00000000000..2a16954e365 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionBuilder.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; + +/** + * DiscountedTotalPricePortionBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     DiscountedTotalPricePortion discountedTotalPricePortion = DiscountedTotalPricePortion.builder()
                                                                                                                                                                                              + *             .discount(discountBuilder -> discountBuilder)
                                                                                                                                                                                              + *             .discountedAmount(discountedAmountBuilder -> discountedAmountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountedTotalPricePortionBuilder implements Builder { + + private com.commercetools.history.models.common.Reference discount; + + private com.commercetools.history.models.common.TypedMoney discountedAmount; + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + * @param discount value to be set + * @return Builder + */ + + public DiscountedTotalPricePortionBuilder discount( + final com.commercetools.history.models.common.Reference discount) { + this.discount = discount; + return this; + } + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + * @param builder function to build the discount value + * @return Builder + */ + + public DiscountedTotalPricePortionBuilder discount( + Function> builder) { + this.discount = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + * @param discountedAmount value to be set + * @return Builder + */ + + public DiscountedTotalPricePortionBuilder discountedAmount( + final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discountedAmount = discountedAmount; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + * @param builder function to build the discountedAmount value + * @return Builder + */ + + public DiscountedTotalPricePortionBuilder discountedAmount( + Function> builder) { + this.discountedAmount = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + * @return discount + */ + + public com.commercetools.history.models.common.Reference getDiscount() { + return this.discount; + } + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + * @return discountedAmount + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { + return this.discountedAmount; + } + + /** + * builds DiscountedTotalPricePortion with checking for non-null required values + * @return DiscountedTotalPricePortion + */ + public DiscountedTotalPricePortion build() { + Objects.requireNonNull(discount, DiscountedTotalPricePortion.class + ": discount is missing"); + Objects.requireNonNull(discountedAmount, DiscountedTotalPricePortion.class + ": discountedAmount is missing"); + return new DiscountedTotalPricePortionImpl(discount, discountedAmount); + } + + /** + * builds DiscountedTotalPricePortion without checking for non-null required values + * @return DiscountedTotalPricePortion + */ + public DiscountedTotalPricePortion buildUnchecked() { + return new DiscountedTotalPricePortionImpl(discount, discountedAmount); + } + + /** + * factory method for an instance of DiscountedTotalPricePortionBuilder + * @return builder + */ + public static DiscountedTotalPricePortionBuilder of() { + return new DiscountedTotalPricePortionBuilder(); + } + + /** + * create builder for DiscountedTotalPricePortion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountedTotalPricePortionBuilder of(final DiscountedTotalPricePortion template) { + DiscountedTotalPricePortionBuilder builder = new DiscountedTotalPricePortionBuilder(); + builder.discount = template.getDiscount(); + builder.discountedAmount = template.getDiscountedAmount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionImpl.java new file mode 100644 index 00000000000..5e4a835cb40 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionImpl.java @@ -0,0 +1,103 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * DiscountedTotalPricePortion + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountedTotalPricePortionImpl implements DiscountedTotalPricePortion, ModelBase { + + private com.commercetools.history.models.common.Reference discount; + + private com.commercetools.history.models.common.TypedMoney discountedAmount; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountedTotalPricePortionImpl( + @JsonProperty("discount") final com.commercetools.history.models.common.Reference discount, + @JsonProperty("discountedAmount") final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discount = discount; + this.discountedAmount = discountedAmount; + } + + /** + * create empty instance + */ + public DiscountedTotalPricePortionImpl() { + } + + /** + *

                                                                                                                                                                                              A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart totalPrice.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.Reference getDiscount() { + return this.discount; + } + + /** + *

                                                                                                                                                                                              Money value of the discount.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getDiscountedAmount() { + return this.discountedAmount; + } + + public void setDiscount(final com.commercetools.history.models.common.Reference discount) { + this.discount = discount; + } + + public void setDiscountedAmount(final com.commercetools.history.models.common.TypedMoney discountedAmount) { + this.discountedAmount = discountedAmount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountedTotalPricePortionImpl that = (DiscountedTotalPricePortionImpl) o; + + return new EqualsBuilder().append(discount, that.discount) + .append(discountedAmount, that.discountedAmount) + .append(discount, that.discount) + .append(discountedAmount, that.discountedAmount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(discount).append(discountedAmount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("discount", discount) + .append("discountedAmount", discountedAmount) + .build(); + } + + @Override + public DiscountedTotalPricePortion copyDeep() { + return DiscountedTotalPricePortion.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainer.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainer.java new file mode 100644 index 00000000000..e58e0ab8c98 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainer.java @@ -0,0 +1,125 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * FieldContainer + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     FieldContainer fieldContainer = FieldContainer.builder()
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = FieldContainerImpl.class) +public interface FieldContainer { + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + * @return map of the pattern property values + */ + @NotNull + @JsonAnyGetter + public Map values(); + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + * @param key property name + * @param value property value + */ + + @JsonAnySetter + public void setValue(String key, Object value); + + /** + * factory method + * @return instance of FieldContainer + */ + public static FieldContainer of() { + return new FieldContainerImpl(); + } + + /** + * factory method to create a shallow copy FieldContainer + * @param template instance to be copied + * @return copy instance + */ + public static FieldContainer of(final FieldContainer template) { + FieldContainerImpl instance = new FieldContainerImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + public FieldContainer copyDeep(); + + /** + * factory method to create a deep copy of FieldContainer + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static FieldContainer deepCopy(@Nullable final FieldContainer template) { + if (template == null) { + return null; + } + FieldContainerImpl instance = new FieldContainerImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * builder factory method for FieldContainer + * @return builder + */ + public static FieldContainerBuilder builder() { + return FieldContainerBuilder.of(); + } + + /** + * create builder for FieldContainer instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static FieldContainerBuilder builder(final FieldContainer template) { + return FieldContainerBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withFieldContainer(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/FieldContainerBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainerBuilder.java new file mode 100644 index 00000000000..d528442b141 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainerBuilder.java @@ -0,0 +1,95 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * FieldContainerBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     FieldContainer fieldContainer = FieldContainer.builder()
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class FieldContainerBuilder implements Builder { + + private Map values = new HashMap<>(); + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + * @param values properties to be set + * @return Builder + */ + + public FieldContainerBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + * @param key property name + * @param value property value + * @return Builder + */ + + public FieldContainerBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + * builds FieldContainer with checking for non-null required values + * @return FieldContainer + */ + public FieldContainer build() { + return new FieldContainerImpl(values); + } + + /** + * builds FieldContainer without checking for non-null required values + * @return FieldContainer + */ + public FieldContainer buildUnchecked() { + return new FieldContainerImpl(values); + } + + /** + * factory method for an instance of FieldContainerBuilder + * @return builder + */ + public static FieldContainerBuilder of() { + return new FieldContainerBuilder(); + } + + /** + * create builder for FieldContainer instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static FieldContainerBuilder of(final FieldContainer template) { + FieldContainerBuilder builder = new FieldContainerBuilder(); + builder.values = template.values(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainerImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainerImpl.java new file mode 100644 index 00000000000..e32c9850daa --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldContainerImpl.java @@ -0,0 +1,84 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * FieldContainer + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class FieldContainerImpl implements FieldContainer, ModelBase { + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + FieldContainerImpl(@JsonAnySetter @JsonProperty("values") final Map values) { + this.values = values; + } + + /** + * create empty instance + */ + public FieldContainerImpl() { + } + + /** + *

                                                                                                                                                                                              JSON object with keys matching the names of Custom Fields (that is, names in the FieldDefinitions) and values given by CustomFieldValue.

                                                                                                                                                                                              + */ + + public Map values() { + return values; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + FieldContainerImpl that = (FieldContainerImpl) o; + + return new EqualsBuilder().append(values, that.values).append(values, that.values).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("values", values).build(); + } + + @Override + public FieldContainer copyDeep() { + return FieldContainer.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinition.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinition.java index edf9170822e..9f9ff454294 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinition.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinition.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - * FieldDefinition + *

                                                                                                                                                                                              Defines a Custom Field and its meta-information. This FieldDefinition is similar to an AttributeDefinition of Product Types.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -26,7 +26,7 @@ * .type(typeBuilder -> typeBuilder) * .name("{name}") * .label(labelBuilder -> labelBuilder) - * .inputHint(TextInputHint.SINGLE_LINE) + * .required(true) * .build() *
                                                                                                                                                                                              * @@ -36,7 +36,7 @@ public interface FieldDefinition { /** - * + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @return type */ @NotNull @@ -45,7 +45,7 @@ public interface FieldDefinition { public FieldType getType(); /** - *

                                                                                                                                                                                              The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

                                                                                                                                                                                              * @return name */ @NotNull @@ -53,7 +53,7 @@ public interface FieldDefinition { public String getName(); /** - * + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @return label */ @NotNull @@ -62,40 +62,55 @@ public interface FieldDefinition { public LocalizedString getLabel(); /** - * - * @return inputHint + *

                                                                                                                                                                                              Defines whether the field is required to have a value.

                                                                                                                                                                                              + * @return required */ @NotNull + @JsonProperty("required") + public Boolean getRequired(); + + /** + *

                                                                                                                                                                                              Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

                                                                                                                                                                                              + * @return inputHint + */ + @JsonProperty("inputHint") - public TextInputHint getInputHint(); + public TypeTextInputHint getInputHint(); /** - * set type + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @param type value to be set */ public void setType(final FieldType type); /** - *

                                                                                                                                                                                              The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

                                                                                                                                                                                              * @param name value to be set */ public void setName(final String name); /** - * set label + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @param label value to be set */ public void setLabel(final LocalizedString label); /** - * set inputHint + *

                                                                                                                                                                                              Defines whether the field is required to have a value.

                                                                                                                                                                                              + * @param required value to be set + */ + + public void setRequired(final Boolean required); + + /** + *

                                                                                                                                                                                              Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

                                                                                                                                                                                              * @param inputHint value to be set */ - public void setInputHint(final TextInputHint inputHint); + public void setInputHint(final TypeTextInputHint inputHint); /** * factory method @@ -115,6 +130,7 @@ public static FieldDefinition of(final FieldDefinition template) { instance.setType(template.getType()); instance.setName(template.getName()); instance.setLabel(template.getLabel()); + instance.setRequired(template.getRequired()); instance.setInputHint(template.getInputHint()); return instance; } @@ -135,6 +151,7 @@ public static FieldDefinition deepCopy(@Nullable final FieldDefinition template) instance.setType(com.commercetools.history.models.common.FieldType.deepCopy(template.getType())); instance.setName(template.getName()); instance.setLabel(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getLabel())); + instance.setRequired(template.getRequired()); instance.setInputHint(template.getInputHint()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionBuilder.java index 64945b7ec33..87994b90243 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -17,7 +19,7 @@ * .type(typeBuilder -> typeBuilder) * .name("{name}") * .label(labelBuilder -> labelBuilder) - * .inputHint(TextInputHint.SINGLE_LINE) + * .required(true) * .build() *
                                                                                                                                                                                              * @@ -31,10 +33,13 @@ public class FieldDefinitionBuilder implements Builder { private com.commercetools.history.models.common.LocalizedString label; - private com.commercetools.history.models.common.TextInputHint inputHint; + private Boolean required; + + @Nullable + private com.commercetools.history.models.common.TypeTextInputHint inputHint; /** - * set the value to the type using the builder function + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @param builder function to build the type value * @return Builder */ @@ -46,7 +51,7 @@ public FieldDefinitionBuilder type( } /** - * set the value to the type using the builder function + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @param builder function to build the type value * @return Builder */ @@ -58,7 +63,7 @@ public FieldDefinitionBuilder withType( } /** - * set the value to the type + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @param type value to be set * @return Builder */ @@ -69,7 +74,7 @@ public FieldDefinitionBuilder type(final com.commercetools.history.models.common } /** - *

                                                                                                                                                                                              The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -80,7 +85,7 @@ public FieldDefinitionBuilder name(final String name) { } /** - * set the value to the label using the builder function + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @param builder function to build the label value * @return Builder */ @@ -92,7 +97,7 @@ public FieldDefinitionBuilder label( } /** - * set the value to the label using the builder function + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @param builder function to build the label value * @return Builder */ @@ -104,7 +109,7 @@ public FieldDefinitionBuilder withLabel( } /** - * set the value to the label + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @param label value to be set * @return Builder */ @@ -115,18 +120,30 @@ public FieldDefinitionBuilder label(final com.commercetools.history.models.commo } /** - * set the value to the inputHint + *

                                                                                                                                                                                              Defines whether the field is required to have a value.

                                                                                                                                                                                              + * @param required value to be set + * @return Builder + */ + + public FieldDefinitionBuilder required(final Boolean required) { + this.required = required; + return this; + } + + /** + *

                                                                                                                                                                                              Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

                                                                                                                                                                                              * @param inputHint value to be set * @return Builder */ - public FieldDefinitionBuilder inputHint(final com.commercetools.history.models.common.TextInputHint inputHint) { + public FieldDefinitionBuilder inputHint( + @Nullable final com.commercetools.history.models.common.TypeTextInputHint inputHint) { this.inputHint = inputHint; return this; } /** - * value of type} + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              * @return type */ @@ -135,7 +152,7 @@ public com.commercetools.history.models.common.FieldType getType() { } /** - *

                                                                                                                                                                                              The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

                                                                                                                                                                                              * @return name */ @@ -144,7 +161,7 @@ public String getName() { } /** - * value of label} + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              * @return label */ @@ -153,11 +170,21 @@ public com.commercetools.history.models.common.LocalizedString getLabel() { } /** - * value of inputHint} + *

                                                                                                                                                                                              Defines whether the field is required to have a value.

                                                                                                                                                                                              + * @return required + */ + + public Boolean getRequired() { + return this.required; + } + + /** + *

                                                                                                                                                                                              Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

                                                                                                                                                                                              * @return inputHint */ - public com.commercetools.history.models.common.TextInputHint getInputHint() { + @Nullable + public com.commercetools.history.models.common.TypeTextInputHint getInputHint() { return this.inputHint; } @@ -169,8 +196,8 @@ public FieldDefinition build() { Objects.requireNonNull(type, FieldDefinition.class + ": type is missing"); Objects.requireNonNull(name, FieldDefinition.class + ": name is missing"); Objects.requireNonNull(label, FieldDefinition.class + ": label is missing"); - Objects.requireNonNull(inputHint, FieldDefinition.class + ": inputHint is missing"); - return new FieldDefinitionImpl(type, name, label, inputHint); + Objects.requireNonNull(required, FieldDefinition.class + ": required is missing"); + return new FieldDefinitionImpl(type, name, label, required, inputHint); } /** @@ -178,7 +205,7 @@ public FieldDefinition build() { * @return FieldDefinition */ public FieldDefinition buildUnchecked() { - return new FieldDefinitionImpl(type, name, label, inputHint); + return new FieldDefinitionImpl(type, name, label, required, inputHint); } /** @@ -199,6 +226,7 @@ public static FieldDefinitionBuilder of(final FieldDefinition template) { builder.type = template.getType(); builder.name = template.getName(); builder.label = template.getLabel(); + builder.required = template.getRequired(); builder.inputHint = template.getInputHint(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionImpl.java index d2656bae81e..11c663adf76 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/FieldDefinitionImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * FieldDefinition + *

                                                                                                                                                                                              Defines a Custom Field and its meta-information. This FieldDefinition is similar to an AttributeDefinition of Product Types.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class FieldDefinitionImpl implements FieldDefinition, ModelBase { @@ -28,7 +28,9 @@ public class FieldDefinitionImpl implements FieldDefinition, ModelBase { private com.commercetools.history.models.common.LocalizedString label; - private com.commercetools.history.models.common.TextInputHint inputHint; + private Boolean required; + + private com.commercetools.history.models.common.TypeTextInputHint inputHint; /** * create instance with all properties @@ -37,10 +39,12 @@ public class FieldDefinitionImpl implements FieldDefinition, ModelBase { FieldDefinitionImpl(@JsonProperty("type") final com.commercetools.history.models.common.FieldType type, @JsonProperty("name") final String name, @JsonProperty("label") final com.commercetools.history.models.common.LocalizedString label, - @JsonProperty("inputHint") final com.commercetools.history.models.common.TextInputHint inputHint) { + @JsonProperty("required") final Boolean required, + @JsonProperty("inputHint") final com.commercetools.history.models.common.TypeTextInputHint inputHint) { this.type = type; this.name = name; this.label = label; + this.required = required; this.inputHint = inputHint; } @@ -51,7 +55,7 @@ public FieldDefinitionImpl() { } /** - * + *

                                                                                                                                                                                              Data type of the Custom Field to define.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.FieldType getType() { @@ -59,7 +63,7 @@ public com.commercetools.history.models.common.FieldType getType() { } /** - *

                                                                                                                                                                                              The name of the field. The name must be between two and 36 characters long and can contain the ASCII letters A to Z in lowercase or uppercase, digits, underscores (_) and the hyphen-minus (-). The name must be unique for a given resource type ID. In case there is a field with the same name in another type it has to have the same FieldType also.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the Custom Field to define. Must be unique for a given ResourceTypeId. In case there is a FieldDefinition with the same name in another Type, both FieldDefinitions must have the same type.

                                                                                                                                                                                              */ public String getName() { @@ -67,7 +71,7 @@ public String getName() { } /** - * + *

                                                                                                                                                                                              A human-readable label for the field.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getLabel() { @@ -75,10 +79,18 @@ public com.commercetools.history.models.common.LocalizedString getLabel() { } /** - * + *

                                                                                                                                                                                              Defines whether the field is required to have a value.

                                                                                                                                                                                              + */ + + public Boolean getRequired() { + return this.required; + } + + /** + *

                                                                                                                                                                                              Defines the visual representation of the field in user interfaces like the Merchant Center. It is only relevant for string-based FieldTypes like CustomFieldStringType and CustomFieldLocalizedStringType.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.TextInputHint getInputHint() { + public com.commercetools.history.models.common.TypeTextInputHint getInputHint() { return this.inputHint; } @@ -94,7 +106,11 @@ public void setLabel(final com.commercetools.history.models.common.LocalizedStri this.label = label; } - public void setInputHint(final com.commercetools.history.models.common.TextInputHint inputHint) { + public void setRequired(final Boolean required) { + this.required = required; + } + + public void setInputHint(final com.commercetools.history.models.common.TypeTextInputHint inputHint) { this.inputHint = inputHint; } @@ -111,17 +127,24 @@ public boolean equals(Object o) { return new EqualsBuilder().append(type, that.type) .append(name, that.name) .append(label, that.label) + .append(required, that.required) .append(inputHint, that.inputHint) .append(type, that.type) .append(name, that.name) .append(label, that.label) + .append(required, that.required) .append(inputHint, that.inputHint) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(name).append(label).append(inputHint).toHashCode(); + return new HashCodeBuilder(17, 37).append(type) + .append(name) + .append(label) + .append(required) + .append(inputHint) + .toHashCode(); } @Override @@ -129,6 +152,7 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) .append("name", name) .append("label", label) + .append("required", required) .append("inputHint", inputHint) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJson.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJson.java new file mode 100644 index 00000000000..1721998fbe9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJson.java @@ -0,0 +1,93 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              GeoJSON Geometry represents a Geometry Object as defined in the GeoJSON standard.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create a subtype instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     GeoJson geoJson = GeoJson.pointBuilder()
                                                                                                                                                                                              + *             plusCoordinates(coordinatesBuilder -> coordinatesBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = GeoJsonImpl.class, visible = true) +@JsonDeserialize(as = GeoJsonImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface GeoJson { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + public GeoJson copyDeep(); + + /** + * factory method to create a deep copy of GeoJson + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GeoJson deepCopy(@Nullable final GeoJson template) { + if (template == null) { + return null; + } + + if (!(template instanceof GeoJsonImpl)) { + return template.copyDeep(); + } + GeoJsonImpl instance = new GeoJsonImpl(); + return instance; + } + + /** + * builder for point subtype + * @return builder + */ + public static com.commercetools.history.models.common.GeoLocationBuilder pointBuilder() { + return com.commercetools.history.models.common.GeoLocationBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGeoJson(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/GeoJsonBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJsonBuilder.java new file mode 100644 index 00000000000..b9cd4a770e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJsonBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GeoJsonBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GeoJsonBuilder { + + public com.commercetools.history.models.common.GeoLocationBuilder pointBuilder() { + return com.commercetools.history.models.common.GeoLocationBuilder.of(); + } + + /** + * factory method for an instance of GeoJsonBuilder + * @return builder + */ + public static GeoJsonBuilder of() { + return new GeoJsonBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJsonImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJsonImpl.java new file mode 100644 index 00000000000..45da56f01a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoJsonImpl.java @@ -0,0 +1,76 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              GeoJSON Geometry represents a Geometry Object as defined in the GeoJSON standard.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GeoJsonImpl implements GeoJson, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + GeoJsonImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public GeoJsonImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GeoJsonImpl that = (GeoJsonImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public GeoJson copyDeep() { + return GeoJson.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocation.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocation.java index ac304591c7d..5a06d62cb43 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocation.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocation.java @@ -22,15 +22,20 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     GeoLocation geoLocation = GeoLocation.builder()
                                                                                                                                                                                              - *             .type("{type}")
                                                                                                                                                                                                *             .plusCoordinates(coordinatesBuilder -> coordinatesBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              */ +@io.vrap.rmf.base.client.utils.json.SubType("Point") @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") @JsonDeserialize(as = GeoLocationImpl.class) -public interface GeoLocation { +public interface GeoLocation extends GeoJson { + + /** + * discriminator value for GeoLocation + */ + String POINT = "Point"; /** * @@ -48,13 +53,6 @@ public interface GeoLocation { @JsonProperty("coordinates") public List getCoordinates(); - /** - * set type - * @param type value to be set - */ - - public void setType(final String type); - /** * set coordinates * @param coordinates values to be set @@ -85,7 +83,6 @@ public static GeoLocation of() { */ public static GeoLocation of(final GeoLocation template) { GeoLocationImpl instance = new GeoLocationImpl(); - instance.setType(template.getType()); instance.setCoordinates(template.getCoordinates()); return instance; } @@ -103,7 +100,6 @@ public static GeoLocation deepCopy(@Nullable final GeoLocation template) { return null; } GeoLocationImpl instance = new GeoLocationImpl(); - instance.setType(template.getType()); instance.setCoordinates(Optional.ofNullable(template.getCoordinates()).map(ArrayList::new).orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationBuilder.java index 32d798da654..abee5df3f9a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationBuilder.java @@ -13,7 +13,6 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     GeoLocation geoLocation = GeoLocation.builder()
                                                                                                                                                                                              - *             .type("{type}")
                                                                                                                                                                                                *             .plusCoordinates(coordinatesBuilder -> coordinatesBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -22,21 +21,8 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class GeoLocationBuilder implements Builder { - private String type; - private java.util.List coordinates; - /** - * set the value to the type - * @param type value to be set - * @return Builder - */ - - public GeoLocationBuilder type(final String type) { - this.type = type; - return this; - } - /** * set values to the coordinates * @param coordinates value to be set @@ -73,15 +59,6 @@ public GeoLocationBuilder plusCoordinates(final Integer... coordinates) { return this; } - /** - * value of type} - * @return type - */ - - public String getType() { - return this.type; - } - /** * value of coordinates} * @return coordinates @@ -96,9 +73,8 @@ public java.util.List getCoordinates() { * @return GeoLocation */ public GeoLocation build() { - Objects.requireNonNull(type, GeoLocation.class + ": type is missing"); Objects.requireNonNull(coordinates, GeoLocation.class + ": coordinates is missing"); - return new GeoLocationImpl(type, coordinates); + return new GeoLocationImpl(coordinates); } /** @@ -106,7 +82,7 @@ public GeoLocation build() { * @return GeoLocation */ public GeoLocation buildUnchecked() { - return new GeoLocationImpl(type, coordinates); + return new GeoLocationImpl(coordinates); } /** @@ -124,7 +100,6 @@ public static GeoLocationBuilder of() { */ public static GeoLocationBuilder of(final GeoLocation template) { GeoLocationBuilder builder = new GeoLocationBuilder(); - builder.type = template.getType(); builder.coordinates = template.getCoordinates(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationImpl.java index 0d21f6f7a51..2689c5037b3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/GeoLocationImpl.java @@ -30,16 +30,16 @@ public class GeoLocationImpl implements GeoLocation, ModelBase { * create instance with all properties */ @JsonCreator - GeoLocationImpl(@JsonProperty("type") final String type, - @JsonProperty("coordinates") final java.util.List coordinates) { - this.type = type; + GeoLocationImpl(@JsonProperty("coordinates") final java.util.List coordinates) { this.coordinates = coordinates; + this.type = POINT; } /** * create empty instance */ public GeoLocationImpl() { + this.type = POINT; } /** @@ -58,10 +58,6 @@ public java.util.List getCoordinates() { return this.coordinates; } - public void setType(final String type) { - this.type = type; - } - public void setCoordinates(final Integer... coordinates) { this.coordinates = new ArrayList<>(Arrays.asList(coordinates)); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Image.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Image.java index 4efe4a405e4..b6a9b7c1646 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Image.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Image.java @@ -25,7 +25,6 @@ * Image image = Image.builder() * .url("{url}") * .dimensions(dimensionsBuilder -> dimensionsBuilder) - * .label("{label}") * .build() * *
                                                                                                                                                                                              @@ -35,7 +34,7 @@ public interface Image { /** - * + *

                                                                                                                                                                                              URL of the image in its original size that must be unique within a single ProductVariant.

                                                                                                                                                                                              * @return url */ @NotNull @@ -43,7 +42,7 @@ public interface Image { public String getUrl(); /** - * + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @return dimensions */ @NotNull @@ -52,29 +51,29 @@ public interface Image { public ImageDimensions getDimensions(); /** - * + *

                                                                                                                                                                                              Custom label for the image.

                                                                                                                                                                                              * @return label */ - @NotNull + @JsonProperty("label") public String getLabel(); /** - * set url + *

                                                                                                                                                                                              URL of the image in its original size that must be unique within a single ProductVariant.

                                                                                                                                                                                              * @param url value to be set */ public void setUrl(final String url); /** - * set dimensions + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @param dimensions value to be set */ public void setDimensions(final ImageDimensions dimensions); /** - * set label + *

                                                                                                                                                                                              Custom label for the image.

                                                                                                                                                                                              * @param label value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageBuilder.java index 82995703676..bad25116236 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -16,7 +18,6 @@ * Image image = Image.builder() * .url("{url}") * .dimensions(dimensionsBuilder -> dimensionsBuilder) - * .label("{label}") * .build() * * @@ -28,10 +29,11 @@ public class ImageBuilder implements Builder { private com.commercetools.history.models.common.ImageDimensions dimensions; + @Nullable private String label; /** - * set the value to the url + *

                                                                                                                                                                                              URL of the image in its original size that must be unique within a single ProductVariant.

                                                                                                                                                                                              * @param url value to be set * @return Builder */ @@ -42,7 +44,7 @@ public ImageBuilder url(final String url) { } /** - * set the value to the dimensions using the builder function + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @param builder function to build the dimensions value * @return Builder */ @@ -54,7 +56,7 @@ public ImageBuilder dimensions( } /** - * set the value to the dimensions using the builder function + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @param builder function to build the dimensions value * @return Builder */ @@ -66,7 +68,7 @@ public ImageBuilder withDimensions( } /** - * set the value to the dimensions + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @param dimensions value to be set * @return Builder */ @@ -77,18 +79,18 @@ public ImageBuilder dimensions(final com.commercetools.history.models.common.Ima } /** - * set the value to the label + *

                                                                                                                                                                                              Custom label for the image.

                                                                                                                                                                                              * @param label value to be set * @return Builder */ - public ImageBuilder label(final String label) { + public ImageBuilder label(@Nullable final String label) { this.label = label; return this; } /** - * value of url} + *

                                                                                                                                                                                              URL of the image in its original size that must be unique within a single ProductVariant.

                                                                                                                                                                                              * @return url */ @@ -97,7 +99,7 @@ public String getUrl() { } /** - * value of dimensions} + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              * @return dimensions */ @@ -106,10 +108,11 @@ public com.commercetools.history.models.common.ImageDimensions getDimensions() { } /** - * value of label} + *

                                                                                                                                                                                              Custom label for the image.

                                                                                                                                                                                              * @return label */ + @Nullable public String getLabel() { return this.label; } @@ -121,7 +124,6 @@ public String getLabel() { public Image build() { Objects.requireNonNull(url, Image.class + ": url is missing"); Objects.requireNonNull(dimensions, Image.class + ": dimensions is missing"); - Objects.requireNonNull(label, Image.class + ": label is missing"); return new ImageImpl(url, dimensions, label); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensions.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensions.java index 03e7caf5895..09b7d4530b8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensions.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensions.java @@ -22,8 +22,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ImageDimensions imageDimensions = ImageDimensions.builder()
                                                                                                                                                                                              - *             .w(1)
                                                                                                                                                                                              - *             .h(1)
                                                                                                                                                                                              + *             .w(0.3)
                                                                                                                                                                                              + *             .h(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -33,7 +33,7 @@ public interface ImageDimensions { /** - * + *

                                                                                                                                                                                              Width of the image.

                                                                                                                                                                                              * @return w */ @NotNull @@ -41,7 +41,7 @@ public interface ImageDimensions { public Integer getW(); /** - * + *

                                                                                                                                                                                              Height of the image.

                                                                                                                                                                                              * @return h */ @NotNull @@ -49,14 +49,14 @@ public interface ImageDimensions { public Integer getH(); /** - * set w + *

                                                                                                                                                                                              Width of the image.

                                                                                                                                                                                              * @param w value to be set */ public void setW(final Integer w); /** - * set h + *

                                                                                                                                                                                              Height of the image.

                                                                                                                                                                                              * @param h value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsBuilder.java index 7494c1e1700..50d0b9edf9f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsBuilder.java @@ -13,8 +13,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ImageDimensions imageDimensions = ImageDimensions.builder()
                                                                                                                                                                                              - *             .w(1)
                                                                                                                                                                                              - *             .h(1)
                                                                                                                                                                                              + *             .w(0.3)
                                                                                                                                                                                              + *             .h(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -27,7 +27,7 @@ public class ImageDimensionsBuilder implements Builder { private Integer h; /** - * set the value to the w + *

                                                                                                                                                                                              Width of the image.

                                                                                                                                                                                              * @param w value to be set * @return Builder */ @@ -38,7 +38,7 @@ public ImageDimensionsBuilder w(final Integer w) { } /** - * set the value to the h + *

                                                                                                                                                                                              Height of the image.

                                                                                                                                                                                              * @param h value to be set * @return Builder */ @@ -49,7 +49,7 @@ public ImageDimensionsBuilder h(final Integer h) { } /** - * value of w} + *

                                                                                                                                                                                              Width of the image.

                                                                                                                                                                                              * @return w */ @@ -58,7 +58,7 @@ public Integer getW() { } /** - * value of h} + *

                                                                                                                                                                                              Height of the image.

                                                                                                                                                                                              * @return h */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsImpl.java index 6354fc6512b..3f437058e29 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageDimensionsImpl.java @@ -42,7 +42,7 @@ public ImageDimensionsImpl() { } /** - * + *

                                                                                                                                                                                              Width of the image.

                                                                                                                                                                                              */ public Integer getW() { @@ -50,7 +50,7 @@ public Integer getW() { } /** - * + *

                                                                                                                                                                                              Height of the image.

                                                                                                                                                                                              */ public Integer getH() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageImpl.java index 10b315944ee..875fbd7a32b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ImageImpl.java @@ -47,7 +47,7 @@ public ImageImpl() { } /** - * + *

                                                                                                                                                                                              URL of the image in its original size that must be unique within a single ProductVariant.

                                                                                                                                                                                              */ public String getUrl() { @@ -55,7 +55,7 @@ public String getUrl() { } /** - * + *

                                                                                                                                                                                              Dimensions of the original image.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.ImageDimensions getDimensions() { @@ -63,7 +63,7 @@ public com.commercetools.history.models.common.ImageDimensions getDimensions() { } /** - * + *

                                                                                                                                                                                              Custom label for the image.

                                                                                                                                                                                              */ public String getLabel() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociate.java index 36a735b6a6c..e7b99da1546 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociate.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociate.java @@ -35,7 +35,7 @@ public interface InheritedAssociate { /** - * + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @return associateRoleAssignments */ @NotNull @@ -44,16 +44,16 @@ public interface InheritedAssociate { public List getAssociateRoleAssignments(); /** - * + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @return customer */ @NotNull @Valid @JsonProperty("customer") - public Reference getCustomer(); + public CustomerReference getCustomer(); /** - * set associateRoleAssignments + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments values to be set */ @@ -61,18 +61,18 @@ public interface InheritedAssociate { public void setAssociateRoleAssignments(final InheritedAssociateRoleAssignment... associateRoleAssignments); /** - * set associateRoleAssignments + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments values to be set */ public void setAssociateRoleAssignments(final List associateRoleAssignments); /** - * set customer + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param customer value to be set */ - public void setCustomer(final Reference customer); + public void setCustomer(final CustomerReference customer); /** * factory method @@ -112,7 +112,8 @@ public static InheritedAssociate deepCopy(@Nullable final InheritedAssociate tem .map(com.commercetools.history.models.common.InheritedAssociateRoleAssignment::deepCopy) .collect(Collectors.toList())) .orElse(null)); - instance.setCustomer(com.commercetools.history.models.common.Reference.deepCopy(template.getCustomer())); + instance.setCustomer( + com.commercetools.history.models.common.CustomerReference.deepCopy(template.getCustomer())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateBuilder.java index b9763ee470c..448b61a8bfa 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateBuilder.java @@ -25,10 +25,10 @@ public class InheritedAssociateBuilder implements Builder { private java.util.List associateRoleAssignments; - private com.commercetools.history.models.common.Reference customer; + private com.commercetools.history.models.common.CustomerReference customer; /** - * set values to the associateRoleAssignments + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -40,7 +40,7 @@ public InheritedAssociateBuilder associateRoleAssignments( } /** - * set value to the associateRoleAssignments + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -52,7 +52,7 @@ public InheritedAssociateBuilder associateRoleAssignments( } /** - * add values to the associateRoleAssignments + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param associateRoleAssignments value to be set * @return Builder */ @@ -67,7 +67,7 @@ public InheritedAssociateBuilder plusAssociateRoleAssignments( } /** - * add the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -84,7 +84,7 @@ public InheritedAssociateBuilder plusAssociateRoleAssignments( } /** - * set the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -99,7 +99,7 @@ public InheritedAssociateBuilder withAssociateRoleAssignments( } /** - * add the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -111,7 +111,7 @@ public InheritedAssociateBuilder addAssociateRoleAssignments( } /** - * set the value to the associateRoleAssignments using the builder function + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRoleAssignments value * @return Builder */ @@ -123,42 +123,43 @@ public InheritedAssociateBuilder setAssociateRoleAssignments( } /** - * set the value to the customer using the builder function + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param builder function to build the customer value * @return Builder */ public InheritedAssociateBuilder customer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.CustomerReferenceBuilder.of()).build(); return this; } /** - * set the value to the customer using the builder function + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param builder function to build the customer value * @return Builder */ public InheritedAssociateBuilder withCustomer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.customer = builder.apply(com.commercetools.history.models.common.CustomerReferenceBuilder.of()); return this; } /** - * set the value to the customer + *

                                                                                                                                                                                              The Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @param customer value to be set * @return Builder */ - public InheritedAssociateBuilder customer(final com.commercetools.history.models.common.Reference customer) { + public InheritedAssociateBuilder customer( + final com.commercetools.history.models.common.CustomerReference customer) { this.customer = customer; return this; } /** - * value of associateRoleAssignments} + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              * @return associateRoleAssignments */ @@ -167,11 +168,11 @@ public java.util.ListThe Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              * @return customer */ - public com.commercetools.history.models.common.Reference getCustomer() { + public com.commercetools.history.models.common.CustomerReference getCustomer() { return this.customer; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateImpl.java index 525f384b2f4..13f16fcf8f1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateImpl.java @@ -24,7 +24,7 @@ public class InheritedAssociateImpl implements InheritedAssociate, ModelBase { private java.util.List associateRoleAssignments; - private com.commercetools.history.models.common.Reference customer; + private com.commercetools.history.models.common.CustomerReference customer; /** * create instance with all properties @@ -32,7 +32,7 @@ public class InheritedAssociateImpl implements InheritedAssociate, ModelBase { @JsonCreator InheritedAssociateImpl( @JsonProperty("associateRoleAssignments") final java.util.List associateRoleAssignments, - @JsonProperty("customer") final com.commercetools.history.models.common.Reference customer) { + @JsonProperty("customer") final com.commercetools.history.models.common.CustomerReference customer) { this.associateRoleAssignments = associateRoleAssignments; this.customer = customer; } @@ -44,7 +44,7 @@ public InheritedAssociateImpl() { } /** - * + *

                                                                                                                                                                                              Inherited roles of the Associate within a Business Unit.

                                                                                                                                                                                              */ public java.util.List getAssociateRoleAssignments() { @@ -52,10 +52,10 @@ public java.util.ListThe Customer that acts as an Associate in the Business Unit.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getCustomer() { + public com.commercetools.history.models.common.CustomerReference getCustomer() { return this.customer; } @@ -69,7 +69,7 @@ public void setAssociateRoleAssignments( this.associateRoleAssignments = associateRoleAssignments; } - public void setCustomer(final com.commercetools.history.models.common.Reference customer) { + public void setCustomer(final com.commercetools.history.models.common.CustomerReference customer) { this.customer = customer; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignment.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignment.java index 814aa05bf4f..e3dd15bdc2d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignment.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignment.java @@ -34,36 +34,36 @@ public interface InheritedAssociateRoleAssignment { /** - * + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @return associateRole */ @NotNull @Valid @JsonProperty("associateRole") - public KeyReference getAssociateRole(); + public AssociateRoleKeyReference getAssociateRole(); /** - * + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @return source */ @NotNull @Valid @JsonProperty("source") - public KeyReference getSource(); + public BusinessUnitKeyReference getSource(); /** - * set associateRole + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @param associateRole value to be set */ - public void setAssociateRole(final KeyReference associateRole); + public void setAssociateRole(final AssociateRoleKeyReference associateRole); /** - * set source + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @param source value to be set */ - public void setSource(final KeyReference source); + public void setSource(final BusinessUnitKeyReference source); /** * factory method @@ -99,8 +99,9 @@ public static InheritedAssociateRoleAssignment deepCopy(@Nullable final Inherite } InheritedAssociateRoleAssignmentImpl instance = new InheritedAssociateRoleAssignmentImpl(); instance.setAssociateRole( - com.commercetools.history.models.common.KeyReference.deepCopy(template.getAssociateRole())); - instance.setSource(com.commercetools.history.models.common.KeyReference.deepCopy(template.getSource())); + com.commercetools.history.models.common.AssociateRoleKeyReference.deepCopy(template.getAssociateRole())); + instance.setSource( + com.commercetools.history.models.common.BusinessUnitKeyReference.deepCopy(template.getSource())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentBuilder.java index 8acd6098794..86499f769e6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentBuilder.java @@ -23,97 +23,101 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class InheritedAssociateRoleAssignmentBuilder implements Builder { - private com.commercetools.history.models.common.KeyReference associateRole; + private com.commercetools.history.models.common.AssociateRoleKeyReference associateRole; - private com.commercetools.history.models.common.KeyReference source; + private com.commercetools.history.models.common.BusinessUnitKeyReference source; /** - * set the value to the associateRole using the builder function + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRole value * @return Builder */ public InheritedAssociateRoleAssignmentBuilder associateRole( - Function builder) { - this.associateRole = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + Function builder) { + this.associateRole = builder + .apply(com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the associateRole using the builder function + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @param builder function to build the associateRole value * @return Builder */ public InheritedAssociateRoleAssignmentBuilder withAssociateRole( - Function builder) { - this.associateRole = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); + Function builder) { + this.associateRole = builder + .apply(com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of()); return this; } /** - * set the value to the associateRole + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @param associateRole value to be set * @return Builder */ public InheritedAssociateRoleAssignmentBuilder associateRole( - final com.commercetools.history.models.common.KeyReference associateRole) { + final com.commercetools.history.models.common.AssociateRoleKeyReference associateRole) { this.associateRole = associateRole; return this; } /** - * set the value to the source using the builder function + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @param builder function to build the source value * @return Builder */ public InheritedAssociateRoleAssignmentBuilder source( - Function builder) { - this.source = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()).build(); + Function builder) { + this.source = builder.apply(com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the source using the builder function + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @param builder function to build the source value * @return Builder */ public InheritedAssociateRoleAssignmentBuilder withSource( - Function builder) { - this.source = builder.apply(com.commercetools.history.models.common.KeyReferenceBuilder.of()); + Function builder) { + this.source = builder.apply(com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder.of()); return this; } /** - * set the value to the source + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @param source value to be set * @return Builder */ public InheritedAssociateRoleAssignmentBuilder source( - final com.commercetools.history.models.common.KeyReference source) { + final com.commercetools.history.models.common.BusinessUnitKeyReference source) { this.source = source; return this; } /** - * value of associateRole} + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              * @return associateRole */ - public com.commercetools.history.models.common.KeyReference getAssociateRole() { + public com.commercetools.history.models.common.AssociateRoleKeyReference getAssociateRole() { return this.associateRole; } /** - * value of source} + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              * @return source */ - public com.commercetools.history.models.common.KeyReference getSource() { + public com.commercetools.history.models.common.BusinessUnitKeyReference getSource() { return this.source; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentImpl.java index e27301c34ef..1fa1fe60dcd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentImpl.java @@ -22,17 +22,17 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class InheritedAssociateRoleAssignmentImpl implements InheritedAssociateRoleAssignment, ModelBase { - private com.commercetools.history.models.common.KeyReference associateRole; + private com.commercetools.history.models.common.AssociateRoleKeyReference associateRole; - private com.commercetools.history.models.common.KeyReference source; + private com.commercetools.history.models.common.BusinessUnitKeyReference source; /** * create instance with all properties */ @JsonCreator InheritedAssociateRoleAssignmentImpl( - @JsonProperty("associateRole") final com.commercetools.history.models.common.KeyReference associateRole, - @JsonProperty("source") final com.commercetools.history.models.common.KeyReference source) { + @JsonProperty("associateRole") final com.commercetools.history.models.common.AssociateRoleKeyReference associateRole, + @JsonProperty("source") final com.commercetools.history.models.common.BusinessUnitKeyReference source) { this.associateRole = associateRole; this.source = source; } @@ -44,26 +44,27 @@ public InheritedAssociateRoleAssignmentImpl() { } /** - * + *

                                                                                                                                                                                              Inherited role the Associate holds within a Business Unit.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.KeyReference getAssociateRole() { + public com.commercetools.history.models.common.AssociateRoleKeyReference getAssociateRole() { return this.associateRole; } /** - * + *

                                                                                                                                                                                              Reference to the parent Business Unit where the assignment is defined explicitly.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.KeyReference getSource() { + public com.commercetools.history.models.common.BusinessUnitKeyReference getSource() { return this.source; } - public void setAssociateRole(final com.commercetools.history.models.common.KeyReference associateRole) { + public void setAssociateRole( + final com.commercetools.history.models.common.AssociateRoleKeyReference associateRole) { this.associateRole = associateRole; } - public void setSource(final com.commercetools.history.models.common.KeyReference source) { + public void setSource(final com.commercetools.history.models.common.BusinessUnitKeyReference source) { this.source = source; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InventoryMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InventoryMode.java new file mode 100644 index 00000000000..db2668e6f2b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/InventoryMode.java @@ -0,0 +1,119 @@ + +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 how Line Items in a Cart are tracked.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface InventoryMode extends JsonEnum { + + InventoryMode NONE = InventoryModeEnum.NONE; + + InventoryMode TRACK_ONLY = InventoryModeEnum.TRACK_ONLY; + + InventoryMode RESERVE_ON_ORDER = InventoryModeEnum.RESERVE_ON_ORDER; + + /** + * possible values of InventoryMode + */ + enum InventoryModeEnum implements InventoryMode { + /** + * None + */ + NONE("None"), + + /** + * TrackOnly + */ + TRACK_ONLY("TrackOnly"), + + /** + * ReserveOnOrder + */ + RESERVE_ON_ORDER("ReserveOnOrder"); + private final String jsonName; + + private InventoryModeEnum(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 InventoryMode + * 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 InventoryMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new InventoryMode() { + @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 InventoryMode[] values() { + return InventoryModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetails.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetails.java index c6c3aa22067..4b88c6e2d1d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetails.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetails.java @@ -35,7 +35,7 @@ public interface ItemShippingDetails { /** - * + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @return targets */ @NotNull @@ -44,7 +44,10 @@ public interface ItemShippingDetails { public List getTargets(); /** - *

                                                                                                                                                                                              true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. A cart cannot be ordered when the value is false. The error InvalidItemShippingDetails will be triggered.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • true if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • false if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in targets. Ordering a Cart when the value is false returns an InvalidItemShippingDetails error.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @return valid */ @NotNull @@ -52,7 +55,7 @@ public interface ItemShippingDetails { public Boolean getValid(); /** - * set targets + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param targets values to be set */ @@ -60,14 +63,17 @@ public interface ItemShippingDetails { public void setTargets(final ItemShippingTarget... targets); /** - * set targets + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param targets values to be set */ public void setTargets(final List targets); /** - *

                                                                                                                                                                                              true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. A cart cannot be ordered when the value is false. The error InvalidItemShippingDetails will be triggered.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • true if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • false if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in targets. Ordering a Cart when the value is false returns an InvalidItemShippingDetails error.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @param valid value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsBuilder.java index dd612392ebb..49dac80df6f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsBuilder.java @@ -28,7 +28,7 @@ public class ItemShippingDetailsBuilder implements Builder private Boolean valid; /** - * set values to the targets + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param targets value to be set * @return Builder */ @@ -40,7 +40,7 @@ public ItemShippingDetailsBuilder targets( } /** - * set value to the targets + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param targets value to be set * @return Builder */ @@ -52,7 +52,7 @@ public ItemShippingDetailsBuilder targets( } /** - * add values to the targets + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param targets value to be set * @return Builder */ @@ -67,7 +67,7 @@ public ItemShippingDetailsBuilder plusTargets( } /** - * add the value to the targets using the builder function + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param builder function to build the targets value * @return Builder */ @@ -82,7 +82,7 @@ public ItemShippingDetailsBuilder plusTargets( } /** - * set the value to the targets using the builder function + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param builder function to build the targets value * @return Builder */ @@ -95,7 +95,7 @@ public ItemShippingDetailsBuilder withTargets( } /** - * add the value to the targets using the builder function + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param builder function to build the targets value * @return Builder */ @@ -106,7 +106,7 @@ public ItemShippingDetailsBuilder addTargets( } /** - * set the value to the targets using the builder function + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @param builder function to build the targets value * @return Builder */ @@ -117,7 +117,10 @@ public ItemShippingDetailsBuilder setTargets( } /** - *

                                                                                                                                                                                              true if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. A cart cannot be ordered when the value is false. The error InvalidItemShippingDetails will be triggered.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • true if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • false if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in targets. Ordering a Cart when the value is false returns an InvalidItemShippingDetails error.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @param valid value to be set * @return Builder */ @@ -128,7 +131,7 @@ public ItemShippingDetailsBuilder valid(final Boolean valid) { } /** - * value of targets} + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              * @return targets */ @@ -137,7 +140,10 @@ public java.util.Listtrue if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. A cart cannot be ordered when the value is false. The error InvalidItemShippingDetails will be triggered.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • true if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • false if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in targets. Ordering a Cart when the value is false returns an InvalidItemShippingDetails error.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @return valid */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsImpl.java index 9cabcc022e6..3198f0d54f4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingDetailsImpl.java @@ -44,7 +44,7 @@ public ItemShippingDetailsImpl() { } /** - * + *

                                                                                                                                                                                              Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.

                                                                                                                                                                                              */ public java.util.List getTargets() { @@ -52,7 +52,10 @@ public java.util.Listtrue if the quantity of the (custom) line item is equal to the sum of the sub-quantities in targets, false otherwise. A cart cannot be ordered when the value is false. The error InvalidItemShippingDetails will be triggered.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • true if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in targets.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • false if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in targets. Ordering a Cart when the value is false returns an InvalidItemShippingDetails error.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              */ public Boolean getValid() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTarget.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTarget.java index 7c0353043fd..47228acd042 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTarget.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTarget.java @@ -15,7 +15,8 @@ import jakarta.validation.constraints.NotNull; /** - * ItemShippingTarget + *

                                                                                                                                                                                              Determines the address (as a reference to an address in itemShippingAddresses) and the quantity shipped to the address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified. An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -23,7 +24,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ItemShippingTarget itemShippingTarget = ItemShippingTarget.builder()
                                                                                                                                                                                                *             .addressKey("{addressKey}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -33,7 +34,7 @@ public interface ItemShippingTarget { /** - *

                                                                                                                                                                                              The key of the address in the cart's itemShippingAddresses

                                                                                                                                                                                              + *

                                                                                                                                                                                              Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

                                                                                                                                                                                              * @return addressKey */ @NotNull @@ -41,26 +42,45 @@ public interface ItemShippingTarget { public String getAddressKey(); /** - *

                                                                                                                                                                                              The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - *

                                                                                                                                                                                              The key of the address in the cart's itemShippingAddresses

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It connects Line Item or Custom Line Item quantities with individual Shipping Methods.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + + @JsonProperty("shippingMethodKey") + public String getShippingMethodKey(); + + /** + *

                                                                                                                                                                                              Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

                                                                                                                                                                                              * @param addressKey value to be set */ public void setAddressKey(final String addressKey); /** - *

                                                                                                                                                                                              The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It connects Line Item or Custom Line Item quantities with individual Shipping Methods.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + */ + + public void setShippingMethodKey(final String shippingMethodKey); /** * factory method @@ -79,6 +99,7 @@ public static ItemShippingTarget of(final ItemShippingTarget template) { ItemShippingTargetImpl instance = new ItemShippingTargetImpl(); instance.setAddressKey(template.getAddressKey()); instance.setQuantity(template.getQuantity()); + instance.setShippingMethodKey(template.getShippingMethodKey()); return instance; } @@ -97,6 +118,7 @@ public static ItemShippingTarget deepCopy(@Nullable final ItemShippingTarget tem ItemShippingTargetImpl instance = new ItemShippingTargetImpl(); instance.setAddressKey(template.getAddressKey()); instance.setQuantity(template.getQuantity()); + instance.setShippingMethodKey(template.getShippingMethodKey()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetBuilder.java index c68fcd36cbe..ed2305d16c8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,7 +16,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ItemShippingTarget itemShippingTarget = ItemShippingTarget.builder()
                                                                                                                                                                                                *             .addressKey("{addressKey}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -24,10 +26,13 @@ public class ItemShippingTargetBuilder implements Builder { private String addressKey; - private Integer quantity; + private Long quantity; + + @Nullable + private String shippingMethodKey; /** - *

                                                                                                                                                                                              The key of the address in the cart's itemShippingAddresses

                                                                                                                                                                                              + *

                                                                                                                                                                                              Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

                                                                                                                                                                                              * @param addressKey value to be set * @return Builder */ @@ -38,18 +43,31 @@ public ItemShippingTargetBuilder addressKey(final String addressKey) { } /** - *

                                                                                                                                                                                              The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public ItemShippingTargetBuilder quantity(final Integer quantity) { + public ItemShippingTargetBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - *

                                                                                                                                                                                              The key of the address in the cart's itemShippingAddresses

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It connects Line Item or Custom Line Item quantities with individual Shipping Methods.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + * @return Builder + */ + + public ItemShippingTargetBuilder shippingMethodKey(@Nullable final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + return this; + } + + /** + *

                                                                                                                                                                                              Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

                                                                                                                                                                                              * @return addressKey */ @@ -58,14 +76,26 @@ public String getAddressKey() { } /** - *

                                                                                                                                                                                              The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It connects Line Item or Custom Line Item quantities with individual Shipping Methods.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + + @Nullable + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + /** * builds ItemShippingTarget with checking for non-null required values * @return ItemShippingTarget @@ -73,7 +103,7 @@ public Integer getQuantity() { public ItemShippingTarget build() { Objects.requireNonNull(addressKey, ItemShippingTarget.class + ": addressKey is missing"); Objects.requireNonNull(quantity, ItemShippingTarget.class + ": quantity is missing"); - return new ItemShippingTargetImpl(addressKey, quantity); + return new ItemShippingTargetImpl(addressKey, quantity, shippingMethodKey); } /** @@ -81,7 +111,7 @@ public ItemShippingTarget build() { * @return ItemShippingTarget */ public ItemShippingTarget buildUnchecked() { - return new ItemShippingTargetImpl(addressKey, quantity); + return new ItemShippingTargetImpl(addressKey, quantity, shippingMethodKey); } /** @@ -101,6 +131,7 @@ public static ItemShippingTargetBuilder of(final ItemShippingTarget template) { ItemShippingTargetBuilder builder = new ItemShippingTargetBuilder(); builder.addressKey = template.getAddressKey(); builder.quantity = template.getQuantity(); + builder.shippingMethodKey = template.getShippingMethodKey(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetImpl.java index cc464846426..133b2cb38c0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemShippingTargetImpl.java @@ -17,23 +17,28 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ItemShippingTarget + *

                                                                                                                                                                                              Determines the address (as a reference to an address in itemShippingAddresses) and the quantity shipped to the address.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified. An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ItemShippingTargetImpl implements ItemShippingTarget, ModelBase { private String addressKey; - private Integer quantity; + private Long quantity; + + private String shippingMethodKey; /** * create instance with all properties */ @JsonCreator ItemShippingTargetImpl(@JsonProperty("addressKey") final String addressKey, - @JsonProperty("quantity") final Integer quantity) { + @JsonProperty("quantity") final Long quantity, + @JsonProperty("shippingMethodKey") final String shippingMethodKey) { this.addressKey = addressKey; this.quantity = quantity; + this.shippingMethodKey = shippingMethodKey; } /** @@ -43,7 +48,7 @@ public ItemShippingTargetImpl() { } /** - *

                                                                                                                                                                                              The key of the address in the cart's itemShippingAddresses

                                                                                                                                                                                              + *

                                                                                                                                                                                              Key of the address in the Cart itemShippingAddresses. Duplicate address keys are not allowed.

                                                                                                                                                                                              */ public String getAddressKey() { @@ -51,21 +56,35 @@ public String getAddressKey() { } /** - *

                                                                                                                                                                                              The quantity of items that should go to the address with the specified addressKey. Only positive values are allowed. Using 0 as quantity is also possible in a draft object, but the element will not be present in the resulting ItemShippingDetails.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Quantity of Line Items or Custom Line Items shipped to the address with the specified addressKey.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If a quantity is updated to 0 when defining ItemShippingDetailsDraft, the targets are removed from a Line Item or Custom Line Item in the resulting ItemShippingDetails.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + *

                                                                                                                                                                                              It connects Line Item or Custom Line Item quantities with individual Shipping Methods.

                                                                                                                                                                                              + */ + + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + public void setAddressKey(final String addressKey) { this.addressKey = addressKey; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } + public void setShippingMethodKey(final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + } + @Override public boolean equals(Object o) { if (this == o) @@ -78,20 +97,23 @@ public boolean equals(Object o) { return new EqualsBuilder().append(addressKey, that.addressKey) .append(quantity, that.quantity) + .append(shippingMethodKey, that.shippingMethodKey) .append(addressKey, that.addressKey) .append(quantity, that.quantity) + .append(shippingMethodKey, that.shippingMethodKey) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(addressKey).append(quantity).toHashCode(); + return new HashCodeBuilder(17, 37).append(addressKey).append(quantity).append(shippingMethodKey).toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("addressKey", addressKey) .append("quantity", quantity) + .append("shippingMethodKey", shippingMethodKey) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemState.java index 4106459f357..b49a38bf616 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemState.java @@ -23,7 +23,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ItemState itemState = ItemState.builder()
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .state(stateBuilder -> stateBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -34,35 +34,35 @@ public interface ItemState { /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in this State.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - * + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @return state */ @NotNull @Valid @JsonProperty("state") - public Reference getState(); + public StateReference getState(); /** - * set quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in this State.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** - * set state + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @param state value to be set */ - public void setState(final Reference state); + public void setState(final StateReference state); /** * factory method @@ -98,7 +98,7 @@ public static ItemState deepCopy(@Nullable final ItemState template) { } ItemStateImpl instance = new ItemStateImpl(); instance.setQuantity(template.getQuantity()); - instance.setState(com.commercetools.history.models.common.Reference.deepCopy(template.getState())); + instance.setState(com.commercetools.history.models.common.StateReference.deepCopy(template.getState())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateBuilder.java index 065a6a82a50..7f9c60c39ff 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateBuilder.java @@ -14,7 +14,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ItemState itemState = ItemState.builder()
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .state(stateBuilder -> stateBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -23,71 +23,71 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ItemStateBuilder implements Builder { - private Integer quantity; + private Long quantity; - private com.commercetools.history.models.common.Reference state; + private com.commercetools.history.models.common.StateReference state; /** - * set the value to the quantity + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in this State.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public ItemStateBuilder quantity(final Integer quantity) { + public ItemStateBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - * set the value to the state using the builder function + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @param builder function to build the state value * @return Builder */ public ItemStateBuilder state( - Function builder) { - this.state = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.state = builder.apply(com.commercetools.history.models.common.StateReferenceBuilder.of()).build(); return this; } /** - * set the value to the state using the builder function + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @param builder function to build the state value * @return Builder */ public ItemStateBuilder withState( - Function builder) { - this.state = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.state = builder.apply(com.commercetools.history.models.common.StateReferenceBuilder.of()); return this; } /** - * set the value to the state + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ - public ItemStateBuilder state(final com.commercetools.history.models.common.Reference state) { + public ItemStateBuilder state(final com.commercetools.history.models.common.StateReference state) { this.state = state; return this; } /** - * value of quantity} + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in this State.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } /** - * value of state} + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              * @return state */ - public com.commercetools.history.models.common.Reference getState() { + public com.commercetools.history.models.common.StateReference getState() { return this.state; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateImpl.java index e318b1b76fc..101f7cf4b2c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ItemStateImpl.java @@ -22,16 +22,16 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ItemStateImpl implements ItemState, ModelBase { - private Integer quantity; + private Long quantity; - private com.commercetools.history.models.common.Reference state; + private com.commercetools.history.models.common.StateReference state; /** * create instance with all properties */ @JsonCreator - ItemStateImpl(@JsonProperty("quantity") final Integer quantity, - @JsonProperty("state") final com.commercetools.history.models.common.Reference state) { + ItemStateImpl(@JsonProperty("quantity") final Long quantity, + @JsonProperty("state") final com.commercetools.history.models.common.StateReference state) { this.quantity = quantity; this.state = state; } @@ -43,26 +43,26 @@ public ItemStateImpl() { } /** - * + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items in this State.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } /** - * + *

                                                                                                                                                                                              State of the Line Items or Custom Line Items in a custom workflow.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getState() { + public com.commercetools.history.models.common.StateReference getState() { return this.state; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } - public void setState(final com.commercetools.history.models.common.Reference state) { + public void setState(final com.commercetools.history.models.common.StateReference state) { this.state = state; } 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 e64d2f9abde..742cd61de65 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 @@ -15,33 +15,25 @@ import jakarta.validation.constraints.NotNull; /** - * KeyReference + *

                                                                                                                                                                                              A KeyReference represents a loose reference to another resource in the same Project identified by the resource's key field. If available, the key is immutable and mandatory. KeyReferences do not support Reference Expansion.

                                                                                                                                                                                              * *
                                                                                                                                                                                              - * Example to create an instance using the builder pattern + * Example to create a subtype instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                              - *     KeyReference keyReference = KeyReference.builder()
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              + *     KeyReference keyReference = KeyReference.associateRoleBuilder()
                                                                                                                                                                                              + *             key("{key}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "typeId", defaultImpl = KeyReferenceImpl.class, visible = true) @JsonDeserialize(as = KeyReferenceImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface KeyReference { /** - * - * @return key - */ - @NotNull - @JsonProperty("key") - public String getKey(); - - /** - * + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              * @return typeId */ @NotNull @@ -49,38 +41,19 @@ public interface KeyReference { public ReferenceTypeId getTypeId(); /** - * set key - * @param key value to be set - */ - - public void setKey(final String key); - - /** - * set typeId - * @param typeId value to be set + *

                                                                                                                                                                                              User-defined unique and immutable key of the referenced resource.

                                                                                                                                                                                              + * @return key */ - - public void setTypeId(final ReferenceTypeId typeId); + @NotNull + @JsonProperty("key") + public String getKey(); /** - * factory method - * @return instance of KeyReference + *

                                                                                                                                                                                              User-defined unique and immutable key of the referenced resource.

                                                                                                                                                                                              + * @param key value to be set */ - public static KeyReference of() { - return new KeyReferenceImpl(); - } - /** - * factory method to create a shallow copy KeyReference - * @param template instance to be copied - * @return copy instance - */ - public static KeyReference of(final KeyReference template) { - KeyReferenceImpl instance = new KeyReferenceImpl(); - instance.setKey(template.getKey()); - instance.setTypeId(template.getTypeId()); - return instance; - } + public void setKey(final String key); public KeyReference copyDeep(); @@ -94,27 +67,37 @@ public static KeyReference deepCopy(@Nullable final KeyReference template) { if (template == null) { return null; } + + if (!(template instanceof KeyReferenceImpl)) { + return template.copyDeep(); + } KeyReferenceImpl instance = new KeyReferenceImpl(); instance.setKey(template.getKey()); - instance.setTypeId(template.getTypeId()); return instance; } /** - * builder factory method for KeyReference + * builder for associateRole subtype + * @return builder + */ + public static com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder associateRoleBuilder() { + return com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of(); + } + + /** + * builder for businessUnit subtype * @return builder */ - public static KeyReferenceBuilder builder() { - return KeyReferenceBuilder.of(); + public static com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder businessUnitBuilder() { + return com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder.of(); } /** - * create builder for KeyReference instance - * @param template instance with prefilled values for the builder + * builder for store subtype * @return builder */ - public static KeyReferenceBuilder builder(final KeyReference template) { - return KeyReferenceBuilder.of(template); + public static com.commercetools.history.models.common.StoreKeyReferenceBuilder storeBuilder() { + return com.commercetools.history.models.common.StoreKeyReferenceBuilder.of(); } /** 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 a46f2e31e98..9d87d9b0158 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 @@ -3,85 +3,24 @@ import java.util.*; -import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; /** * KeyReferenceBuilder - *
                                                                                                                                                                                              - * Example to create an instance using the builder pattern - *
                                                                                                                                                                                              - *
                                                                                                                                                                                              
                                                                                                                                                                                              - *     KeyReference keyReference = KeyReference.builder()
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              - *             .build()
                                                                                                                                                                                              - * 
                                                                                                                                                                                              - *
                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class KeyReferenceBuilder implements Builder { +public class KeyReferenceBuilder { - private String key; - - private com.commercetools.history.models.common.ReferenceTypeId typeId; - - /** - * set the value to the key - * @param key value to be set - * @return Builder - */ - - public KeyReferenceBuilder key(final String key) { - this.key = key; - return this; + public com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder associateRoleBuilder() { + return com.commercetools.history.models.common.AssociateRoleKeyReferenceBuilder.of(); } - /** - * set the value to the typeId - * @param typeId value to be set - * @return Builder - */ - - public KeyReferenceBuilder typeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { - this.typeId = typeId; - return this; + public com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder businessUnitBuilder() { + return com.commercetools.history.models.common.BusinessUnitKeyReferenceBuilder.of(); } - /** - * 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 KeyReference with checking for non-null required values - * @return KeyReference - */ - public KeyReference build() { - Objects.requireNonNull(key, KeyReference.class + ": key is missing"); - Objects.requireNonNull(typeId, KeyReference.class + ": typeId is missing"); - return new KeyReferenceImpl(key, typeId); - } - - /** - * builds KeyReference without checking for non-null required values - * @return KeyReference - */ - public KeyReference buildUnchecked() { - return new KeyReferenceImpl(key, typeId); + public com.commercetools.history.models.common.StoreKeyReferenceBuilder storeBuilder() { + return com.commercetools.history.models.common.StoreKeyReferenceBuilder.of(); } /** @@ -92,16 +31,4 @@ public static KeyReferenceBuilder of() { return new KeyReferenceBuilder(); } - /** - * create builder for KeyReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static KeyReferenceBuilder of(final KeyReference template) { - KeyReferenceBuilder builder = new KeyReferenceBuilder(); - 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/KeyReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceImpl.java index b362d9d40ea..cedb209a35f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/KeyReferenceImpl.java @@ -17,23 +17,23 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * KeyReference + *

                                                                                                                                                                                              A KeyReference represents a loose reference to another resource in the same Project identified by the resource's key field. If available, the key is immutable and mandatory. KeyReferences do not support Reference Expansion.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class KeyReferenceImpl implements KeyReference, ModelBase { - private String key; - private com.commercetools.history.models.common.ReferenceTypeId typeId; + private String key; + /** * create instance with all properties */ @JsonCreator - KeyReferenceImpl(@JsonProperty("key") final String key, - @JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId) { - this.key = key; + KeyReferenceImpl(@JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId, + @JsonProperty("key") final String key) { this.typeId = typeId; + this.key = key; } /** @@ -43,29 +43,25 @@ public KeyReferenceImpl() { } /** - * + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              */ - public String getKey() { - return this.key; + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; } /** - * + *

                                                                                                                                                                                              User-defined unique and immutable key of the referenced resource.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { - return this.typeId; + public String getKey() { + return this.key; } 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) @@ -76,22 +72,22 @@ public boolean equals(Object o) { KeyReferenceImpl that = (KeyReferenceImpl) o; - return new EqualsBuilder().append(key, that.key) - .append(typeId, that.typeId) + return new EqualsBuilder().append(typeId, that.typeId) .append(key, that.key) .append(typeId, that.typeId) + .append(key, that.key) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(key).append(typeId).toHashCode(); + return new HashCodeBuilder(17, 37).append(typeId).append(key).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) - .append("typeId", typeId) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("key", key) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItem.java index 2d235ecd22e..0e7a2a3e57d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItem.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItem.java @@ -2,8 +2,10 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -16,23 +18,27 @@ import jakarta.validation.constraints.NotNull; /** - * LineItem + *

                                                                                                                                                                                              The representation of a Line Item in a Cart or in an Order.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     LineItem lineItem = LineItem.builder()
                                                                                                                                                                                              - *             .addedAt("{addedAt}")
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                                *             .productId("{productId}")
                                                                                                                                                                                              - *             .productSlug(productSlugBuilder -> productSlugBuilder)
                                                                                                                                                                                              + *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                                *             .productType(productTypeBuilder -> productTypeBuilder)
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                                *             .variant(variantBuilder -> variantBuilder)
                                                                                                                                                                                              - *             .variantId(1)
                                                                                                                                                                                              + *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                              + *             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
                                                                                                                                                                                              + *             .plusDiscountedPricePerQuantity(discountedPricePerQuantityBuilder -> discountedPricePerQuantityBuilder)
                                                                                                                                                                                              + *             .plusTaxedPricePortions(taxedPricePortionsBuilder -> taxedPricePortionsBuilder)
                                                                                                                                                                                              + *             .plusState(stateBuilder -> stateBuilder)
                                                                                                                                                                                              + *             .plusPerMethodTaxRate(perMethodTaxRateBuilder -> perMethodTaxRateBuilder)
                                                                                                                                                                                              + *             .priceMode(LineItemPriceMode.PLATFORM)
                                                                                                                                                                                              + *             .lineItemMode(LineItemMode.STANDARD)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -42,32 +48,45 @@ public interface LineItem { /** - * - * @return addedAt + *

                                                                                                                                                                                              Unique identifier of the LineItem.

                                                                                                                                                                                              + * @return id */ @NotNull - @JsonProperty("addedAt") - public String getAddedAt(); + @JsonProperty("id") + public String getId(); /** - * - * @return custom + *

                                                                                                                                                                                              User-defined unique identifier of the LineItem.

                                                                                                                                                                                              + * @return key */ - @NotNull - @Valid - @JsonProperty("custom") - public CustomFields getCustom(); + + @JsonProperty("key") + public String getKey(); /** - * - * @return id + *

                                                                                                                                                                                              id of the Product the Line Item is based on.

                                                                                                                                                                                              + * @return productId */ @NotNull - @JsonProperty("id") - public String getId(); + @JsonProperty("productId") + public String getProductId(); + + /** + *

                                                                                                                                                                                              key of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field is only present on:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Line Items in a Cart when the key is available on that specific Product at the time the LineItem was created or updated on the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • Line Items in an Order when the key is available on the specific Product at the time the Order was created from the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + *

                                                                                                                                                                                              Present on resources created or updated after 3 December 2021.

                                                                                                                                                                                              + * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); /** - * + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              * @return name */ @NotNull @@ -76,125 +95,426 @@ public interface LineItem { public LocalizedString getName(); /** - * - * @return productId - */ - @NotNull - @JsonProperty("productId") - public String getProductId(); - - /** - * + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              * @return productSlug */ - @NotNull @Valid @JsonProperty("productSlug") public LocalizedString getProductSlug(); /** - * + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              * @return productType */ @NotNull @Valid @JsonProperty("productType") - public Reference getProductType(); + public ProductTypeReference getProductType(); + + /** + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @return variant + */ + @NotNull + @Valid + @JsonProperty("variant") + public ProductVariant getVariant(); + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @return price + */ + @NotNull + @Valid + @JsonProperty("price") + public Price getPrice(); /** - * + *

                                                                                                                                                                                              Number of Line Items of the given Product Variant present in the Cart or Order.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - * - * @return variant + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @return totalPrice */ @NotNull @Valid - @JsonProperty("variant") - public Variant getVariant(); + @JsonProperty("totalPrice") + public CentPrecisionMoney getTotalPrice(); /** - * - * @return variantId + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @return discountedPricePerQuantity */ @NotNull - @JsonProperty("variantId") - public Integer getVariantId(); + @Valid + @JsonProperty("discountedPricePerQuantity") + public List getDiscountedPricePerQuantity(); /** - * set addedAt - * @param addedAt value to be set + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @return taxedPrice */ + @Valid + @JsonProperty("taxedPrice") + public TaxedItemPrice getTaxedPrice(); - public void setAddedAt(final String addedAt); + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @return taxedPricePortions + */ + @NotNull + @Valid + @JsonProperty("taxedPricePortions") + public List getTaxedPricePortions(); /** - * set custom - * @param custom value to be set + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @return state */ + @NotNull + @Valid + @JsonProperty("state") + public List getState(); - public void setCustom(final CustomFields custom); + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return taxRate + */ + @Valid + @JsonProperty("taxRate") + public TaxRate getTaxRate(); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return perMethodTaxRate + */ + @NotNull + @Valid + @JsonProperty("perMethodTaxRate") + public List getPerMethodTaxRate(); + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @return supplyChannel + */ + @Valid + @JsonProperty("supplyChannel") + public ChannelReference getSupplyChannel(); + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @return distributionChannel + */ + @Valid + @JsonProperty("distributionChannel") + public ChannelReference getDistributionChannel(); + + /** + *

                                                                                                                                                                                              Indicates how the Price for the Line Item is set.

                                                                                                                                                                                              + * @return priceMode + */ + @NotNull + @JsonProperty("priceMode") + public LineItemPriceMode getPriceMode(); + + /** + *

                                                                                                                                                                                              Indicates how the Line Item is added to the Cart.

                                                                                                                                                                                              + * @return lineItemMode + */ + @NotNull + @JsonProperty("lineItemMode") + public LineItemMode getLineItemMode(); + + /** + *

                                                                                                                                                                                              Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

                                                                                                                                                                                              + * @return inventoryMode + */ + + @JsonProperty("inventoryMode") + public InventoryMode getInventoryMode(); /** - * set id + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @return shippingDetails + */ + @Valid + @JsonProperty("shippingDetails") + public ItemShippingDetails getShippingDetails(); + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was added to the Cart.

                                                                                                                                                                                              + * @return addedAt + */ + + @JsonProperty("addedAt") + public ZonedDateTime getAddedAt(); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was last updated.

                                                                                                                                                                                              + * @return lastModifiedAt + */ + + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @return recurrenceInfo + */ + @Valid + @JsonProperty("recurrenceInfo") + public LineItemRecurrenceInfo getRecurrenceInfo(); + + /** + *

                                                                                                                                                                                              Unique identifier of the LineItem.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set name - * @param name value to be set + *

                                                                                                                                                                                              User-defined unique identifier of the LineItem.

                                                                                                                                                                                              + * @param key value to be set */ - public void setName(final LocalizedString name); + public void setKey(final String key); /** - * set productId + *

                                                                                                                                                                                              id of the Product the Line Item is based on.

                                                                                                                                                                                              * @param productId value to be set */ public void setProductId(final String productId); /** - * set productSlug + *

                                                                                                                                                                                              key of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field is only present on:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Line Items in a Cart when the key is available on that specific Product at the time the LineItem was created or updated on the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • Line Items in an Order when the key is available on the specific Product at the time the Order was created from the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + *

                                                                                                                                                                                              Present on resources created or updated after 3 December 2021.

                                                                                                                                                                                              + * @param productKey value to be set + */ + + public void setProductKey(final String productKey); + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              * @param productSlug value to be set */ public void setProductSlug(final LocalizedString productSlug); /** - * set productType + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              * @param productType value to be set */ - public void setProductType(final Reference productType); + public void setProductType(final ProductTypeReference productType); + + /** + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @param variant value to be set + */ + + public void setVariant(final ProductVariant variant); /** - * set quantity + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @param price value to be set + */ + + public void setPrice(final Price price); + + /** + *

                                                                                                                                                                                              Number of Line Items of the given Product Variant present in the Cart or Order.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** - * set variant - * @param variant value to be set + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @param totalPrice value to be set + */ + + public void setTotalPrice(final CentPrecisionMoney totalPrice); + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity values to be set + */ + + @JsonIgnore + public void setDiscountedPricePerQuantity(final DiscountedLineItemPriceForQuantity... discountedPricePerQuantity); + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity values to be set + */ + + public void setDiscountedPricePerQuantity( + final List discountedPricePerQuantity); + + /** + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @param taxedPrice value to be set + */ + + public void setTaxedPrice(final TaxedItemPrice taxedPrice); + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions values to be set + */ + + @JsonIgnore + public void setTaxedPricePortions(final MethodTaxedPrice... taxedPricePortions); + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions values to be set + */ + + public void setTaxedPricePortions(final List taxedPricePortions); + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state values to be set + */ + + @JsonIgnore + public void setState(final ItemState... state); + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state values to be set + */ + + public void setState(final List state); + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param taxRate value to be set + */ + + public void setTaxRate(final TaxRate taxRate); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate values to be set + */ + + @JsonIgnore + public void setPerMethodTaxRate(final MethodTaxRate... perMethodTaxRate); + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate values to be set + */ + + public void setPerMethodTaxRate(final List perMethodTaxRate); + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @param supplyChannel value to be set + */ + + public void setSupplyChannel(final ChannelReference supplyChannel); + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @param distributionChannel value to be set + */ + + public void setDistributionChannel(final ChannelReference distributionChannel); + + /** + *

                                                                                                                                                                                              Indicates how the Price for the Line Item is set.

                                                                                                                                                                                              + * @param priceMode value to be set + */ + + public void setPriceMode(final LineItemPriceMode priceMode); + + /** + *

                                                                                                                                                                                              Indicates how the Line Item is added to the Cart.

                                                                                                                                                                                              + * @param lineItemMode value to be set + */ + + public void setLineItemMode(final LineItemMode lineItemMode); + + /** + *

                                                                                                                                                                                              Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

                                                                                                                                                                                              + * @param inventoryMode value to be set + */ + + public void setInventoryMode(final InventoryMode inventoryMode); + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @param shippingDetails value to be set + */ + + public void setShippingDetails(final ItemShippingDetails shippingDetails); + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was added to the Cart.

                                                                                                                                                                                              + * @param addedAt value to be set + */ + + public void setAddedAt(final ZonedDateTime addedAt); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was last updated.

                                                                                                                                                                                              + * @param lastModifiedAt value to be set */ - public void setVariant(final Variant variant); + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); /** - * set variantId - * @param variantId value to be set + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param recurrenceInfo value to be set */ - public void setVariantId(final Integer variantId); + public void setRecurrenceInfo(final LineItemRecurrenceInfo recurrenceInfo); /** * factory method @@ -211,16 +531,33 @@ public static LineItem of() { */ public static LineItem of(final LineItem template) { LineItemImpl instance = new LineItemImpl(); - instance.setAddedAt(template.getAddedAt()); - instance.setCustom(template.getCustom()); instance.setId(template.getId()); - instance.setName(template.getName()); + instance.setKey(template.getKey()); instance.setProductId(template.getProductId()); + instance.setProductKey(template.getProductKey()); + instance.setName(template.getName()); instance.setProductSlug(template.getProductSlug()); instance.setProductType(template.getProductType()); - instance.setQuantity(template.getQuantity()); instance.setVariant(template.getVariant()); - instance.setVariantId(template.getVariantId()); + instance.setPrice(template.getPrice()); + instance.setQuantity(template.getQuantity()); + instance.setTotalPrice(template.getTotalPrice()); + instance.setDiscountedPricePerQuantity(template.getDiscountedPricePerQuantity()); + instance.setTaxedPrice(template.getTaxedPrice()); + instance.setTaxedPricePortions(template.getTaxedPricePortions()); + instance.setState(template.getState()); + instance.setTaxRate(template.getTaxRate()); + instance.setPerMethodTaxRate(template.getPerMethodTaxRate()); + instance.setSupplyChannel(template.getSupplyChannel()); + instance.setDistributionChannel(template.getDistributionChannel()); + instance.setPriceMode(template.getPriceMode()); + instance.setLineItemMode(template.getLineItemMode()); + instance.setInventoryMode(template.getInventoryMode()); + instance.setShippingDetails(template.getShippingDetails()); + instance.setCustom(template.getCustom()); + instance.setAddedAt(template.getAddedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRecurrenceInfo(template.getRecurrenceInfo()); return instance; } @@ -237,17 +574,57 @@ public static LineItem deepCopy(@Nullable final LineItem template) { return null; } LineItemImpl instance = new LineItemImpl(); - instance.setAddedAt(template.getAddedAt()); - instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); instance.setId(template.getId()); - instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); + instance.setKey(template.getKey()); instance.setProductId(template.getProductId()); + instance.setProductKey(template.getProductKey()); + instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); instance.setProductSlug( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getProductSlug())); - instance.setProductType(com.commercetools.history.models.common.Reference.deepCopy(template.getProductType())); + instance.setProductType( + com.commercetools.history.models.common.ProductTypeReference.deepCopy(template.getProductType())); + instance.setVariant(com.commercetools.history.models.common.ProductVariant.deepCopy(template.getVariant())); + instance.setPrice(com.commercetools.history.models.common.Price.deepCopy(template.getPrice())); instance.setQuantity(template.getQuantity()); - instance.setVariant(com.commercetools.history.models.common.Variant.deepCopy(template.getVariant())); - instance.setVariantId(template.getVariantId()); + instance.setTotalPrice( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalPrice())); + instance.setDiscountedPricePerQuantity(Optional.ofNullable(template.getDiscountedPricePerQuantity()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTaxedPrice( + com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getTaxedPrice())); + instance.setTaxedPricePortions(Optional.ofNullable(template.getTaxedPricePortions()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.MethodTaxedPrice::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setState(Optional.ofNullable(template.getState()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.ItemState::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTaxRate(com.commercetools.history.models.common.TaxRate.deepCopy(template.getTaxRate())); + instance.setPerMethodTaxRate(Optional.ofNullable(template.getPerMethodTaxRate()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.MethodTaxRate::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setSupplyChannel( + com.commercetools.history.models.common.ChannelReference.deepCopy(template.getSupplyChannel())); + instance.setDistributionChannel( + com.commercetools.history.models.common.ChannelReference.deepCopy(template.getDistributionChannel())); + instance.setPriceMode(template.getPriceMode()); + instance.setLineItemMode(template.getLineItemMode()); + instance.setInventoryMode(template.getInventoryMode()); + instance.setShippingDetails( + com.commercetools.history.models.common.ItemShippingDetails.deepCopy(template.getShippingDetails())); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); + instance.setAddedAt(template.getAddedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRecurrenceInfo( + com.commercetools.history.models.common.LineItemRecurrenceInfo.deepCopy(template.getRecurrenceInfo())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemBuilder.java index 556c553a7ff..cc8748f7928 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,16 +16,20 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     LineItem lineItem = LineItem.builder()
                                                                                                                                                                                              - *             .addedAt("{addedAt}")
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                                *             .productId("{productId}")
                                                                                                                                                                                              - *             .productSlug(productSlugBuilder -> productSlugBuilder)
                                                                                                                                                                                              + *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                                *             .productType(productTypeBuilder -> productTypeBuilder)
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                                *             .variant(variantBuilder -> variantBuilder)
                                                                                                                                                                                              - *             .variantId(1)
                                                                                                                                                                                              + *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                              + *             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
                                                                                                                                                                                              + *             .plusDiscountedPricePerQuantity(discountedPricePerQuantityBuilder -> discountedPricePerQuantityBuilder)
                                                                                                                                                                                              + *             .plusTaxedPricePortions(taxedPricePortionsBuilder -> taxedPricePortionsBuilder)
                                                                                                                                                                                              + *             .plusState(stateBuilder -> stateBuilder)
                                                                                                                                                                                              + *             .plusPerMethodTaxRate(perMethodTaxRateBuilder -> perMethodTaxRateBuilder)
                                                                                                                                                                                              + *             .priceMode(LineItemPriceMode.PLATFORM)
                                                                                                                                                                                              + *             .lineItemMode(LineItemMode.STANDARD)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -31,85 +37,125 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LineItemBuilder implements Builder { - private String addedAt; - - private com.commercetools.history.models.common.CustomFields custom; - private String id; - private com.commercetools.history.models.common.LocalizedString name; + @Nullable + private String key; private String productId; + @Nullable + private String productKey; + + private com.commercetools.history.models.common.LocalizedString name; + + @Nullable private com.commercetools.history.models.common.LocalizedString productSlug; - private com.commercetools.history.models.common.Reference productType; + private com.commercetools.history.models.common.ProductTypeReference productType; - private Integer quantity; + private com.commercetools.history.models.common.ProductVariant variant; - private com.commercetools.history.models.common.Variant variant; + private com.commercetools.history.models.common.Price price; - private Integer variantId; + private Long quantity; - /** - * set the value to the addedAt - * @param addedAt value to be set - * @return Builder - */ + private com.commercetools.history.models.common.CentPrecisionMoney totalPrice; - public LineItemBuilder addedAt(final String addedAt) { - this.addedAt = addedAt; - return this; - } + private java.util.List discountedPricePerQuantity; + + @Nullable + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + private java.util.List taxedPricePortions; + + private java.util.List state; + + @Nullable + private com.commercetools.history.models.common.TaxRate taxRate; + + private java.util.List perMethodTaxRate; + + @Nullable + private com.commercetools.history.models.common.ChannelReference supplyChannel; + + @Nullable + private com.commercetools.history.models.common.ChannelReference distributionChannel; + + private com.commercetools.history.models.common.LineItemPriceMode priceMode; + + private com.commercetools.history.models.common.LineItemMode lineItemMode; + + @Nullable + private com.commercetools.history.models.common.InventoryMode inventoryMode; + + @Nullable + private com.commercetools.history.models.common.ItemShippingDetails shippingDetails; + + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + @Nullable + private java.time.ZonedDateTime addedAt; + + @Nullable + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.history.models.common.LineItemRecurrenceInfo recurrenceInfo; /** - * set the value to the custom using the builder function - * @param builder function to build the custom value + *

                                                                                                                                                                                              Unique identifier of the LineItem.

                                                                                                                                                                                              + * @param id value to be set * @return Builder */ - public LineItemBuilder custom( - Function builder) { - this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + public LineItemBuilder id(final String id) { + this.id = id; return this; } /** - * set the value to the custom using the builder function - * @param builder function to build the custom value + *

                                                                                                                                                                                              User-defined unique identifier of the LineItem.

                                                                                                                                                                                              + * @param key value to be set * @return Builder */ - public LineItemBuilder withCustom( - Function builder) { - this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + public LineItemBuilder key(@Nullable final String key) { + this.key = key; return this; } /** - * set the value to the custom - * @param custom value to be set + *

                                                                                                                                                                                              id of the Product the Line Item is based on.

                                                                                                                                                                                              + * @param productId value to be set * @return Builder */ - public LineItemBuilder custom(final com.commercetools.history.models.common.CustomFields custom) { - this.custom = custom; + public LineItemBuilder productId(final String productId) { + this.productId = productId; return this; } /** - * set the value to the id - * @param id value to be set + *

                                                                                                                                                                                              key of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field is only present on:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Line Items in a Cart when the key is available on that specific Product at the time the LineItem was created or updated on the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • Line Items in an Order when the key is available on the specific Product at the time the Order was created from the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + *

                                                                                                                                                                                              Present on resources created or updated after 3 December 2021.

                                                                                                                                                                                              + * @param productKey value to be set * @return Builder */ - public LineItemBuilder id(final String id) { - this.id = id; + public LineItemBuilder productKey(@Nullable final String productKey) { + this.productKey = productKey; return this; } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -121,7 +167,7 @@ public LineItemBuilder name( } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -133,7 +179,7 @@ public LineItemBuilder withName( } /** - * set the value to the name + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -144,18 +190,7 @@ public LineItemBuilder name(final com.commercetools.history.models.common.Locali } /** - * set the value to the productId - * @param productId value to be set - * @return Builder - */ - - public LineItemBuilder productId(final String productId) { - this.productId = productId; - return this; - } - - /** - * set the value to the productSlug using the builder function + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              * @param builder function to build the productSlug value * @return Builder */ @@ -167,7 +202,7 @@ public LineItemBuilder productSlug( } /** - * set the value to the productSlug using the builder function + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              * @param builder function to build the productSlug value * @return Builder */ @@ -179,251 +214,1203 @@ public LineItemBuilder withProductSlug( } /** - * set the value to the productSlug + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              * @param productSlug value to be set * @return Builder */ - public LineItemBuilder productSlug(final com.commercetools.history.models.common.LocalizedString productSlug) { + public LineItemBuilder productSlug( + @Nullable final com.commercetools.history.models.common.LocalizedString productSlug) { this.productSlug = productSlug; return this; } /** - * set the value to the productType using the builder function + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              * @param builder function to build the productType value * @return Builder */ public LineItemBuilder productType( - Function builder) { - this.productType = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.productType = builder.apply(com.commercetools.history.models.common.ProductTypeReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the productType using the builder function + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              * @param builder function to build the productType value * @return Builder */ public LineItemBuilder withProductType( - Function builder) { - this.productType = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.productType = builder.apply(com.commercetools.history.models.common.ProductTypeReferenceBuilder.of()); return this; } /** - * set the value to the productType + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              * @param productType value to be set * @return Builder */ - public LineItemBuilder productType(final com.commercetools.history.models.common.Reference productType) { + public LineItemBuilder productType(final com.commercetools.history.models.common.ProductTypeReference productType) { this.productType = productType; return this; } /** - * set the value to the quantity + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @param builder function to build the variant value + * @return Builder + */ + + public LineItemBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.history.models.common.ProductVariantBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @param builder function to build the variant value + * @return Builder + */ + + public LineItemBuilder withVariant( + Function builder) { + this.variant = builder.apply(com.commercetools.history.models.common.ProductVariantBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @param variant value to be set + * @return Builder + */ + + public LineItemBuilder variant(final com.commercetools.history.models.common.ProductVariant variant) { + this.variant = variant; + return this; + } + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public LineItemBuilder price( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public LineItemBuilder withPrice( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @param price value to be set + * @return Builder + */ + + public LineItemBuilder price(final com.commercetools.history.models.common.Price price) { + this.price = price; + return this; + } + + /** + *

                                                                                                                                                                                              Number of Line Items of the given Product Variant present in the Cart or Order.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public LineItemBuilder quantity(final Integer quantity) { + public LineItemBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - * set the value to the variant using the builder function - * @param builder function to build the variant value + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @param builder function to build the totalPrice value * @return Builder */ - public LineItemBuilder variant( - Function builder) { - this.variant = builder.apply(com.commercetools.history.models.common.VariantBuilder.of()).build(); + public LineItemBuilder totalPrice( + Function builder) { + this.totalPrice = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the variant using the builder function - * @param builder function to build the variant value + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @param builder function to build the totalPrice value * @return Builder */ - public LineItemBuilder withVariant( - Function builder) { - this.variant = builder.apply(com.commercetools.history.models.common.VariantBuilder.of()); + public LineItemBuilder withTotalPrice( + Function builder) { + this.totalPrice = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the variant - * @param variant value to be set + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @param totalPrice value to be set * @return Builder */ - public LineItemBuilder variant(final com.commercetools.history.models.common.Variant variant) { - this.variant = variant; + public LineItemBuilder totalPrice(final com.commercetools.history.models.common.CentPrecisionMoney totalPrice) { + this.totalPrice = totalPrice; return this; } /** - * set the value to the variantId - * @param variantId value to be set + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set * @return Builder */ - public LineItemBuilder variantId(final Integer variantId) { - this.variantId = variantId; + public LineItemBuilder discountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + this.discountedPricePerQuantity = new ArrayList<>(Arrays.asList(discountedPricePerQuantity)); return this; } /** - * value of addedAt} - * @return addedAt + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set + * @return Builder */ - public String getAddedAt() { - return this.addedAt; + public LineItemBuilder discountedPricePerQuantity( + final java.util.List discountedPricePerQuantity) { + this.discountedPricePerQuantity = discountedPricePerQuantity; + return this; } /** - * value of custom} - * @return custom + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param discountedPricePerQuantity value to be set + * @return Builder */ - public com.commercetools.history.models.common.CustomFields getCustom() { - return this.custom; + public LineItemBuilder plusDiscountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + if (this.discountedPricePerQuantity == null) { + this.discountedPricePerQuantity = new ArrayList<>(); + } + this.discountedPricePerQuantity.addAll(Arrays.asList(discountedPricePerQuantity)); + return this; } /** - * value of id} - * @return id + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder */ - public String getId() { - return this.id; + public LineItemBuilder plusDiscountedPricePerQuantity( + Function builder) { + if (this.discountedPricePerQuantity == null) { + this.discountedPricePerQuantity = new ArrayList<>(); + } + this.discountedPricePerQuantity.add( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of()) + .build()); + return this; } /** - * value of name} - * @return name + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder */ - public com.commercetools.history.models.common.LocalizedString getName() { - return this.name; + public LineItemBuilder withDiscountedPricePerQuantity( + Function builder) { + this.discountedPricePerQuantity = new ArrayList<>(); + this.discountedPricePerQuantity.add( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of()) + .build()); + return this; } /** - * value of productId} - * @return productId + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder */ - public String getProductId() { - return this.productId; + public LineItemBuilder addDiscountedPricePerQuantity( + Function builder) { + return plusDiscountedPricePerQuantity( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of())); } /** - * value of productSlug} - * @return productSlug + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the discountedPricePerQuantity value + * @return Builder */ - public com.commercetools.history.models.common.LocalizedString getProductSlug() { - return this.productSlug; + public LineItemBuilder setDiscountedPricePerQuantity( + Function builder) { + return discountedPricePerQuantity( + builder.apply(com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityBuilder.of())); } /** - * value of productType} - * @return productType + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder */ - public com.commercetools.history.models.common.Reference getProductType() { - return this.productType; + public LineItemBuilder taxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); + return this; } /** - * value of quantity} - * @return quantity + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder */ - public Integer getQuantity() { - return this.quantity; + public LineItemBuilder withTaxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); + return this; } /** - * value of variant} - * @return variant + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @param taxedPrice value to be set + * @return Builder */ - public com.commercetools.history.models.common.Variant getVariant() { - return this.variant; + public LineItemBuilder taxedPrice( + @Nullable final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + return this; } /** - * value of variantId} - * @return variantId + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder */ - public Integer getVariantId() { - return this.variantId; + public LineItemBuilder taxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + this.taxedPricePortions = new ArrayList<>(Arrays.asList(taxedPricePortions)); + return this; } /** - * builds LineItem with checking for non-null required values - * @return LineItem + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder */ - public LineItem build() { - Objects.requireNonNull(addedAt, LineItem.class + ": addedAt is missing"); - Objects.requireNonNull(custom, LineItem.class + ": custom is missing"); - Objects.requireNonNull(id, LineItem.class + ": id is missing"); - Objects.requireNonNull(name, LineItem.class + ": name is missing"); - Objects.requireNonNull(productId, LineItem.class + ": productId is missing"); - Objects.requireNonNull(productSlug, LineItem.class + ": productSlug is missing"); - Objects.requireNonNull(productType, LineItem.class + ": productType is missing"); - Objects.requireNonNull(quantity, LineItem.class + ": quantity is missing"); - Objects.requireNonNull(variant, LineItem.class + ": variant is missing"); - Objects.requireNonNull(variantId, LineItem.class + ": variantId is missing"); - return new LineItemImpl(addedAt, custom, id, name, productId, productSlug, productType, quantity, variant, - variantId); + + public LineItemBuilder taxedPricePortions( + final java.util.List taxedPricePortions) { + this.taxedPricePortions = taxedPricePortions; + return this; } /** - * builds LineItem without checking for non-null required values - * @return LineItem + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param taxedPricePortions value to be set + * @return Builder */ - public LineItem buildUnchecked() { - return new LineItemImpl(addedAt, custom, id, name, productId, productSlug, productType, quantity, variant, - variantId); + + public LineItemBuilder plusTaxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + if (this.taxedPricePortions == null) { + this.taxedPricePortions = new ArrayList<>(); + } + this.taxedPricePortions.addAll(Arrays.asList(taxedPricePortions)); + return this; } /** - * factory method for an instance of LineItemBuilder - * @return builder + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder */ - public static LineItemBuilder of() { - return new LineItemBuilder(); + + public LineItemBuilder plusTaxedPricePortions( + Function builder) { + if (this.taxedPricePortions == null) { + this.taxedPricePortions = new ArrayList<>(); + } + this.taxedPricePortions + .add(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of()).build()); + return this; } /** - * create builder for LineItem instance - * @param template instance with prefilled values for the builder - * @return builder + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder */ - public static LineItemBuilder of(final LineItem template) { - LineItemBuilder builder = new LineItemBuilder(); - builder.addedAt = template.getAddedAt(); - builder.custom = template.getCustom(); - builder.id = template.getId(); - builder.name = template.getName(); - builder.productId = template.getProductId(); - builder.productSlug = template.getProductSlug(); - builder.productType = template.getProductType(); - builder.quantity = template.getQuantity(); - builder.variant = template.getVariant(); - builder.variantId = template.getVariantId(); + + public LineItemBuilder withTaxedPricePortions( + Function builder) { + this.taxedPricePortions = new ArrayList<>(); + this.taxedPricePortions + .add(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public LineItemBuilder addTaxedPricePortions( + Function builder) { + return plusTaxedPricePortions( + builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPricePortions value + * @return Builder + */ + + public LineItemBuilder setTaxedPricePortions( + Function builder) { + return taxedPricePortions(builder.apply(com.commercetools.history.models.common.MethodTaxedPriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public LineItemBuilder state(final com.commercetools.history.models.common.ItemState... state) { + this.state = new ArrayList<>(Arrays.asList(state)); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public LineItemBuilder state(final java.util.List state) { + this.state = state; + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param state value to be set + * @return Builder + */ + + public LineItemBuilder plusState(final com.commercetools.history.models.common.ItemState... state) { + if (this.state == null) { + this.state = new ArrayList<>(); + } + this.state.addAll(Arrays.asList(state)); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public LineItemBuilder plusState( + Function builder) { + if (this.state == null) { + this.state = new ArrayList<>(); + } + this.state.add(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public LineItemBuilder withState( + Function builder) { + this.state = new ArrayList<>(); + this.state.add(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public LineItemBuilder addState( + Function builder) { + return plusState(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @param builder function to build the state value + * @return Builder + */ + + public LineItemBuilder setState( + Function builder) { + return state(builder.apply(com.commercetools.history.models.common.ItemStateBuilder.of())); + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public LineItemBuilder taxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()).build(); + return this; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public LineItemBuilder withTaxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()); + return this; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param taxRate value to be set + * @return Builder + */ + + public LineItemBuilder taxRate(@Nullable final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public LineItemBuilder perMethodTaxRate( + final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + this.perMethodTaxRate = new ArrayList<>(Arrays.asList(perMethodTaxRate)); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public LineItemBuilder perMethodTaxRate( + final java.util.List perMethodTaxRate) { + this.perMethodTaxRate = perMethodTaxRate; + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param perMethodTaxRate value to be set + * @return Builder + */ + + public LineItemBuilder plusPerMethodTaxRate( + final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + if (this.perMethodTaxRate == null) { + this.perMethodTaxRate = new ArrayList<>(); + } + this.perMethodTaxRate.addAll(Arrays.asList(perMethodTaxRate)); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public LineItemBuilder plusPerMethodTaxRate( + Function builder) { + if (this.perMethodTaxRate == null) { + this.perMethodTaxRate = new ArrayList<>(); + } + this.perMethodTaxRate + .add(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public LineItemBuilder withPerMethodTaxRate( + Function builder) { + this.perMethodTaxRate = new ArrayList<>(); + this.perMethodTaxRate + .add(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public LineItemBuilder addPerMethodTaxRate( + Function builder) { + return plusPerMethodTaxRate(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the perMethodTaxRate value + * @return Builder + */ + + public LineItemBuilder setPerMethodTaxRate( + Function builder) { + return perMethodTaxRate(builder.apply(com.commercetools.history.models.common.MethodTaxRateBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @param builder function to build the supplyChannel value + * @return Builder + */ + + public LineItemBuilder supplyChannel( + Function builder) { + this.supplyChannel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @param builder function to build the supplyChannel value + * @return Builder + */ + + public LineItemBuilder withSupplyChannel( + Function builder) { + this.supplyChannel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @param supplyChannel value to be set + * @return Builder + */ + + public LineItemBuilder supplyChannel( + @Nullable final com.commercetools.history.models.common.ChannelReference supplyChannel) { + this.supplyChannel = supplyChannel; + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @param builder function to build the distributionChannel value + * @return Builder + */ + + public LineItemBuilder distributionChannel( + Function builder) { + this.distributionChannel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @param builder function to build the distributionChannel value + * @return Builder + */ + + public LineItemBuilder withDistributionChannel( + Function builder) { + this.distributionChannel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @param distributionChannel value to be set + * @return Builder + */ + + public LineItemBuilder distributionChannel( + @Nullable final com.commercetools.history.models.common.ChannelReference distributionChannel) { + this.distributionChannel = distributionChannel; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates how the Price for the Line Item is set.

                                                                                                                                                                                              + * @param priceMode value to be set + * @return Builder + */ + + public LineItemBuilder priceMode(final com.commercetools.history.models.common.LineItemPriceMode priceMode) { + this.priceMode = priceMode; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates how the Line Item is added to the Cart.

                                                                                                                                                                                              + * @param lineItemMode value to be set + * @return Builder + */ + + public LineItemBuilder lineItemMode(final com.commercetools.history.models.common.LineItemMode lineItemMode) { + this.lineItemMode = lineItemMode; + return this; + } + + /** + *

                                                                                                                                                                                              Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

                                                                                                                                                                                              + * @param inventoryMode value to be set + * @return Builder + */ + + public LineItemBuilder inventoryMode( + @Nullable final com.commercetools.history.models.common.InventoryMode inventoryMode) { + this.inventoryMode = inventoryMode; + return this; + } + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @param builder function to build the shippingDetails value + * @return Builder + */ + + public LineItemBuilder shippingDetails( + Function builder) { + this.shippingDetails = builder.apply(com.commercetools.history.models.common.ItemShippingDetailsBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @param builder function to build the shippingDetails value + * @return Builder + */ + + public LineItemBuilder withShippingDetails( + Function builder) { + this.shippingDetails = builder.apply(com.commercetools.history.models.common.ItemShippingDetailsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @param shippingDetails value to be set + * @return Builder + */ + + public LineItemBuilder shippingDetails( + @Nullable final com.commercetools.history.models.common.ItemShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public LineItemBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public LineItemBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public LineItemBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was added to the Cart.

                                                                                                                                                                                              + * @param addedAt value to be set + * @return Builder + */ + + public LineItemBuilder addedAt(@Nullable final java.time.ZonedDateTime addedAt) { + this.addedAt = addedAt; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was last updated.

                                                                                                                                                                                              + * @param lastModifiedAt value to be set + * @return Builder + */ + + public LineItemBuilder lastModifiedAt(@Nullable final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemBuilder recurrenceInfo( + Function builder) { + this.recurrenceInfo = builder.apply(com.commercetools.history.models.common.LineItemRecurrenceInfoBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param builder function to build the recurrenceInfo value + * @return Builder + */ + + public LineItemBuilder withRecurrenceInfo( + Function builder) { + this.recurrenceInfo = builder.apply(com.commercetools.history.models.common.LineItemRecurrenceInfoBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @param recurrenceInfo value to be set + * @return Builder + */ + + public LineItemBuilder recurrenceInfo( + @Nullable final com.commercetools.history.models.common.LineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the LineItem.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the LineItem.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              id of the Product the Line Item is based on.

                                                                                                                                                                                              + * @return productId + */ + + public String getProductId() { + return this.productId; + } + + /** + *

                                                                                                                                                                                              key of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field is only present on:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Line Items in a Cart when the key is available on that specific Product at the time the LineItem was created or updated on the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • Line Items in an Order when the key is available on the specific Product at the time the Order was created from the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + *

                                                                                                                                                                                              Present on resources created or updated after 3 December 2021.

                                                                                                                                                                                              + * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + * @return name + */ + + public com.commercetools.history.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              + * @return productSlug + */ + + @Nullable + public com.commercetools.history.models.common.LocalizedString getProductSlug() { + return this.productSlug; + } + + /** + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              + * @return productType + */ + + public com.commercetools.history.models.common.ProductTypeReference getProductType() { + return this.productType; + } + + /** + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + * @return variant + */ + + public com.commercetools.history.models.common.ProductVariant getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              + * @return price + */ + + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Number of Line Items of the given Product Variant present in the Cart or Order.

                                                                                                                                                                                              + * @return quantity + */ + + public Long getQuantity() { + return this.quantity; + } + + /** + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              + * @return totalPrice + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getTotalPrice() { + return this.totalPrice; + } + + /** + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              + * @return discountedPricePerQuantity + */ + + public java.util.List getDiscountedPricePerQuantity() { + return this.discountedPricePerQuantity; + } + + /** + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + * @return taxedPrice + */ + + @Nullable + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; + } + + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + * @return taxedPricePortions + */ + + public java.util.List getTaxedPricePortions() { + return this.taxedPricePortions; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + * @return state + */ + + public java.util.List getState() { + return this.state; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return taxRate + */ + + @Nullable + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return perMethodTaxRate + */ + + public java.util.List getPerMethodTaxRate() { + return this.perMethodTaxRate; + } + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + * @return supplyChannel + */ + + @Nullable + public com.commercetools.history.models.common.ChannelReference getSupplyChannel() { + return this.supplyChannel; + } + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + * @return distributionChannel + */ + + @Nullable + public com.commercetools.history.models.common.ChannelReference getDistributionChannel() { + return this.distributionChannel; + } + + /** + *

                                                                                                                                                                                              Indicates how the Price for the Line Item is set.

                                                                                                                                                                                              + * @return priceMode + */ + + public com.commercetools.history.models.common.LineItemPriceMode getPriceMode() { + return this.priceMode; + } + + /** + *

                                                                                                                                                                                              Indicates how the Line Item is added to the Cart.

                                                                                                                                                                                              + * @return lineItemMode + */ + + public com.commercetools.history.models.common.LineItemMode getLineItemMode() { + return this.lineItemMode; + } + + /** + *

                                                                                                                                                                                              Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

                                                                                                                                                                                              + * @return inventoryMode + */ + + @Nullable + public com.commercetools.history.models.common.InventoryMode getInventoryMode() { + return this.inventoryMode; + } + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + * @return shippingDetails + */ + + @Nullable + public com.commercetools.history.models.common.ItemShippingDetails getShippingDetails() { + return this.shippingDetails; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was added to the Cart.

                                                                                                                                                                                              + * @return addedAt + */ + + @Nullable + public java.time.ZonedDateTime getAddedAt() { + return this.addedAt; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was last updated.

                                                                                                                                                                                              + * @return lastModifiedAt + */ + + @Nullable + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + * @return recurrenceInfo + */ + + @Nullable + public com.commercetools.history.models.common.LineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; + } + + /** + * builds LineItem with checking for non-null required values + * @return LineItem + */ + public LineItem build() { + Objects.requireNonNull(id, LineItem.class + ": id is missing"); + Objects.requireNonNull(productId, LineItem.class + ": productId is missing"); + Objects.requireNonNull(name, LineItem.class + ": name is missing"); + Objects.requireNonNull(productType, LineItem.class + ": productType is missing"); + Objects.requireNonNull(variant, LineItem.class + ": variant is missing"); + Objects.requireNonNull(price, LineItem.class + ": price is missing"); + Objects.requireNonNull(quantity, LineItem.class + ": quantity is missing"); + Objects.requireNonNull(totalPrice, LineItem.class + ": totalPrice is missing"); + Objects.requireNonNull(discountedPricePerQuantity, LineItem.class + ": discountedPricePerQuantity is missing"); + Objects.requireNonNull(taxedPricePortions, LineItem.class + ": taxedPricePortions is missing"); + Objects.requireNonNull(state, LineItem.class + ": state is missing"); + Objects.requireNonNull(perMethodTaxRate, LineItem.class + ": perMethodTaxRate is missing"); + Objects.requireNonNull(priceMode, LineItem.class + ": priceMode is missing"); + Objects.requireNonNull(lineItemMode, LineItem.class + ": lineItemMode is missing"); + return new LineItemImpl(id, key, productId, productKey, name, productSlug, productType, variant, price, + quantity, totalPrice, discountedPricePerQuantity, taxedPrice, taxedPricePortions, state, taxRate, + perMethodTaxRate, supplyChannel, distributionChannel, priceMode, lineItemMode, inventoryMode, + shippingDetails, custom, addedAt, lastModifiedAt, recurrenceInfo); + } + + /** + * builds LineItem without checking for non-null required values + * @return LineItem + */ + public LineItem buildUnchecked() { + return new LineItemImpl(id, key, productId, productKey, name, productSlug, productType, variant, price, + quantity, totalPrice, discountedPricePerQuantity, taxedPrice, taxedPricePortions, state, taxRate, + perMethodTaxRate, supplyChannel, distributionChannel, priceMode, lineItemMode, inventoryMode, + shippingDetails, custom, addedAt, lastModifiedAt, recurrenceInfo); + } + + /** + * factory method for an instance of LineItemBuilder + * @return builder + */ + public static LineItemBuilder of() { + return new LineItemBuilder(); + } + + /** + * create builder for LineItem instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemBuilder of(final LineItem template) { + LineItemBuilder builder = new LineItemBuilder(); + builder.id = template.getId(); + builder.key = template.getKey(); + builder.productId = template.getProductId(); + builder.productKey = template.getProductKey(); + builder.name = template.getName(); + builder.productSlug = template.getProductSlug(); + builder.productType = template.getProductType(); + builder.variant = template.getVariant(); + builder.price = template.getPrice(); + builder.quantity = template.getQuantity(); + builder.totalPrice = template.getTotalPrice(); + builder.discountedPricePerQuantity = template.getDiscountedPricePerQuantity(); + builder.taxedPrice = template.getTaxedPrice(); + builder.taxedPricePortions = template.getTaxedPricePortions(); + builder.state = template.getState(); + builder.taxRate = template.getTaxRate(); + builder.perMethodTaxRate = template.getPerMethodTaxRate(); + builder.supplyChannel = template.getSupplyChannel(); + builder.distributionChannel = template.getDistributionChannel(); + builder.priceMode = template.getPriceMode(); + builder.lineItemMode = template.getLineItemMode(); + builder.inventoryMode = template.getInventoryMode(); + builder.shippingDetails = template.getShippingDetails(); + builder.custom = template.getCustom(); + builder.addedAt = template.getAddedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.recurrenceInfo = template.getRecurrenceInfo(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemImpl.java index 82b6688974a..4b003c462c2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemImpl.java @@ -17,55 +17,121 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * LineItem + *

                                                                                                                                                                                              The representation of a Line Item in a Cart or in an Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LineItemImpl implements LineItem, ModelBase { - private String addedAt; - - private com.commercetools.history.models.common.CustomFields custom; - private String id; - private com.commercetools.history.models.common.LocalizedString name; + private String key; private String productId; + private String productKey; + + private com.commercetools.history.models.common.LocalizedString name; + private com.commercetools.history.models.common.LocalizedString productSlug; - private com.commercetools.history.models.common.Reference productType; + private com.commercetools.history.models.common.ProductTypeReference productType; + + private com.commercetools.history.models.common.ProductVariant variant; + + private com.commercetools.history.models.common.Price price; + + private Long quantity; + + private com.commercetools.history.models.common.CentPrecisionMoney totalPrice; + + private java.util.List discountedPricePerQuantity; + + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + private java.util.List taxedPricePortions; - private Integer quantity; + private java.util.List state; - private com.commercetools.history.models.common.Variant variant; + private com.commercetools.history.models.common.TaxRate taxRate; - private Integer variantId; + private java.util.List perMethodTaxRate; + + private com.commercetools.history.models.common.ChannelReference supplyChannel; + + private com.commercetools.history.models.common.ChannelReference distributionChannel; + + private com.commercetools.history.models.common.LineItemPriceMode priceMode; + + private com.commercetools.history.models.common.LineItemMode lineItemMode; + + private com.commercetools.history.models.common.InventoryMode inventoryMode; + + private com.commercetools.history.models.common.ItemShippingDetails shippingDetails; + + private com.commercetools.history.models.common.CustomFields custom; + + private java.time.ZonedDateTime addedAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.history.models.common.LineItemRecurrenceInfo recurrenceInfo; /** * create instance with all properties */ @JsonCreator - LineItemImpl(@JsonProperty("addedAt") final String addedAt, - @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, - @JsonProperty("id") final String id, + LineItemImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("productId") final String productId, @JsonProperty("productKey") final String productKey, @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, - @JsonProperty("productId") final String productId, @JsonProperty("productSlug") final com.commercetools.history.models.common.LocalizedString productSlug, - @JsonProperty("productType") final com.commercetools.history.models.common.Reference productType, - @JsonProperty("quantity") final Integer quantity, - @JsonProperty("variant") final com.commercetools.history.models.common.Variant variant, - @JsonProperty("variantId") final Integer variantId) { - this.addedAt = addedAt; - this.custom = custom; + @JsonProperty("productType") final com.commercetools.history.models.common.ProductTypeReference productType, + @JsonProperty("variant") final com.commercetools.history.models.common.ProductVariant variant, + @JsonProperty("price") final com.commercetools.history.models.common.Price price, + @JsonProperty("quantity") final Long quantity, + @JsonProperty("totalPrice") final com.commercetools.history.models.common.CentPrecisionMoney totalPrice, + @JsonProperty("discountedPricePerQuantity") final java.util.List discountedPricePerQuantity, + @JsonProperty("taxedPrice") final com.commercetools.history.models.common.TaxedItemPrice taxedPrice, + @JsonProperty("taxedPricePortions") final java.util.List taxedPricePortions, + @JsonProperty("state") final java.util.List state, + @JsonProperty("taxRate") final com.commercetools.history.models.common.TaxRate taxRate, + @JsonProperty("perMethodTaxRate") final java.util.List perMethodTaxRate, + @JsonProperty("supplyChannel") final com.commercetools.history.models.common.ChannelReference supplyChannel, + @JsonProperty("distributionChannel") final com.commercetools.history.models.common.ChannelReference distributionChannel, + @JsonProperty("priceMode") final com.commercetools.history.models.common.LineItemPriceMode priceMode, + @JsonProperty("lineItemMode") final com.commercetools.history.models.common.LineItemMode lineItemMode, + @JsonProperty("inventoryMode") final com.commercetools.history.models.common.InventoryMode inventoryMode, + @JsonProperty("shippingDetails") final com.commercetools.history.models.common.ItemShippingDetails shippingDetails, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, + @JsonProperty("addedAt") final java.time.ZonedDateTime addedAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("recurrenceInfo") final com.commercetools.history.models.common.LineItemRecurrenceInfo recurrenceInfo) { this.id = id; - this.name = name; + this.key = key; this.productId = productId; + this.productKey = productKey; + this.name = name; this.productSlug = productSlug; this.productType = productType; - this.quantity = quantity; this.variant = variant; - this.variantId = variantId; + this.price = price; + this.quantity = quantity; + this.totalPrice = totalPrice; + this.discountedPricePerQuantity = discountedPricePerQuantity; + this.taxedPrice = taxedPrice; + this.taxedPricePortions = taxedPricePortions; + this.state = state; + this.taxRate = taxRate; + this.perMethodTaxRate = perMethodTaxRate; + this.supplyChannel = supplyChannel; + this.distributionChannel = distributionChannel; + this.priceMode = priceMode; + this.lineItemMode = lineItemMode; + this.inventoryMode = inventoryMode; + this.shippingDetails = shippingDetails; + this.custom = custom; + this.addedAt = addedAt; + this.lastModifiedAt = lastModifiedAt; + this.recurrenceInfo = recurrenceInfo; } /** @@ -75,47 +141,53 @@ public LineItemImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of the LineItem.

                                                                                                                                                                                              */ - public String getAddedAt() { - return this.addedAt; + public String getId() { + return this.id; } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the LineItem.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.CustomFields getCustom() { - return this.custom; + public String getKey() { + return this.key; } /** - * + *

                                                                                                                                                                                              id of the Product the Line Item is based on.

                                                                                                                                                                                              */ - public String getId() { - return this.id; + public String getProductId() { + return this.productId; } /** - * + *

                                                                                                                                                                                              key of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This field is only present on:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Line Items in a Cart when the key is available on that specific Product at the time the LineItem was created or updated on the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • Line Items in an Order when the key is available on the specific Product at the time the Order was created from the Cart.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + *

                                                                                                                                                                                              Present on resources created or updated after 3 December 2021.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.LocalizedString getName() { - return this.name; + public String getProductKey() { + return this.productKey; } /** - * + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              */ - public String getProductId() { - return this.productId; + public com.commercetools.history.models.common.LocalizedString getName() { + return this.name; } /** - * + *

                                                                                                                                                                                              slug of the current version of the Product. Updated automatically if the slug changes. Empty if the Product has been deleted. The productSlug field of LineItem is not expanded when using Reference Expansion.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getProductSlug() { @@ -123,75 +195,306 @@ public com.commercetools.history.models.common.LocalizedString getProductSlug() } /** - * + *

                                                                                                                                                                                              Product Type of the Product.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getProductType() { + public com.commercetools.history.models.common.ProductTypeReference getProductType() { return this.productType; } /** - * + *

                                                                                                                                                                                              Holds the data of the Product Variant added to the Cart.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes. Must be updated using the Recalculate update action.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductVariant getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                                              Price of a Line Item selected from the Product Variant according to the Product priceMode. If the priceMode is Embedded ProductPriceMode and the variant field hasn't been updated, the price may not correspond to a price in variant.prices.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Number of Line Items of the given Product Variant present in the Cart or Order.

                                                                                                                                                                                              + */ + + public Long getQuantity() { return this.quantity; } /** - * + *

                                                                                                                                                                                              Total price of this Line Item equalling price multiplied by quantity. If the Line Item is discounted, the total price is the discountedPricePerQuantity multiplied by quantity. Includes taxes if the TaxRate includedInPrice is true.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If ExternalPrice LineItemPriceMode is used with high-precision money, then the total price is rounded by using the HalfEven rounding mode.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Variant getVariant() { - return this.variant; + public com.commercetools.history.models.common.CentPrecisionMoney getTotalPrice() { + return this.totalPrice; } /** - * + *

                                                                                                                                                                                              Discounted price of a single quantity of the Line Item.

                                                                                                                                                                                              */ - public Integer getVariantId() { - return this.variantId; + public java.util.List getDiscountedPricePerQuantity() { + return this.discountedPricePerQuantity; } - public void setAddedAt(final String addedAt) { - this.addedAt = addedAt; + /** + *

                                                                                                                                                                                              Automatically set after taxRate is set.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; } - public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { - this.custom = custom; + /** + *

                                                                                                                                                                                              Total taxed prices based on the quantity of Line Item assigned to each Shipping Method. Only applicable for Carts with Multiple ShippingMode. Automatically set after perMethodTaxRate is set.

                                                                                                                                                                                              + */ + + public java.util.List getTaxedPricePortions() { + return this.taxedPricePortions; + } + + /** + *

                                                                                                                                                                                              Tracks specific quantities of the Line Item within a given State. When a Line Item is added to a Cart, its full quantity is set to the built-in "Initial" state. State transitions for Line Items are managed on the Order.

                                                                                                                                                                                              + */ + + public java.util.List getState() { + return this.state; + } + + /** + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For a Cart with Platform TaxMode, the taxRate of Line Items is set automatically once a shipping address is set. The rate is based on the TaxCategory that applies for the shipping address.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For a Cart with External TaxMode, the taxRate of Line Items can be set using ExternalTaxRateDraft.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Tax Rate per Shipping Method for a Cart with Multiple ShippingMode. For a Cart with Platform TaxMode it is automatically set after the Shipping Method is added. For a Cart with External TaxMode, the Tax Rate must be set with ExternalTaxRateDraft.

                                                                                                                                                                                              + */ + + public java.util.List getPerMethodTaxRate() { + return this.perMethodTaxRate; + } + + /** + *

                                                                                                                                                                                              Identifies Inventory entries that are reserved. The referenced Channel has the InventorySupply ChannelRoleEnum.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ChannelReference getSupplyChannel() { + return this.supplyChannel; + } + + /** + *

                                                                                                                                                                                              Used to select a Product Price. The referenced Channel has the ProductDistribution ChannelRoleEnum.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ChannelReference getDistributionChannel() { + return this.distributionChannel; + } + + /** + *

                                                                                                                                                                                              Indicates how the Price for the Line Item is set.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LineItemPriceMode getPriceMode() { + return this.priceMode; + } + + /** + *

                                                                                                                                                                                              Indicates how the Line Item is added to the Cart.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LineItemMode getLineItemMode() { + return this.lineItemMode; + } + + /** + *

                                                                                                                                                                                              Inventory mode specific to this Line Item only, and valid for the entire quantity of the Line Item. Only present if the inventory mode is different from the inventoryMode specified on the Cart.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.InventoryMode getInventoryMode() { + return this.inventoryMode; + } + + /** + *

                                                                                                                                                                                              Container for Line Item-specific addresses.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ItemShippingDetails getShippingDetails() { + return this.shippingDetails; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Line Item.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was added to the Cart.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getAddedAt() { + return this.addedAt; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Line Item was last updated.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *

                                                                                                                                                                                              Recurring Order and frequency data.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LineItemRecurrenceInfo getRecurrenceInfo() { + return this.recurrenceInfo; } public void setId(final String id) { this.id = id; } - public void setName(final com.commercetools.history.models.common.LocalizedString name) { - this.name = name; + public void setKey(final String key) { + this.key = key; } public void setProductId(final String productId) { this.productId = productId; } + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setName(final com.commercetools.history.models.common.LocalizedString name) { + this.name = name; + } + public void setProductSlug(final com.commercetools.history.models.common.LocalizedString productSlug) { this.productSlug = productSlug; } - public void setProductType(final com.commercetools.history.models.common.Reference productType) { + public void setProductType(final com.commercetools.history.models.common.ProductTypeReference productType) { this.productType = productType; } - public void setQuantity(final Integer quantity) { + public void setVariant(final com.commercetools.history.models.common.ProductVariant variant) { + this.variant = variant; + } + + public void setPrice(final com.commercetools.history.models.common.Price price) { + this.price = price; + } + + public void setQuantity(final Long quantity) { this.quantity = quantity; } - public void setVariant(final com.commercetools.history.models.common.Variant variant) { - this.variant = variant; + public void setTotalPrice(final com.commercetools.history.models.common.CentPrecisionMoney totalPrice) { + this.totalPrice = totalPrice; + } + + public void setDiscountedPricePerQuantity( + final com.commercetools.history.models.common.DiscountedLineItemPriceForQuantity... discountedPricePerQuantity) { + this.discountedPricePerQuantity = new ArrayList<>(Arrays.asList(discountedPricePerQuantity)); + } + + public void setDiscountedPricePerQuantity( + final java.util.List discountedPricePerQuantity) { + this.discountedPricePerQuantity = discountedPricePerQuantity; + } + + public void setTaxedPrice(final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + } + + public void setTaxedPricePortions( + final com.commercetools.history.models.common.MethodTaxedPrice... taxedPricePortions) { + this.taxedPricePortions = new ArrayList<>(Arrays.asList(taxedPricePortions)); + } + + public void setTaxedPricePortions( + final java.util.List taxedPricePortions) { + this.taxedPricePortions = taxedPricePortions; + } + + public void setState(final com.commercetools.history.models.common.ItemState... state) { + this.state = new ArrayList<>(Arrays.asList(state)); } - public void setVariantId(final Integer variantId) { - this.variantId = variantId; + public void setState(final java.util.List state) { + this.state = state; + } + + public void setTaxRate(final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + } + + public void setPerMethodTaxRate(final com.commercetools.history.models.common.MethodTaxRate... perMethodTaxRate) { + this.perMethodTaxRate = new ArrayList<>(Arrays.asList(perMethodTaxRate)); + } + + public void setPerMethodTaxRate( + final java.util.List perMethodTaxRate) { + this.perMethodTaxRate = perMethodTaxRate; + } + + public void setSupplyChannel(final com.commercetools.history.models.common.ChannelReference supplyChannel) { + this.supplyChannel = supplyChannel; + } + + public void setDistributionChannel( + final com.commercetools.history.models.common.ChannelReference distributionChannel) { + this.distributionChannel = distributionChannel; + } + + public void setPriceMode(final com.commercetools.history.models.common.LineItemPriceMode priceMode) { + this.priceMode = priceMode; + } + + public void setLineItemMode(final com.commercetools.history.models.common.LineItemMode lineItemMode) { + this.lineItemMode = lineItemMode; + } + + public void setInventoryMode(final com.commercetools.history.models.common.InventoryMode inventoryMode) { + this.inventoryMode = inventoryMode; + } + + public void setShippingDetails(final com.commercetools.history.models.common.ItemShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + } + + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + public void setAddedAt(final java.time.ZonedDateTime addedAt) { + this.addedAt = addedAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setRecurrenceInfo(final com.commercetools.history.models.common.LineItemRecurrenceInfo recurrenceInfo) { + this.recurrenceInfo = recurrenceInfo; } @Override @@ -204,56 +507,124 @@ public boolean equals(Object o) { LineItemImpl that = (LineItemImpl) o; - return new EqualsBuilder().append(addedAt, that.addedAt) - .append(custom, that.custom) - .append(id, that.id) - .append(name, that.name) + return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(productId, that.productId) + .append(productKey, that.productKey) + .append(name, that.name) .append(productSlug, that.productSlug) .append(productType, that.productType) - .append(quantity, that.quantity) .append(variant, that.variant) - .append(variantId, that.variantId) - .append(addedAt, that.addedAt) + .append(price, that.price) + .append(quantity, that.quantity) + .append(totalPrice, that.totalPrice) + .append(discountedPricePerQuantity, that.discountedPricePerQuantity) + .append(taxedPrice, that.taxedPrice) + .append(taxedPricePortions, that.taxedPricePortions) + .append(state, that.state) + .append(taxRate, that.taxRate) + .append(perMethodTaxRate, that.perMethodTaxRate) + .append(supplyChannel, that.supplyChannel) + .append(distributionChannel, that.distributionChannel) + .append(priceMode, that.priceMode) + .append(lineItemMode, that.lineItemMode) + .append(inventoryMode, that.inventoryMode) + .append(shippingDetails, that.shippingDetails) .append(custom, that.custom) + .append(addedAt, that.addedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(recurrenceInfo, that.recurrenceInfo) .append(id, that.id) - .append(name, that.name) + .append(key, that.key) .append(productId, that.productId) + .append(productKey, that.productKey) + .append(name, that.name) .append(productSlug, that.productSlug) .append(productType, that.productType) - .append(quantity, that.quantity) .append(variant, that.variant) - .append(variantId, that.variantId) + .append(price, that.price) + .append(quantity, that.quantity) + .append(totalPrice, that.totalPrice) + .append(discountedPricePerQuantity, that.discountedPricePerQuantity) + .append(taxedPrice, that.taxedPrice) + .append(taxedPricePortions, that.taxedPricePortions) + .append(state, that.state) + .append(taxRate, that.taxRate) + .append(perMethodTaxRate, that.perMethodTaxRate) + .append(supplyChannel, that.supplyChannel) + .append(distributionChannel, that.distributionChannel) + .append(priceMode, that.priceMode) + .append(lineItemMode, that.lineItemMode) + .append(inventoryMode, that.inventoryMode) + .append(shippingDetails, that.shippingDetails) + .append(custom, that.custom) + .append(addedAt, that.addedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(recurrenceInfo, that.recurrenceInfo) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(addedAt) - .append(custom) - .append(id) - .append(name) + return new HashCodeBuilder(17, 37).append(id) + .append(key) .append(productId) + .append(productKey) + .append(name) .append(productSlug) .append(productType) - .append(quantity) .append(variant) - .append(variantId) + .append(price) + .append(quantity) + .append(totalPrice) + .append(discountedPricePerQuantity) + .append(taxedPrice) + .append(taxedPricePortions) + .append(state) + .append(taxRate) + .append(perMethodTaxRate) + .append(supplyChannel) + .append(distributionChannel) + .append(priceMode) + .append(lineItemMode) + .append(inventoryMode) + .append(shippingDetails) + .append(custom) + .append(addedAt) + .append(lastModifiedAt) + .append(recurrenceInfo) .toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("addedAt", addedAt) - .append("custom", custom) - .append("id", id) - .append("name", name) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("productId", productId) + .append("productKey", productKey) + .append("name", name) .append("productSlug", productSlug) .append("productType", productType) - .append("quantity", quantity) .append("variant", variant) - .append("variantId", variantId) + .append("price", price) + .append("quantity", quantity) + .append("totalPrice", totalPrice) + .append("discountedPricePerQuantity", discountedPricePerQuantity) + .append("taxedPrice", taxedPrice) + .append("taxedPricePortions", taxedPricePortions) + .append("state", state) + .append("taxRate", taxRate) + .append("perMethodTaxRate", perMethodTaxRate) + .append("supplyChannel", supplyChannel) + .append("distributionChannel", distributionChannel) + .append("priceMode", priceMode) + .append("lineItemMode", lineItemMode) + .append("inventoryMode", inventoryMode) + .append("shippingDetails", shippingDetails) + .append("custom", custom) + .append("addedAt", addedAt) + .append("lastModifiedAt", lastModifiedAt) + .append("recurrenceInfo", recurrenceInfo) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemMode.java new file mode 100644 index 00000000000..05fd8a086ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemMode.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 how a Line Item was added to a Cart.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface LineItemMode extends JsonEnum { + + LineItemMode STANDARD = LineItemModeEnum.STANDARD; + + LineItemMode GIFT_LINE_ITEM = LineItemModeEnum.GIFT_LINE_ITEM; + + /** + * possible values of LineItemMode + */ + enum LineItemModeEnum implements LineItemMode { + /** + * Standard + */ + STANDARD("Standard"), + + /** + * GiftLineItem + */ + GIFT_LINE_ITEM("GiftLineItem"); + private final String jsonName; + + private LineItemModeEnum(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 LineItemMode + * 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 LineItemMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new LineItemMode() { + @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 LineItemMode[] values() { + return LineItemModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemPriceMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemPriceMode.java new file mode 100644 index 00000000000..ed9840e0272 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemPriceMode.java @@ -0,0 +1,119 @@ + +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; + +/** + *

                                                                                                                                                                                              This mode indicates how the price is set for the Line Item.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface LineItemPriceMode extends JsonEnum { + + LineItemPriceMode PLATFORM = LineItemPriceModeEnum.PLATFORM; + + LineItemPriceMode EXTERNAL_PRICE = LineItemPriceModeEnum.EXTERNAL_PRICE; + + LineItemPriceMode EXTERNAL_TOTAL = LineItemPriceModeEnum.EXTERNAL_TOTAL; + + /** + * possible values of LineItemPriceMode + */ + enum LineItemPriceModeEnum implements LineItemPriceMode { + /** + * Platform + */ + PLATFORM("Platform"), + + /** + * ExternalPrice + */ + EXTERNAL_PRICE("ExternalPrice"), + + /** + * ExternalTotal + */ + EXTERNAL_TOTAL("ExternalTotal"); + private final String jsonName; + + private LineItemPriceModeEnum(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 LineItemPriceMode + * 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 LineItemPriceMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new LineItemPriceMode() { + @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 LineItemPriceMode[] values() { + return LineItemPriceModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfo.java new file mode 100644 index 00000000000..e9b7ab36bce --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfo.java @@ -0,0 +1,145 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Information about recurring orders and frequencies.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     LineItemRecurrenceInfo lineItemRecurrenceInfo = LineItemRecurrenceInfo.builder()
                                                                                                                                                                                              + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
                                                                                                                                                                                              + *             .priceSelectionMode(PriceSelectionMode.FIXED)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = LineItemRecurrenceInfoImpl.class) +public interface LineItemRecurrenceInfo { + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + @NotNull + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *

                                                                                                                                                                                              Indicates how the price of a line item will be selected during order creation.

                                                                                                                                                                                              + * @return priceSelectionMode + */ + @NotNull + @JsonProperty("priceSelectionMode") + public PriceSelectionMode getPriceSelectionMode(); + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + *

                                                                                                                                                                                              Indicates how the price of a line item will be selected during order creation.

                                                                                                                                                                                              + * @param priceSelectionMode value to be set + */ + + public void setPriceSelectionMode(final PriceSelectionMode priceSelectionMode); + + /** + * factory method + * @return instance of LineItemRecurrenceInfo + */ + public static LineItemRecurrenceInfo of() { + return new LineItemRecurrenceInfoImpl(); + } + + /** + * factory method to create a shallow copy LineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + public static LineItemRecurrenceInfo of(final LineItemRecurrenceInfo template) { + LineItemRecurrenceInfoImpl instance = new LineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + public LineItemRecurrenceInfo copyDeep(); + + /** + * factory method to create a deep copy of LineItemRecurrenceInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static LineItemRecurrenceInfo deepCopy(@Nullable final LineItemRecurrenceInfo template) { + if (template == null) { + return null; + } + LineItemRecurrenceInfoImpl instance = new LineItemRecurrenceInfoImpl(); + instance.setRecurrencePolicy( + com.commercetools.history.models.common.RecurrencePolicyReference.deepCopy(template.getRecurrencePolicy())); + instance.setPriceSelectionMode(template.getPriceSelectionMode()); + return instance; + } + + /** + * builder factory method for LineItemRecurrenceInfo + * @return builder + */ + public static LineItemRecurrenceInfoBuilder builder() { + return LineItemRecurrenceInfoBuilder.of(); + } + + /** + * create builder for LineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder builder(final LineItemRecurrenceInfo template) { + return LineItemRecurrenceInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withLineItemRecurrenceInfo(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/LineItemRecurrenceInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoBuilder.java new file mode 100644 index 00000000000..5c6f5a3bf31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoBuilder.java @@ -0,0 +1,137 @@ + +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; + +/** + * LineItemRecurrenceInfoBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     LineItemRecurrenceInfo lineItemRecurrenceInfo = LineItemRecurrenceInfo.builder()
                                                                                                                                                                                              + *             .recurrencePolicy(recurrencePolicyBuilder -> recurrencePolicyBuilder)
                                                                                                                                                                                              + *             .priceSelectionMode(PriceSelectionMode.FIXED)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoBuilder implements Builder { + + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; + + private com.commercetools.history.models.common.PriceSelectionMode priceSelectionMode; + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @param recurrencePolicy value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder recurrencePolicy( + final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates how the price of a line item will be selected during order creation.

                                                                                                                                                                                              + * @param priceSelectionMode value to be set + * @return Builder + */ + + public LineItemRecurrenceInfoBuilder priceSelectionMode( + final com.commercetools.history.models.common.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

                                                                                                                                                                                              Indicates how the price of a line item will be selected during order creation.

                                                                                                                                                                                              + * @return priceSelectionMode + */ + + public com.commercetools.history.models.common.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + /** + * builds LineItemRecurrenceInfo with checking for non-null required values + * @return LineItemRecurrenceInfo + */ + public LineItemRecurrenceInfo build() { + Objects.requireNonNull(recurrencePolicy, LineItemRecurrenceInfo.class + ": recurrencePolicy is missing"); + Objects.requireNonNull(priceSelectionMode, LineItemRecurrenceInfo.class + ": priceSelectionMode is missing"); + return new LineItemRecurrenceInfoImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * builds LineItemRecurrenceInfo without checking for non-null required values + * @return LineItemRecurrenceInfo + */ + public LineItemRecurrenceInfo buildUnchecked() { + return new LineItemRecurrenceInfoImpl(recurrencePolicy, priceSelectionMode); + } + + /** + * factory method for an instance of LineItemRecurrenceInfoBuilder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder of() { + return new LineItemRecurrenceInfoBuilder(); + } + + /** + * create builder for LineItemRecurrenceInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static LineItemRecurrenceInfoBuilder of(final LineItemRecurrenceInfo template) { + LineItemRecurrenceInfoBuilder builder = new LineItemRecurrenceInfoBuilder(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + builder.priceSelectionMode = template.getPriceSelectionMode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoImpl.java new file mode 100644 index 00000000000..d39006fe533 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoImpl.java @@ -0,0 +1,105 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Information about recurring orders and frequencies.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class LineItemRecurrenceInfoImpl implements LineItemRecurrenceInfo, ModelBase { + + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; + + private com.commercetools.history.models.common.PriceSelectionMode priceSelectionMode; + + /** + * create instance with all properties + */ + @JsonCreator + LineItemRecurrenceInfoImpl( + @JsonProperty("recurrencePolicy") final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy, + @JsonProperty("priceSelectionMode") final com.commercetools.history.models.common.PriceSelectionMode priceSelectionMode) { + this.recurrencePolicy = recurrencePolicy; + this.priceSelectionMode = priceSelectionMode; + } + + /** + * create empty instance + */ + public LineItemRecurrenceInfoImpl() { + } + + /** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + *

                                                                                                                                                                                              Indicates how the price of a line item will be selected during order creation.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.PriceSelectionMode getPriceSelectionMode() { + return this.priceSelectionMode; + } + + public void setRecurrencePolicy( + final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + public void setPriceSelectionMode( + final com.commercetools.history.models.common.PriceSelectionMode priceSelectionMode) { + this.priceSelectionMode = priceSelectionMode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + LineItemRecurrenceInfoImpl that = (LineItemRecurrenceInfoImpl) o; + + return new EqualsBuilder().append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .append(recurrencePolicy, that.recurrencePolicy) + .append(priceSelectionMode, that.priceSelectionMode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(recurrencePolicy).append(priceSelectionMode).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("recurrencePolicy", recurrencePolicy) + .append("priceSelectionMode", priceSelectionMode) + .build(); + } + + @Override + public LineItemRecurrenceInfo copyDeep() { + return LineItemRecurrenceInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedString.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedString.java index 400cc48f07d..b7058b16db2 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedString.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedString.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - * LocalizedString + *

                                                                                                                                                                                              JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -32,7 +32,7 @@ public interface LocalizedString { /** - * + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              * @return map of the pattern property values */ @NotNull @@ -40,7 +40,7 @@ public interface LocalizedString { public Map values(); /** - * set pattern property + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              * @param key property name * @param value property value */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringBuilder.java index 08dc08075e4..6b14a76e286 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringBuilder.java @@ -24,7 +24,7 @@ public class LocalizedStringBuilder implements Builder { private Map values = new HashMap<>(); /** - * assign pattern properties to the builder + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              * @param values properties to be set * @return Builder */ @@ -35,7 +35,7 @@ public LocalizedStringBuilder values(final Map values) { } /** - * assign a pattern property to the builder + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              * @param key property name * @param value property value * @return Builder @@ -50,7 +50,7 @@ public LocalizedStringBuilder addValue(final String key, final String value) { } /** - * values of pattern properties + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              * @return pattern properties */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringImpl.java index 38a55829d07..510549e60b9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocalizedStringImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * LocalizedString + *

                                                                                                                                                                                              JSON object where the keys are of type Locale, and the values are the strings used for the corresponding language.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LocalizedStringImpl implements LocalizedString, ModelBase { @@ -40,7 +40,7 @@ public LocalizedStringImpl() { } /** - * + *

                                                                                                                                                                                              String used for the specified language.

                                                                                                                                                                                              */ public Map values() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Location.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Location.java index 636129dee40..ab4a5745879 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Location.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Location.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                                                                                                              Shape of the value for addLocation and removeLocation actions

                                                                                                                                                                                              + *

                                                                                                                                                                                              A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -23,7 +23,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Location location = Location.builder()
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -33,7 +32,7 @@ public interface Location { /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              * @return country */ @NotNull @@ -41,22 +40,22 @@ public interface Location { public String getCountry(); /** - * + *

                                                                                                                                                                                              State within the country.

                                                                                                                                                                                              * @return state */ - @NotNull + @JsonProperty("state") public String getState(); /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              * @param country value to be set */ public void setCountry(final String country); /** - * set state + *

                                                                                                                                                                                              State within the country.

                                                                                                                                                                                              * @param state value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationBuilder.java index b2053f59a22..3643aa3b970 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,7 +16,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Location location = Location.builder()
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -24,10 +25,11 @@ public class LocationBuilder implements Builder { private String country; + @Nullable private String state; /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              * @param country value to be set * @return Builder */ @@ -38,18 +40,18 @@ public LocationBuilder country(final String country) { } /** - * set the value to the state + *

                                                                                                                                                                                              State within the country.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ - public LocationBuilder state(final String state) { + public LocationBuilder state(@Nullable final String state) { this.state = state; return this; } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              * @return country */ @@ -58,10 +60,11 @@ public String getCountry() { } /** - * value of state} + *

                                                                                                                                                                                              State within the country.

                                                                                                                                                                                              * @return state */ + @Nullable public String getState() { return this.state; } @@ -72,7 +75,6 @@ public String getState() { */ public Location build() { Objects.requireNonNull(country, Location.class + ": country is missing"); - Objects.requireNonNull(state, Location.class + ": state is missing"); return new LocationImpl(country, state); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationImpl.java index 7a0918ba183..936a5bcd100 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/LocationImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                                                                                                              Shape of the value for addLocation and removeLocation actions

                                                                                                                                                                                              + *

                                                                                                                                                                                              A geographical location representing a country and optionally a state within this country. A location can only be assigned to one Zone.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class LocationImpl implements Location, ModelBase { @@ -42,7 +42,7 @@ public LocationImpl() { } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              */ public String getCountry() { @@ -50,7 +50,7 @@ public String getCountry() { } /** - * + *

                                                                                                                                                                                              State within the country.

                                                                                                                                                                                              */ public String getState() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRate.java new file mode 100644 index 00000000000..7271c053de2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRate.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 com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * MethodTaxRate + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     MethodTaxRate methodTaxRate = MethodTaxRate.builder()
                                                                                                                                                                                              + *             .shippingMethodKey("{shippingMethodKey}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MethodTaxRateImpl.class) +public interface MethodTaxRate { + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + @NotNull + @JsonProperty("shippingMethodKey") + public String getShippingMethodKey(); + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @return taxRate + */ + @Valid + @JsonProperty("taxRate") + public TaxRate getTaxRate(); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + */ + + public void setShippingMethodKey(final String shippingMethodKey); + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @param taxRate value to be set + */ + + public void setTaxRate(final TaxRate taxRate); + + /** + * factory method + * @return instance of MethodTaxRate + */ + public static MethodTaxRate of() { + return new MethodTaxRateImpl(); + } + + /** + * factory method to create a shallow copy MethodTaxRate + * @param template instance to be copied + * @return copy instance + */ + public static MethodTaxRate of(final MethodTaxRate template) { + MethodTaxRateImpl instance = new MethodTaxRateImpl(); + instance.setShippingMethodKey(template.getShippingMethodKey()); + instance.setTaxRate(template.getTaxRate()); + return instance; + } + + public MethodTaxRate copyDeep(); + + /** + * factory method to create a deep copy of MethodTaxRate + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MethodTaxRate deepCopy(@Nullable final MethodTaxRate template) { + if (template == null) { + return null; + } + MethodTaxRateImpl instance = new MethodTaxRateImpl(); + instance.setShippingMethodKey(template.getShippingMethodKey()); + instance.setTaxRate(com.commercetools.history.models.common.TaxRate.deepCopy(template.getTaxRate())); + return instance; + } + + /** + * builder factory method for MethodTaxRate + * @return builder + */ + public static MethodTaxRateBuilder builder() { + return MethodTaxRateBuilder.of(); + } + + /** + * create builder for MethodTaxRate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MethodTaxRateBuilder builder(final MethodTaxRate template) { + return MethodTaxRateBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMethodTaxRate(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/MethodTaxRateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRateBuilder.java new file mode 100644 index 00000000000..5d72d803df4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRateBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MethodTaxRateBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     MethodTaxRate methodTaxRate = MethodTaxRate.builder()
                                                                                                                                                                                              + *             .shippingMethodKey("{shippingMethodKey}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MethodTaxRateBuilder implements Builder { + + private String shippingMethodKey; + + @Nullable + private com.commercetools.history.models.common.TaxRate taxRate; + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + * @return Builder + */ + + public MethodTaxRateBuilder shippingMethodKey(final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public MethodTaxRateBuilder taxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public MethodTaxRateBuilder withTaxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @param taxRate value to be set + * @return Builder + */ + + public MethodTaxRateBuilder taxRate(@Nullable final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + * @return taxRate + */ + + @Nullable + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + * builds MethodTaxRate with checking for non-null required values + * @return MethodTaxRate + */ + public MethodTaxRate build() { + Objects.requireNonNull(shippingMethodKey, MethodTaxRate.class + ": shippingMethodKey is missing"); + return new MethodTaxRateImpl(shippingMethodKey, taxRate); + } + + /** + * builds MethodTaxRate without checking for non-null required values + * @return MethodTaxRate + */ + public MethodTaxRate buildUnchecked() { + return new MethodTaxRateImpl(shippingMethodKey, taxRate); + } + + /** + * factory method for an instance of MethodTaxRateBuilder + * @return builder + */ + public static MethodTaxRateBuilder of() { + return new MethodTaxRateBuilder(); + } + + /** + * create builder for MethodTaxRate instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MethodTaxRateBuilder of(final MethodTaxRate template) { + MethodTaxRateBuilder builder = new MethodTaxRateBuilder(); + builder.shippingMethodKey = template.getShippingMethodKey(); + builder.taxRate = template.getTaxRate(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRateImpl.java new file mode 100644 index 00000000000..b8f30ce71cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxRateImpl.java @@ -0,0 +1,103 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * MethodTaxRate + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MethodTaxRateImpl implements MethodTaxRate, ModelBase { + + private String shippingMethodKey; + + private com.commercetools.history.models.common.TaxRate taxRate; + + /** + * create instance with all properties + */ + @JsonCreator + MethodTaxRateImpl(@JsonProperty("shippingMethodKey") final String shippingMethodKey, + @JsonProperty("taxRate") final com.commercetools.history.models.common.TaxRate taxRate) { + this.shippingMethodKey = shippingMethodKey; + this.taxRate = taxRate; + } + + /** + * create empty instance + */ + public MethodTaxRateImpl() { + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + */ + + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + + /** + *

                                                                                                                                                                                              Tax Rate for the Shipping Method.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + public void setShippingMethodKey(final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + } + + public void setTaxRate(final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MethodTaxRateImpl that = (MethodTaxRateImpl) o; + + return new EqualsBuilder().append(shippingMethodKey, that.shippingMethodKey) + .append(taxRate, that.taxRate) + .append(shippingMethodKey, that.shippingMethodKey) + .append(taxRate, that.taxRate) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(shippingMethodKey).append(taxRate).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) + .append("shippingMethodKey", shippingMethodKey) + .append("taxRate", taxRate) + .build(); + } + + @Override + public MethodTaxRate copyDeep() { + return MethodTaxRate.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPrice.java new file mode 100644 index 00000000000..0940a89d535 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPrice.java @@ -0,0 +1,143 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * MethodTaxedPrice + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     MethodTaxedPrice methodTaxedPrice = MethodTaxedPrice.builder()
                                                                                                                                                                                              + *             .shippingMethodKey("{shippingMethodKey}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = MethodTaxedPriceImpl.class) +public interface MethodTaxedPrice { + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + @NotNull + @JsonProperty("shippingMethodKey") + public String getShippingMethodKey(); + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @return taxedPrice + */ + @Valid + @JsonProperty("taxedPrice") + public TaxedItemPrice getTaxedPrice(); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + */ + + public void setShippingMethodKey(final String shippingMethodKey); + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @param taxedPrice value to be set + */ + + public void setTaxedPrice(final TaxedItemPrice taxedPrice); + + /** + * factory method + * @return instance of MethodTaxedPrice + */ + public static MethodTaxedPrice of() { + return new MethodTaxedPriceImpl(); + } + + /** + * factory method to create a shallow copy MethodTaxedPrice + * @param template instance to be copied + * @return copy instance + */ + public static MethodTaxedPrice of(final MethodTaxedPrice template) { + MethodTaxedPriceImpl instance = new MethodTaxedPriceImpl(); + instance.setShippingMethodKey(template.getShippingMethodKey()); + instance.setTaxedPrice(template.getTaxedPrice()); + return instance; + } + + public MethodTaxedPrice copyDeep(); + + /** + * factory method to create a deep copy of MethodTaxedPrice + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static MethodTaxedPrice deepCopy(@Nullable final MethodTaxedPrice template) { + if (template == null) { + return null; + } + MethodTaxedPriceImpl instance = new MethodTaxedPriceImpl(); + instance.setShippingMethodKey(template.getShippingMethodKey()); + instance.setTaxedPrice( + com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getTaxedPrice())); + return instance; + } + + /** + * builder factory method for MethodTaxedPrice + * @return builder + */ + public static MethodTaxedPriceBuilder builder() { + return MethodTaxedPriceBuilder.of(); + } + + /** + * create builder for MethodTaxedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MethodTaxedPriceBuilder builder(final MethodTaxedPrice template) { + return MethodTaxedPriceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withMethodTaxedPrice(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/MethodTaxedPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPriceBuilder.java new file mode 100644 index 00000000000..f4b48bbeedb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPriceBuilder.java @@ -0,0 +1,135 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * MethodTaxedPriceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     MethodTaxedPrice methodTaxedPrice = MethodTaxedPrice.builder()
                                                                                                                                                                                              + *             .shippingMethodKey("{shippingMethodKey}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MethodTaxedPriceBuilder implements Builder { + + private String shippingMethodKey; + + @Nullable + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingMethodKey value to be set + * @return Builder + */ + + public MethodTaxedPriceBuilder shippingMethodKey(final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder + */ + + public MethodTaxedPriceBuilder taxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder + */ + + public MethodTaxedPriceBuilder withTaxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @param taxedPrice value to be set + * @return Builder + */ + + public MethodTaxedPriceBuilder taxedPrice( + @Nullable final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingMethodKey + */ + + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + * @return taxedPrice + */ + + @Nullable + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; + } + + /** + * builds MethodTaxedPrice with checking for non-null required values + * @return MethodTaxedPrice + */ + public MethodTaxedPrice build() { + Objects.requireNonNull(shippingMethodKey, MethodTaxedPrice.class + ": shippingMethodKey is missing"); + return new MethodTaxedPriceImpl(shippingMethodKey, taxedPrice); + } + + /** + * builds MethodTaxedPrice without checking for non-null required values + * @return MethodTaxedPrice + */ + public MethodTaxedPrice buildUnchecked() { + return new MethodTaxedPriceImpl(shippingMethodKey, taxedPrice); + } + + /** + * factory method for an instance of MethodTaxedPriceBuilder + * @return builder + */ + public static MethodTaxedPriceBuilder of() { + return new MethodTaxedPriceBuilder(); + } + + /** + * create builder for MethodTaxedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static MethodTaxedPriceBuilder of(final MethodTaxedPrice template) { + MethodTaxedPriceBuilder builder = new MethodTaxedPriceBuilder(); + builder.shippingMethodKey = template.getShippingMethodKey(); + builder.taxedPrice = template.getTaxedPrice(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPriceImpl.java new file mode 100644 index 00000000000..25b9a126b21 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MethodTaxedPriceImpl.java @@ -0,0 +1,103 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * MethodTaxedPrice + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class MethodTaxedPriceImpl implements MethodTaxedPrice, ModelBase { + + private String shippingMethodKey; + + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + /** + * create instance with all properties + */ + @JsonCreator + MethodTaxedPriceImpl(@JsonProperty("shippingMethodKey") final String shippingMethodKey, + @JsonProperty("taxedPrice") final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.shippingMethodKey = shippingMethodKey; + this.taxedPrice = taxedPrice; + } + + /** + * create empty instance + */ + public MethodTaxedPriceImpl() { + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping Method in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + */ + + public String getShippingMethodKey() { + return this.shippingMethodKey; + } + + /** + *

                                                                                                                                                                                              Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by shippingMethodKey.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; + } + + public void setShippingMethodKey(final String shippingMethodKey) { + this.shippingMethodKey = shippingMethodKey; + } + + public void setTaxedPrice(final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + MethodTaxedPriceImpl that = (MethodTaxedPriceImpl) o; + + return new EqualsBuilder().append(shippingMethodKey, that.shippingMethodKey) + .append(taxedPrice, that.taxedPrice) + .append(shippingMethodKey, that.shippingMethodKey) + .append(taxedPrice, that.taxedPrice) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(shippingMethodKey).append(taxedPrice).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) + .append("shippingMethodKey", shippingMethodKey) + .append("taxedPrice", taxedPrice) + .build(); + } + + @Override + public MethodTaxedPrice copyDeep() { + return MethodTaxedPrice.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Money.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Money.java index 9b494ac1788..98e2a310c06 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Money.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Money.java @@ -15,17 +15,15 @@ import jakarta.validation.constraints.NotNull; /** - * Money + *

                                                                                                                                                                                              Draft object to store money in cent amounts for a specific currency.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Money money = Money.builder()
                                                                                                                                                                                              + *             .centAmount(0.3)
                                                                                                                                                                                                *             .currencyCode("{currencyCode}")
                                                                                                                                                                                              - *             .centAmount(1)
                                                                                                                                                                                              - *             .fractionDigits(1)
                                                                                                                                                                                              - *             .type(MoneyType.CENT_PRECISION)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -35,36 +33,35 @@ public interface Money { /** - *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              - * @return currencyCode - */ - @NotNull - @JsonProperty("currencyCode") - public String getCurrencyCode(); - - /** - * + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @return centAmount */ @NotNull @JsonProperty("centAmount") - public Integer getCentAmount(); + public Long getCentAmount(); /** - * - * @return fractionDigits + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + * @return currencyCode */ @NotNull - @JsonProperty("fractionDigits") - public Integer getFractionDigits(); + @JsonProperty("currencyCode") + public String getCurrencyCode(); /** - * - * @return type + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param centAmount value to be set */ - @NotNull - @JsonProperty("type") - public MoneyType getType(); + + public void setCentAmount(final Long centAmount); /** *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              @@ -73,27 +70,6 @@ public interface Money { public void setCurrencyCode(final String currencyCode); - /** - * set centAmount - * @param centAmount value to be set - */ - - public void setCentAmount(final Integer centAmount); - - /** - * set fractionDigits - * @param fractionDigits value to be set - */ - - public void setFractionDigits(final Integer fractionDigits); - - /** - * set type - * @param type value to be set - */ - - public void setType(final MoneyType type); - /** * factory method * @return instance of Money @@ -109,10 +85,8 @@ public static Money of() { */ public static Money of(final Money template) { MoneyImpl instance = new MoneyImpl(); - instance.setCurrencyCode(template.getCurrencyCode()); instance.setCentAmount(template.getCentAmount()); - instance.setFractionDigits(template.getFractionDigits()); - instance.setType(template.getType()); + instance.setCurrencyCode(template.getCurrencyCode()); return instance; } @@ -128,11 +102,13 @@ public static Money deepCopy(@Nullable final Money template) { if (template == null) { return null; } + + if (!(template instanceof MoneyImpl)) { + return template.copyDeep(); + } MoneyImpl instance = new MoneyImpl(); - instance.setCurrencyCode(template.getCurrencyCode()); instance.setCentAmount(template.getCentAmount()); - instance.setFractionDigits(template.getFractionDigits()); - instance.setType(template.getType()); + instance.setCurrencyCode(template.getCurrencyCode()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyBuilder.java index 4d96072d758..b455cc2afd9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyBuilder.java @@ -13,10 +13,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Money money = Money.builder()
                                                                                                                                                                                              + *             .centAmount(0.3)
                                                                                                                                                                                                *             .currencyCode("{currencyCode}")
                                                                                                                                                                                              - *             .centAmount(1)
                                                                                                                                                                                              - *             .fractionDigits(1)
                                                                                                                                                                                              - *             .type(MoneyType.CENT_PRECISION)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -24,56 +22,47 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class MoneyBuilder implements Builder { - private String currencyCode; - - private Integer centAmount; - - private Integer fractionDigits; + private Long centAmount; - private com.commercetools.history.models.common.MoneyType type; - - /** - *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              - * @param currencyCode value to be set - * @return Builder - */ - - public MoneyBuilder currencyCode(final String currencyCode) { - this.currencyCode = currencyCode; - return this; - } + private String currencyCode; /** - * set the value to the centAmount + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @param centAmount value to be set * @return Builder */ - public MoneyBuilder centAmount(final Integer centAmount) { + public MoneyBuilder centAmount(final Long centAmount) { this.centAmount = centAmount; return this; } /** - * set the value to the fractionDigits - * @param fractionDigits value to be set + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + * @param currencyCode value to be set * @return Builder */ - public MoneyBuilder fractionDigits(final Integer fractionDigits) { - this.fractionDigits = fractionDigits; + public MoneyBuilder currencyCode(final String currencyCode) { + this.currencyCode = currencyCode; return this; } /** - * set the value to the type - * @param type value to be set - * @return Builder + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return centAmount */ - public MoneyBuilder type(final com.commercetools.history.models.common.MoneyType type) { - this.type = type; - return this; + public Long getCentAmount() { + return this.centAmount; } /** @@ -85,43 +74,14 @@ public String getCurrencyCode() { return this.currencyCode; } - /** - * value of centAmount} - * @return centAmount - */ - - public Integer getCentAmount() { - return this.centAmount; - } - - /** - * value of fractionDigits} - * @return fractionDigits - */ - - public Integer getFractionDigits() { - return this.fractionDigits; - } - - /** - * value of type} - * @return type - */ - - public com.commercetools.history.models.common.MoneyType getType() { - return this.type; - } - /** * builds Money with checking for non-null required values * @return Money */ public Money build() { - Objects.requireNonNull(currencyCode, Money.class + ": currencyCode is missing"); Objects.requireNonNull(centAmount, Money.class + ": centAmount is missing"); - Objects.requireNonNull(fractionDigits, Money.class + ": fractionDigits is missing"); - Objects.requireNonNull(type, Money.class + ": type is missing"); - return new MoneyImpl(currencyCode, centAmount, fractionDigits, type); + Objects.requireNonNull(currencyCode, Money.class + ": currencyCode is missing"); + return new MoneyImpl(centAmount, currencyCode); } /** @@ -129,7 +89,7 @@ public Money build() { * @return Money */ public Money buildUnchecked() { - return new MoneyImpl(currencyCode, centAmount, fractionDigits, type); + return new MoneyImpl(centAmount, currencyCode); } /** @@ -147,10 +107,8 @@ public static MoneyBuilder of() { */ public static MoneyBuilder of(final Money template) { MoneyBuilder builder = new MoneyBuilder(); - builder.currencyCode = template.getCurrencyCode(); builder.centAmount = template.getCentAmount(); - builder.fractionDigits = template.getFractionDigits(); - builder.type = template.getType(); + builder.currencyCode = template.getCurrencyCode(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyImpl.java index 49d1edce9ea..d4ccd31f0a6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyImpl.java @@ -17,31 +17,23 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Money + *

                                                                                                                                                                                              Draft object to store money in cent amounts for a specific currency.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class MoneyImpl implements Money, ModelBase { - private String currencyCode; - - private Integer centAmount; + private Long centAmount; - private Integer fractionDigits; - - private com.commercetools.history.models.common.MoneyType type; + private String currencyCode; /** * create instance with all properties */ @JsonCreator - MoneyImpl(@JsonProperty("currencyCode") final String currencyCode, - @JsonProperty("centAmount") final Integer centAmount, - @JsonProperty("fractionDigits") final Integer fractionDigits, - @JsonProperty("type") final com.commercetools.history.models.common.MoneyType type) { - this.currencyCode = currencyCode; + MoneyImpl(@JsonProperty("centAmount") final Long centAmount, + @JsonProperty("currencyCode") final String currencyCode) { this.centAmount = centAmount; - this.fractionDigits = fractionDigits; - this.type = type; + this.currencyCode = currencyCode; } /** @@ -51,53 +43,33 @@ public MoneyImpl() { } /** - *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              */ - public String getCurrencyCode() { - return this.currencyCode; - } - - /** - * - */ - - public Integer getCentAmount() { + public Long getCentAmount() { return this.centAmount; } /** - * + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              */ - public Integer getFractionDigits() { - return this.fractionDigits; + public String getCurrencyCode() { + return this.currencyCode; } - /** - * - */ - - public com.commercetools.history.models.common.MoneyType getType() { - return this.type; + public void setCentAmount(final Long centAmount) { + this.centAmount = centAmount; } public void setCurrencyCode(final String currencyCode) { this.currencyCode = currencyCode; } - public void setCentAmount(final Integer centAmount) { - this.centAmount = centAmount; - } - - public void setFractionDigits(final Integer fractionDigits) { - this.fractionDigits = fractionDigits; - } - - public void setType(final com.commercetools.history.models.common.MoneyType type) { - this.type = type; - } - @Override public boolean equals(Object o) { if (this == o) @@ -108,32 +80,22 @@ public boolean equals(Object o) { MoneyImpl that = (MoneyImpl) o; - return new EqualsBuilder().append(currencyCode, that.currencyCode) - .append(centAmount, that.centAmount) - .append(fractionDigits, that.fractionDigits) - .append(type, that.type) + return new EqualsBuilder().append(centAmount, that.centAmount) .append(currencyCode, that.currencyCode) .append(centAmount, that.centAmount) - .append(fractionDigits, that.fractionDigits) - .append(type, that.type) + .append(currencyCode, that.currencyCode) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(currencyCode) - .append(centAmount) - .append(fractionDigits) - .append(type) - .toHashCode(); + return new HashCodeBuilder(17, 37).append(centAmount).append(currencyCode).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("currencyCode", currencyCode) - .append("centAmount", centAmount) - .append("fractionDigits", fractionDigits) - .append("type", type) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("centAmount", centAmount) + .append("currencyCode", currencyCode) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyType.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyType.java index 13dd7879030..cd1f5b4292b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyType.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/MoneyType.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * MoneyType + *

                                                                                                                                                                                              Determines the type of money used.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface MoneyType extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/OrderState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/OrderState.java index 88f1a934f02..1d7b4e95d1d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/OrderState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/OrderState.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * OrderState + *

                                                                                                                                                                                              Indicates the state of the Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface OrderState extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Parcel.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Parcel.java index 162242b40d5..aaef14cf660 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Parcel.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Parcel.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -17,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * Parcel + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -25,10 +26,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Parcel parcel = Parcel.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              - *             .measurements(measurementsBuilder -> measurementsBuilder)
                                                                                                                                                                                              - *             .trackingData(trackingDataBuilder -> trackingDataBuilder)
                                                                                                                                                                                              - *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -38,7 +36,7 @@ public interface Parcel { /** - * + *

                                                                                                                                                                                              Unique identifier of the Parcel.

                                                                                                                                                                                              * @return id */ @NotNull @@ -46,70 +44,90 @@ public interface Parcel { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Parcel.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Parcel was created.

                                                                                                                                                                                              * @return createdAt */ @NotNull @JsonProperty("createdAt") - public String getCreatedAt(); + public ZonedDateTime getCreatedAt(); /** - * + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @return measurements */ - @NotNull @Valid @JsonProperty("measurements") public ParcelMeasurements getMeasurements(); /** - * + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @return trackingData */ - @NotNull @Valid @JsonProperty("trackingData") public TrackingData getTrackingData(); /** - * + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @return items */ - @NotNull @Valid @JsonProperty("items") public List getItems(); /** - * set id + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Unique identifier of the Parcel.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set createdAt + *

                                                                                                                                                                                              User-defined unique identifier of the Parcel.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Parcel was created.

                                                                                                                                                                                              * @param createdAt value to be set */ - public void setCreatedAt(final String createdAt); + public void setCreatedAt(final ZonedDateTime createdAt); /** - * set measurements + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @param measurements value to be set */ public void setMeasurements(final ParcelMeasurements measurements); /** - * set trackingData + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @param trackingData value to be set */ public void setTrackingData(final TrackingData trackingData); /** - * set items + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param items values to be set */ @@ -117,12 +135,19 @@ public interface Parcel { public void setItems(final DeliveryItem... items); /** - * set items + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param items values to be set */ public void setItems(final List items); + /** + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + /** * factory method * @return instance of Parcel @@ -139,10 +164,12 @@ public static Parcel of() { public static Parcel of(final Parcel template) { ParcelImpl instance = new ParcelImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setCreatedAt(template.getCreatedAt()); instance.setMeasurements(template.getMeasurements()); instance.setTrackingData(template.getTrackingData()); instance.setItems(template.getItems()); + instance.setCustom(template.getCustom()); return instance; } @@ -160,6 +187,7 @@ public static Parcel deepCopy(@Nullable final Parcel template) { } ParcelImpl instance = new ParcelImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setCreatedAt(template.getCreatedAt()); instance.setMeasurements( com.commercetools.history.models.common.ParcelMeasurements.deepCopy(template.getMeasurements())); @@ -170,6 +198,7 @@ public static Parcel deepCopy(@Nullable final Parcel template) { .map(com.commercetools.history.models.common.DeliveryItem::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelBuilder.java index 645f3dd6d38..3dc5290af42 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,10 +17,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Parcel parcel = Parcel.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              - *             .measurements(measurementsBuilder -> measurementsBuilder)
                                                                                                                                                                                              - *             .trackingData(trackingDataBuilder -> trackingDataBuilder)
                                                                                                                                                                                              - *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -28,16 +27,25 @@ public class ParcelBuilder implements Builder { private String id; - private String createdAt; + @Nullable + private String key; + + private java.time.ZonedDateTime createdAt; + @Nullable private com.commercetools.history.models.common.ParcelMeasurements measurements; + @Nullable private com.commercetools.history.models.common.TrackingData trackingData; + @Nullable private java.util.List items; + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + /** - * set the value to the id + *

                                                                                                                                                                                              Unique identifier of the Parcel.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -48,18 +56,29 @@ public ParcelBuilder id(final String id) { } /** - * set the value to the createdAt + *

                                                                                                                                                                                              User-defined unique identifier of the Parcel.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public ParcelBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Parcel was created.

                                                                                                                                                                                              * @param createdAt value to be set * @return Builder */ - public ParcelBuilder createdAt(final String createdAt) { + public ParcelBuilder createdAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * set the value to the measurements using the builder function + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @param builder function to build the measurements value * @return Builder */ @@ -72,7 +91,7 @@ public ParcelBuilder measurements( } /** - * set the value to the measurements using the builder function + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @param builder function to build the measurements value * @return Builder */ @@ -84,18 +103,19 @@ public ParcelBuilder withMeasurements( } /** - * set the value to the measurements + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @param measurements value to be set * @return Builder */ - public ParcelBuilder measurements(final com.commercetools.history.models.common.ParcelMeasurements measurements) { + public ParcelBuilder measurements( + @Nullable final com.commercetools.history.models.common.ParcelMeasurements measurements) { this.measurements = measurements; return this; } /** - * set the value to the trackingData using the builder function + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @param builder function to build the trackingData value * @return Builder */ @@ -107,7 +127,7 @@ public ParcelBuilder trackingData( } /** - * set the value to the trackingData using the builder function + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @param builder function to build the trackingData value * @return Builder */ @@ -119,45 +139,47 @@ public ParcelBuilder withTrackingData( } /** - * set the value to the trackingData + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @param trackingData value to be set * @return Builder */ - public ParcelBuilder trackingData(final com.commercetools.history.models.common.TrackingData trackingData) { + public ParcelBuilder trackingData( + @Nullable final com.commercetools.history.models.common.TrackingData trackingData) { this.trackingData = trackingData; return this; } /** - * set values to the items + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ - public ParcelBuilder items(final com.commercetools.history.models.common.DeliveryItem... items) { + public ParcelBuilder items(@Nullable final com.commercetools.history.models.common.DeliveryItem... items) { this.items = new ArrayList<>(Arrays.asList(items)); return this; } /** - * set value to the items + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ - public ParcelBuilder items(final java.util.List items) { + public ParcelBuilder items( + @Nullable final java.util.List items) { this.items = items; return this; } /** - * add values to the items + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ - public ParcelBuilder plusItems(final com.commercetools.history.models.common.DeliveryItem... items) { + public ParcelBuilder plusItems(@Nullable final com.commercetools.history.models.common.DeliveryItem... items) { if (this.items == null) { this.items = new ArrayList<>(); } @@ -166,7 +188,7 @@ public ParcelBuilder plusItems(final com.commercetools.history.models.common.Del } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -181,7 +203,7 @@ public ParcelBuilder plusItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -194,7 +216,7 @@ public ParcelBuilder withItems( } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -205,7 +227,7 @@ public ParcelBuilder addItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -216,7 +238,42 @@ public ParcelBuilder setItems( } /** - * value of id} + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ParcelBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ParcelBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public ParcelBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the Parcel.

                                                                                                                                                                                              * @return id */ @@ -225,41 +282,64 @@ public String getId() { } /** - * value of createdAt} + *

                                                                                                                                                                                              User-defined unique identifier of the Parcel.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Parcel was created.

                                                                                                                                                                                              * @return createdAt */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } /** - * value of measurements} + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              * @return measurements */ + @Nullable public com.commercetools.history.models.common.ParcelMeasurements getMeasurements() { return this.measurements; } /** - * value of trackingData} + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              * @return trackingData */ + @Nullable public com.commercetools.history.models.common.TrackingData getTrackingData() { return this.trackingData; } /** - * value of items} + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              * @return items */ + @Nullable public java.util.List getItems() { return this.items; } + /** + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + /** * builds Parcel with checking for non-null required values * @return Parcel @@ -267,10 +347,7 @@ public java.util.List getI public Parcel build() { Objects.requireNonNull(id, Parcel.class + ": id is missing"); Objects.requireNonNull(createdAt, Parcel.class + ": createdAt is missing"); - Objects.requireNonNull(measurements, Parcel.class + ": measurements is missing"); - Objects.requireNonNull(trackingData, Parcel.class + ": trackingData is missing"); - Objects.requireNonNull(items, Parcel.class + ": items is missing"); - return new ParcelImpl(id, createdAt, measurements, trackingData, items); + return new ParcelImpl(id, key, createdAt, measurements, trackingData, items, custom); } /** @@ -278,7 +355,7 @@ public Parcel build() { * @return Parcel */ public Parcel buildUnchecked() { - return new ParcelImpl(id, createdAt, measurements, trackingData, items); + return new ParcelImpl(id, key, createdAt, measurements, trackingData, items, custom); } /** @@ -297,10 +374,12 @@ public static ParcelBuilder of() { public static ParcelBuilder of(final Parcel template) { ParcelBuilder builder = new ParcelBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.createdAt = template.getCreatedAt(); builder.measurements = template.getMeasurements(); builder.trackingData = template.getTrackingData(); builder.items = template.getItems(); + builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelImpl.java index e2287d183c8..be0a3b86c9a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelImpl.java @@ -17,14 +17,16 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Parcel + *

                                                                                                                                                                                              Information regarding the appearance, content, and shipment of a Parcel.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ParcelImpl implements Parcel, ModelBase { private String id; - private String createdAt; + private String key; + + private java.time.ZonedDateTime createdAt; private com.commercetools.history.models.common.ParcelMeasurements measurements; @@ -32,19 +34,25 @@ public class ParcelImpl implements Parcel, ModelBase { private java.util.List items; + private com.commercetools.history.models.common.CustomFields custom; + /** * create instance with all properties */ @JsonCreator - ParcelImpl(@JsonProperty("id") final String id, @JsonProperty("createdAt") final String createdAt, + ParcelImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, @JsonProperty("measurements") final com.commercetools.history.models.common.ParcelMeasurements measurements, @JsonProperty("trackingData") final com.commercetools.history.models.common.TrackingData trackingData, - @JsonProperty("items") final java.util.List items) { + @JsonProperty("items") final java.util.List items, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) { this.id = id; + this.key = key; this.createdAt = createdAt; this.measurements = measurements; this.trackingData = trackingData; this.items = items; + this.custom = custom; } /** @@ -54,7 +62,7 @@ public ParcelImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of the Parcel.

                                                                                                                                                                                              */ public String getId() { @@ -62,15 +70,23 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Parcel.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Parcel was created.

                                                                                                                                                                                              */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } /** - * + *

                                                                                                                                                                                              Information about the dimensions of the Parcel.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.ParcelMeasurements getMeasurements() { @@ -78,7 +94,7 @@ public com.commercetools.history.models.common.ParcelMeasurements getMeasurement } /** - * + *

                                                                                                                                                                                              Shipment tracking information of the Parcel.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.TrackingData getTrackingData() { @@ -86,18 +102,30 @@ public com.commercetools.history.models.common.TrackingData getTrackingData() { } /** - * + *

                                                                                                                                                                                              Line Items or Custom Line Items delivered in this Parcel.

                                                                                                                                                                                              */ public java.util.List getItems() { return this.items; } + /** + *

                                                                                                                                                                                              Custom Fields of the Parcel.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + public void setId(final String id) { this.id = id; } - public void setCreatedAt(final String createdAt) { + public void setKey(final String key) { + this.key = key; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; } @@ -117,6 +145,10 @@ public void setItems(final java.util.List *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ParcelMeasurements parcelMeasurements = ParcelMeasurements.builder()
                                                                                                                                                                                              - *             .heightInMillimeter(1)
                                                                                                                                                                                              - *             .lengthInMillimeter(1)
                                                                                                                                                                                              - *             .widthInMillimeter(1)
                                                                                                                                                                                              - *             .weightInGram(1)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -35,60 +29,60 @@ public interface ParcelMeasurements { /** - * + *

                                                                                                                                                                                              Height of the Parcel.

                                                                                                                                                                                              * @return heightInMillimeter */ - @NotNull + @JsonProperty("heightInMillimeter") public Integer getHeightInMillimeter(); /** - * + *

                                                                                                                                                                                              Length of the Parcel.

                                                                                                                                                                                              * @return lengthInMillimeter */ - @NotNull + @JsonProperty("lengthInMillimeter") public Integer getLengthInMillimeter(); /** - * + *

                                                                                                                                                                                              Width of the Parcel.

                                                                                                                                                                                              * @return widthInMillimeter */ - @NotNull + @JsonProperty("widthInMillimeter") public Integer getWidthInMillimeter(); /** - * + *

                                                                                                                                                                                              Weight of the Parcel.

                                                                                                                                                                                              * @return weightInGram */ - @NotNull + @JsonProperty("weightInGram") public Integer getWeightInGram(); /** - * set heightInMillimeter + *

                                                                                                                                                                                              Height of the Parcel.

                                                                                                                                                                                              * @param heightInMillimeter value to be set */ public void setHeightInMillimeter(final Integer heightInMillimeter); /** - * set lengthInMillimeter + *

                                                                                                                                                                                              Length of the Parcel.

                                                                                                                                                                                              * @param lengthInMillimeter value to be set */ public void setLengthInMillimeter(final Integer lengthInMillimeter); /** - * set widthInMillimeter + *

                                                                                                                                                                                              Width of the Parcel.

                                                                                                                                                                                              * @param widthInMillimeter value to be set */ public void setWidthInMillimeter(final Integer widthInMillimeter); /** - * set weightInGram + *

                                                                                                                                                                                              Weight of the Parcel.

                                                                                                                                                                                              * @param weightInGram value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsBuilder.java index b72a01441a4..dfca3f3dbef 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -13,10 +15,6 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ParcelMeasurements parcelMeasurements = ParcelMeasurements.builder()
                                                                                                                                                                                              - *             .heightInMillimeter(1)
                                                                                                                                                                                              - *             .lengthInMillimeter(1)
                                                                                                                                                                                              - *             .widthInMillimeter(1)
                                                                                                                                                                                              - *             .weightInGram(1)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -24,90 +22,98 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ParcelMeasurementsBuilder implements Builder { + @Nullable private Integer heightInMillimeter; + @Nullable private Integer lengthInMillimeter; + @Nullable private Integer widthInMillimeter; + @Nullable private Integer weightInGram; /** - * set the value to the heightInMillimeter + *

                                                                                                                                                                                              Height of the Parcel.

                                                                                                                                                                                              * @param heightInMillimeter value to be set * @return Builder */ - public ParcelMeasurementsBuilder heightInMillimeter(final Integer heightInMillimeter) { + public ParcelMeasurementsBuilder heightInMillimeter(@Nullable final Integer heightInMillimeter) { this.heightInMillimeter = heightInMillimeter; return this; } /** - * set the value to the lengthInMillimeter + *

                                                                                                                                                                                              Length of the Parcel.

                                                                                                                                                                                              * @param lengthInMillimeter value to be set * @return Builder */ - public ParcelMeasurementsBuilder lengthInMillimeter(final Integer lengthInMillimeter) { + public ParcelMeasurementsBuilder lengthInMillimeter(@Nullable final Integer lengthInMillimeter) { this.lengthInMillimeter = lengthInMillimeter; return this; } /** - * set the value to the widthInMillimeter + *

                                                                                                                                                                                              Width of the Parcel.

                                                                                                                                                                                              * @param widthInMillimeter value to be set * @return Builder */ - public ParcelMeasurementsBuilder widthInMillimeter(final Integer widthInMillimeter) { + public ParcelMeasurementsBuilder widthInMillimeter(@Nullable final Integer widthInMillimeter) { this.widthInMillimeter = widthInMillimeter; return this; } /** - * set the value to the weightInGram + *

                                                                                                                                                                                              Weight of the Parcel.

                                                                                                                                                                                              * @param weightInGram value to be set * @return Builder */ - public ParcelMeasurementsBuilder weightInGram(final Integer weightInGram) { + public ParcelMeasurementsBuilder weightInGram(@Nullable final Integer weightInGram) { this.weightInGram = weightInGram; return this; } /** - * value of heightInMillimeter} + *

                                                                                                                                                                                              Height of the Parcel.

                                                                                                                                                                                              * @return heightInMillimeter */ + @Nullable public Integer getHeightInMillimeter() { return this.heightInMillimeter; } /** - * value of lengthInMillimeter} + *

                                                                                                                                                                                              Length of the Parcel.

                                                                                                                                                                                              * @return lengthInMillimeter */ + @Nullable public Integer getLengthInMillimeter() { return this.lengthInMillimeter; } /** - * value of widthInMillimeter} + *

                                                                                                                                                                                              Width of the Parcel.

                                                                                                                                                                                              * @return widthInMillimeter */ + @Nullable public Integer getWidthInMillimeter() { return this.widthInMillimeter; } /** - * value of weightInGram} + *

                                                                                                                                                                                              Weight of the Parcel.

                                                                                                                                                                                              * @return weightInGram */ + @Nullable public Integer getWeightInGram() { return this.weightInGram; } @@ -117,10 +123,6 @@ public Integer getWeightInGram() { * @return ParcelMeasurements */ public ParcelMeasurements build() { - Objects.requireNonNull(heightInMillimeter, ParcelMeasurements.class + ": heightInMillimeter is missing"); - Objects.requireNonNull(lengthInMillimeter, ParcelMeasurements.class + ": lengthInMillimeter is missing"); - Objects.requireNonNull(widthInMillimeter, ParcelMeasurements.class + ": widthInMillimeter is missing"); - Objects.requireNonNull(weightInGram, ParcelMeasurements.class + ": weightInGram is missing"); return new ParcelMeasurementsImpl(heightInMillimeter, lengthInMillimeter, widthInMillimeter, weightInGram); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsImpl.java index 4ba8f9ebcc5..2d20bd4d8ac 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ParcelMeasurementsImpl.java @@ -51,7 +51,7 @@ public ParcelMeasurementsImpl() { } /** - * + *

                                                                                                                                                                                              Height of the Parcel.

                                                                                                                                                                                              */ public Integer getHeightInMillimeter() { @@ -59,7 +59,7 @@ public Integer getHeightInMillimeter() { } /** - * + *

                                                                                                                                                                                              Length of the Parcel.

                                                                                                                                                                                              */ public Integer getLengthInMillimeter() { @@ -67,7 +67,7 @@ public Integer getLengthInMillimeter() { } /** - * + *

                                                                                                                                                                                              Width of the Parcel.

                                                                                                                                                                                              */ public Integer getWidthInMillimeter() { @@ -75,7 +75,7 @@ public Integer getWidthInMillimeter() { } /** - * + *

                                                                                                                                                                                              Weight of the Parcel.

                                                                                                                                                                                              */ public Integer getWeightInGram() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfo.java index 553b5c5f90a..25e388aa01b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfo.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfo.java @@ -34,28 +34,28 @@ public interface PaymentInfo { /** - * + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @return payments */ @NotNull @Valid @JsonProperty("payments") - public List getPayments(); + public List getPayments(); /** - * set payments + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param payments values to be set */ @JsonIgnore - public void setPayments(final Reference... payments); + public void setPayments(final PaymentReference... payments); /** - * set payments + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param payments values to be set */ - public void setPayments(final List payments); + public void setPayments(final List payments); /** * factory method @@ -91,7 +91,7 @@ public static PaymentInfo deepCopy(@Nullable final PaymentInfo template) { PaymentInfoImpl instance = new PaymentInfoImpl(); instance.setPayments(Optional.ofNullable(template.getPayments()) .map(t -> t.stream() - .map(com.commercetools.history.models.common.Reference::deepCopy) + .map(com.commercetools.history.models.common.PaymentReference::deepCopy) .collect(Collectors.toList())) .orElse(null)); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoBuilder.java index cd8f4a15326..1ae6fb23744 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoBuilder.java @@ -22,38 +22,38 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class PaymentInfoBuilder implements Builder { - private java.util.List payments; + private java.util.List payments; /** - * set values to the payments + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param payments value to be set * @return Builder */ - public PaymentInfoBuilder payments(final com.commercetools.history.models.common.Reference... payments) { + public PaymentInfoBuilder payments(final com.commercetools.history.models.common.PaymentReference... payments) { this.payments = new ArrayList<>(Arrays.asList(payments)); return this; } /** - * set value to the payments + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param payments value to be set * @return Builder */ public PaymentInfoBuilder payments( - final java.util.List payments) { + final java.util.List payments) { this.payments = payments; return this; } /** - * add values to the payments + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param payments value to be set * @return Builder */ - public PaymentInfoBuilder plusPayments(final com.commercetools.history.models.common.Reference... payments) { + public PaymentInfoBuilder plusPayments(final com.commercetools.history.models.common.PaymentReference... payments) { if (this.payments == null) { this.payments = new ArrayList<>(); } @@ -62,61 +62,61 @@ public PaymentInfoBuilder plusPayments(final com.commercetools.history.models.co } /** - * add the value to the payments using the builder function + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param builder function to build the payments value * @return Builder */ public PaymentInfoBuilder plusPayments( - Function builder) { + Function builder) { if (this.payments == null) { this.payments = new ArrayList<>(); } - this.payments.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + this.payments.add(builder.apply(com.commercetools.history.models.common.PaymentReferenceBuilder.of()).build()); return this; } /** - * set the value to the payments using the builder function + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param builder function to build the payments value * @return Builder */ public PaymentInfoBuilder withPayments( - Function builder) { + Function builder) { this.payments = new ArrayList<>(); - this.payments.add(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build()); + this.payments.add(builder.apply(com.commercetools.history.models.common.PaymentReferenceBuilder.of()).build()); return this; } /** - * add the value to the payments using the builder function + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param builder function to build the payments value * @return Builder */ public PaymentInfoBuilder addPayments( - Function builder) { - return plusPayments(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + Function builder) { + return plusPayments(builder.apply(com.commercetools.history.models.common.PaymentReferenceBuilder.of())); } /** - * set the value to the payments using the builder function + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @param builder function to build the payments value * @return Builder */ public PaymentInfoBuilder setPayments( - Function builder) { - return payments(builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of())); + Function builder) { + return payments(builder.apply(com.commercetools.history.models.common.PaymentReferenceBuilder.of())); } /** - * value of payments} + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              * @return payments */ - public java.util.List getPayments() { + public java.util.List getPayments() { return this.payments; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoImpl.java index 116fec0ab8f..b012cf416d7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentInfoImpl.java @@ -22,14 +22,14 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class PaymentInfoImpl implements PaymentInfo, ModelBase { - private java.util.List payments; + private java.util.List payments; /** * create instance with all properties */ @JsonCreator PaymentInfoImpl( - @JsonProperty("payments") final java.util.List payments) { + @JsonProperty("payments") final java.util.List payments) { this.payments = payments; } @@ -40,18 +40,18 @@ public PaymentInfoImpl() { } /** - * + *

                                                                                                                                                                                              References to the Payments associated with the Order.

                                                                                                                                                                                              */ - public java.util.List getPayments() { + public java.util.List getPayments() { return this.payments; } - public void setPayments(final com.commercetools.history.models.common.Reference... payments) { + public void setPayments(final com.commercetools.history.models.common.PaymentReference... payments) { this.payments = new ArrayList<>(Arrays.asList(payments)); } - public void setPayments(final java.util.List payments) { + public void setPayments(final java.util.List payments) { this.payments = payments; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReference.java new file mode 100644 index 00000000000..b9bfff910ce --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Payment.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     PaymentReference paymentReference = PaymentReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("payment") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PaymentReferenceImpl.class) +public interface PaymentReference extends Reference { + + /** + * discriminator value for PaymentReference + */ + String PAYMENT = "payment"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Payment.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Payment.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of PaymentReference + */ + public static PaymentReference of() { + return new PaymentReferenceImpl(); + } + + /** + * factory method to create a shallow copy PaymentReference + * @param template instance to be copied + * @return copy instance + */ + public static PaymentReference of(final PaymentReference template) { + PaymentReferenceImpl instance = new PaymentReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public PaymentReference copyDeep(); + + /** + * factory method to create a deep copy of PaymentReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PaymentReference deepCopy(@Nullable final PaymentReference template) { + if (template == null) { + return null; + } + PaymentReferenceImpl instance = new PaymentReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for PaymentReference + * @return builder + */ + public static PaymentReferenceBuilder builder() { + return PaymentReferenceBuilder.of(); + } + + /** + * create builder for PaymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentReferenceBuilder builder(final PaymentReference template) { + return PaymentReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPaymentReference(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/PaymentReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReferenceBuilder.java new file mode 100644 index 00000000000..e4667cb91a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * PaymentReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     PaymentReference paymentReference = PaymentReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Payment.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public PaymentReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Payment.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds PaymentReference with checking for non-null required values + * @return PaymentReference + */ + public PaymentReference build() { + Objects.requireNonNull(id, PaymentReference.class + ": id is missing"); + return new PaymentReferenceImpl(id); + } + + /** + * builds PaymentReference without checking for non-null required values + * @return PaymentReference + */ + public PaymentReference buildUnchecked() { + return new PaymentReferenceImpl(id); + } + + /** + * factory method for an instance of PaymentReferenceBuilder + * @return builder + */ + public static PaymentReferenceBuilder of() { + return new PaymentReferenceBuilder(); + } + + /** + * create builder for PaymentReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PaymentReferenceBuilder of(final PaymentReference template) { + PaymentReferenceBuilder builder = new PaymentReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReferenceImpl.java new file mode 100644 index 00000000000..c8bbe90ce09 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Payment.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PaymentReferenceImpl implements PaymentReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + PaymentReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + * create empty instance + */ + public PaymentReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("payment"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Payment.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PaymentReferenceImpl that = (PaymentReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public PaymentReference copyDeep() { + return PaymentReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentState.java index 27048c9a6f1..6faba7ba5e6 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PaymentState.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * PaymentState + *

                                                                                                                                                                                              Indicates the payment status for the Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface PaymentState extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Permission.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Permission.java index dc111e32a74..76c5b93821e 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Permission.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Permission.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - *

                                                                                                                                                                                              Permissions grant granular access to Business Units, Carts, Orders, Quotes, and Quote Requests.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Permissions grant granular access to Approval Rules, Approval Flows, Business Units, Carts, Orders, Quotes, Quote Requests, and Shopping Lists.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface Permission extends JsonEnum { @@ -88,6 +88,28 @@ public interface Permission extends JsonEnum { Permission CREATE_QUOTE_REQUESTS_FROM_OTHERS_CARTS = PermissionEnum.CREATE_QUOTE_REQUESTS_FROM_OTHERS_CARTS; + Permission CREATE_APPROVAL_RULES = PermissionEnum.CREATE_APPROVAL_RULES; + + Permission UPDATE_APPROVAL_RULES = PermissionEnum.UPDATE_APPROVAL_RULES; + + Permission UPDATE_APPROVAL_FLOWS = PermissionEnum.UPDATE_APPROVAL_FLOWS; + + Permission VIEW_MY_SHOPPING_LISTS = PermissionEnum.VIEW_MY_SHOPPING_LISTS; + + Permission VIEW_OTHERS_SHOPPING_LISTS = PermissionEnum.VIEW_OTHERS_SHOPPING_LISTS; + + Permission UPDATE_MY_SHOPPING_LISTS = PermissionEnum.UPDATE_MY_SHOPPING_LISTS; + + Permission UPDATE_OTHERS_SHOPPING_LISTS = PermissionEnum.UPDATE_OTHERS_SHOPPING_LISTS; + + Permission CREATE_MY_SHOPPING_LISTS = PermissionEnum.CREATE_MY_SHOPPING_LISTS; + + Permission CREATE_OTHERS_SHOPPING_LISTS = PermissionEnum.CREATE_OTHERS_SHOPPING_LISTS; + + Permission DELETE_MY_SHOPPING_LISTS = PermissionEnum.DELETE_MY_SHOPPING_LISTS; + + Permission DELETE_OTHERS_SHOPPING_LISTS = PermissionEnum.DELETE_OTHERS_SHOPPING_LISTS; + /** * possible values of Permission */ @@ -270,7 +292,62 @@ enum PermissionEnum implements Permission { /** * CreateQuoteRequestsFromOthersCarts */ - CREATE_QUOTE_REQUESTS_FROM_OTHERS_CARTS("CreateQuoteRequestsFromOthersCarts"); + CREATE_QUOTE_REQUESTS_FROM_OTHERS_CARTS("CreateQuoteRequestsFromOthersCarts"), + + /** + * CreateApprovalRules + */ + CREATE_APPROVAL_RULES("CreateApprovalRules"), + + /** + * UpdateApprovalRules + */ + UPDATE_APPROVAL_RULES("UpdateApprovalRules"), + + /** + * UpdateApprovalFlows + */ + UPDATE_APPROVAL_FLOWS("UpdateApprovalFlows"), + + /** + * ViewMyShoppingLists + */ + VIEW_MY_SHOPPING_LISTS("ViewMyShoppingLists"), + + /** + * ViewOthersShoppingLists + */ + VIEW_OTHERS_SHOPPING_LISTS("ViewOthersShoppingLists"), + + /** + * UpdateMyShoppingLists + */ + UPDATE_MY_SHOPPING_LISTS("UpdateMyShoppingLists"), + + /** + * UpdateOthersShoppingLists + */ + UPDATE_OTHERS_SHOPPING_LISTS("UpdateOthersShoppingLists"), + + /** + * CreateMyShoppingLists + */ + CREATE_MY_SHOPPING_LISTS("CreateMyShoppingLists"), + + /** + * CreateOthersShoppingLists + */ + CREATE_OTHERS_SHOPPING_LISTS("CreateOthersShoppingLists"), + + /** + * DeleteMyShoppingLists + */ + DELETE_MY_SHOPPING_LISTS("DeleteMyShoppingLists"), + + /** + * DeleteOthersShoppingLists + */ + DELETE_OTHERS_SHOPPING_LISTS("DeleteOthersShoppingLists"); private final String jsonName; private PermissionEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Price.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Price.java index d98354b73a9..6f5446b15d1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Price.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Price.java @@ -2,8 +2,10 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -16,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * Price + *

                                                                                                                                                                                              The representation for prices embedded in LineItems and in ProductVariants when the ProductPriceMode is Embedded. For the Standalone ProductPriceMode refer to StandalonePrice.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -34,7 +36,7 @@ public interface Price { /** - * + *

                                                                                                                                                                                              Unique identifier of this Price.

                                                                                                                                                                                              * @return id */ @NotNull @@ -42,27 +44,188 @@ public interface Price { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined identifier of the Price. It is unique per ProductVariant.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              * @return value */ @NotNull @Valid @JsonProperty("value") - public Money getValue(); + public TypedMoney getValue(); + + /** + *

                                                                                                                                                                                              Country for which this Price is valid.

                                                                                                                                                                                              + * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupReference getCustomerGroup(); + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelReference getChannel(); + + /** + *

                                                                                                                                                                                              Date and time from which this Price is valid.

                                                                                                                                                                                              + * @return validFrom + */ + + @JsonProperty("validFrom") + public ZonedDateTime getValidFrom(); + + /** + *

                                                                                                                                                                                              Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

                                                                                                                                                                                              + * @return validUntil + */ + + @JsonProperty("validUntil") + public ZonedDateTime getValidUntil(); + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @return discounted + */ + @Valid + @JsonProperty("discounted") + public DiscountedPrice getDiscounted(); + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @return tiers + */ + @Valid + @JsonProperty("tiers") + public List getTiers(); /** - * set id + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *

                                                                                                                                                                                              Unique identifier of this Price.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set value + *

                                                                                                                                                                                              User-defined identifier of the Price. It is unique per ProductVariant.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              * @param value value to be set */ - public void setValue(final Money value); + public void setValue(final TypedMoney value); + + /** + *

                                                                                                                                                                                              Country for which this Price is valid.

                                                                                                                                                                                              + * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupReference customerGroup); + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @param channel value to be set + */ + + public void setChannel(final ChannelReference channel); + + /** + *

                                                                                                                                                                                              Date and time from which this Price is valid.

                                                                                                                                                                                              + * @param validFrom value to be set + */ + + public void setValidFrom(final ZonedDateTime validFrom); + + /** + *

                                                                                                                                                                                              Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

                                                                                                                                                                                              + * @param validUntil value to be set + */ + + public void setValidUntil(final ZonedDateTime validUntil); + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @param discounted value to be set + */ + + public void setDiscounted(final DiscountedPrice discounted); + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param tiers values to be set + */ + + @JsonIgnore + public void setTiers(final PriceTier... tiers); + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param tiers values to be set + */ + + public void setTiers(final List tiers); + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); /** * factory method @@ -80,7 +243,17 @@ public static Price of() { public static Price of(final Price template) { PriceImpl instance = new PriceImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setValue(template.getValue()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setDiscounted(template.getDiscounted()); + instance.setTiers(template.getTiers()); + instance.setCustom(template.getCustom()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); return instance; } @@ -98,7 +271,24 @@ public static Price deepCopy(@Nullable final Price template) { } PriceImpl instance = new PriceImpl(); instance.setId(template.getId()); - instance.setValue(com.commercetools.history.models.common.Money.deepCopy(template.getValue())); + instance.setKey(template.getKey()); + instance.setValue(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getValue())); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup( + com.commercetools.history.models.common.CustomerGroupReference.deepCopy(template.getCustomerGroup())); + instance.setChannel(com.commercetools.history.models.common.ChannelReference.deepCopy(template.getChannel())); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setDiscounted( + com.commercetools.history.models.common.DiscountedPrice.deepCopy(template.getDiscounted())); + instance.setTiers(Optional.ofNullable(template.getTiers()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.PriceTier::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); + instance.setRecurrencePolicy( + com.commercetools.history.models.common.RecurrencePolicyReference.deepCopy(template.getRecurrencePolicy())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceBuilder.java index 6988f943697..3562000490b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -25,10 +27,40 @@ public class PriceBuilder implements Builder { private String id; - private com.commercetools.history.models.common.Money value; + @Nullable + private String key; + + private com.commercetools.history.models.common.TypedMoney value; + + @Nullable + private String country; + + @Nullable + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + @Nullable + private com.commercetools.history.models.common.ChannelReference channel; + + @Nullable + private java.time.ZonedDateTime validFrom; + + @Nullable + private java.time.ZonedDateTime validUntil; + + @Nullable + private com.commercetools.history.models.common.DiscountedPrice discounted; + + @Nullable + private java.util.List tiers; + + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + @Nullable + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; /** - * set the value to the id + *

                                                                                                                                                                                              Unique identifier of this Price.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -39,42 +71,348 @@ public PriceBuilder id(final String id) { } /** - * set the value to the value using the builder function + *

                                                                                                                                                                                              User-defined identifier of the Price. It is unique per ProductVariant.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public PriceBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              + * @param value value to be set + * @return Builder + */ + + public PriceBuilder value(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              * @param builder function to build the value value * @return Builder */ public PriceBuilder value( - Function builder) { - this.value = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function> builder) { + this.value = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); return this; } /** - * set the value to the value using the builder function - * @param builder function to build the value value + *

                                                                                                                                                                                              Country for which this Price is valid.

                                                                                                                                                                                              + * @param country value to be set * @return Builder */ - public PriceBuilder withValue( - Function builder) { - this.value = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + public PriceBuilder country(@Nullable final String country) { + this.country = country; return this; } /** - * set the value to the value - * @param value value to be set + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the customerGroup value * @return Builder */ - public PriceBuilder value(final com.commercetools.history.models.common.Money value) { - this.value = value; + public PriceBuilder customerGroup( + Function builder) { + this.customerGroup = builder.apply(com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the customerGroup value + * @return Builder + */ + + public PriceBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder.apply(com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @param customerGroup value to be set + * @return Builder + */ + + public PriceBuilder customerGroup( + @Nullable final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the channel value + * @return Builder + */ + + public PriceBuilder channel( + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the channel value + * @return Builder + */ + + public PriceBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @param channel value to be set + * @return Builder + */ + + public PriceBuilder channel(@Nullable final com.commercetools.history.models.common.ChannelReference channel) { + this.channel = channel; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time from which this Price is valid.

                                                                                                                                                                                              + * @param validFrom value to be set + * @return Builder + */ + + public PriceBuilder validFrom(@Nullable final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

                                                                                                                                                                                              + * @param validUntil value to be set + * @return Builder + */ + + public PriceBuilder validUntil(@Nullable final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + return this; + } + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @param builder function to build the discounted value + * @return Builder + */ + + public PriceBuilder discounted( + Function builder) { + this.discounted = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @param builder function to build the discounted value + * @return Builder + */ + + public PriceBuilder withDiscounted( + Function builder) { + this.discounted = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @param discounted value to be set + * @return Builder + */ + + public PriceBuilder discounted(@Nullable final com.commercetools.history.models.common.DiscountedPrice discounted) { + this.discounted = discounted; + return this; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param tiers value to be set + * @return Builder + */ + + public PriceBuilder tiers(@Nullable final com.commercetools.history.models.common.PriceTier... tiers) { + this.tiers = new ArrayList<>(Arrays.asList(tiers)); return this; } /** - * value of id} + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param tiers value to be set + * @return Builder + */ + + public PriceBuilder tiers(@Nullable final java.util.List tiers) { + this.tiers = tiers; + return this; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param tiers value to be set + * @return Builder + */ + + public PriceBuilder plusTiers(@Nullable final com.commercetools.history.models.common.PriceTier... tiers) { + if (this.tiers == null) { + this.tiers = new ArrayList<>(); + } + this.tiers.addAll(Arrays.asList(tiers)); + return this; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param builder function to build the tiers value + * @return Builder + */ + + public PriceBuilder plusTiers( + Function builder) { + if (this.tiers == null) { + this.tiers = new ArrayList<>(); + } + this.tiers.add(builder.apply(com.commercetools.history.models.common.PriceTierBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param builder function to build the tiers value + * @return Builder + */ + + public PriceBuilder withTiers( + Function builder) { + this.tiers = new ArrayList<>(); + this.tiers.add(builder.apply(com.commercetools.history.models.common.PriceTierBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param builder function to build the tiers value + * @return Builder + */ + + public PriceBuilder addTiers( + Function builder) { + return plusTiers(builder.apply(com.commercetools.history.models.common.PriceTierBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @param builder function to build the tiers value + * @return Builder + */ + + public PriceBuilder setTiers( + Function builder) { + return tiers(builder.apply(com.commercetools.history.models.common.PriceTierBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public PriceBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public PriceBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public PriceBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceBuilder recurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public PriceBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @param recurrencePolicy value to be set + * @return Builder + */ + + public PriceBuilder recurrencePolicy( + @Nullable final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of this Price.

                                                                                                                                                                                              * @return id */ @@ -83,14 +421,115 @@ public String getId() { } /** - * value of value} + *

                                                                                                                                                                                              User-defined identifier of the Price. It is unique per ProductVariant.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              * @return value */ - public com.commercetools.history.models.common.Money getValue() { + public com.commercetools.history.models.common.TypedMoney getValue() { return this.value; } + /** + *

                                                                                                                                                                                              Country for which this Price is valid.

                                                                                                                                                                                              + * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + * @return customerGroup + */ + + @Nullable + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + * @return channel + */ + + @Nullable + public com.commercetools.history.models.common.ChannelReference getChannel() { + return this.channel; + } + + /** + *

                                                                                                                                                                                              Date and time from which this Price is valid.

                                                                                                                                                                                              + * @return validFrom + */ + + @Nullable + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

                                                                                                                                                                                              Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

                                                                                                                                                                                              + * @return validUntil + */ + + @Nullable + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + * @return discounted + */ + + @Nullable + public com.commercetools.history.models.common.DiscountedPrice getDiscounted() { + return this.discounted; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + * @return tiers + */ + + @Nullable + public java.util.List getTiers() { + return this.tiers; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + /** * builds Price with checking for non-null required values * @return Price @@ -98,7 +537,8 @@ public com.commercetools.history.models.common.Money getValue() { public Price build() { Objects.requireNonNull(id, Price.class + ": id is missing"); Objects.requireNonNull(value, Price.class + ": value is missing"); - return new PriceImpl(id, value); + return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, + custom, recurrencePolicy); } /** @@ -106,7 +546,8 @@ public Price build() { * @return Price */ public Price buildUnchecked() { - return new PriceImpl(id, value); + return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers, + custom, recurrencePolicy); } /** @@ -125,7 +566,17 @@ public static PriceBuilder of() { public static PriceBuilder of(final Price template) { PriceBuilder builder = new PriceBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.value = template.getValue(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.validFrom = template.getValidFrom(); + builder.validUntil = template.getValidUntil(); + builder.discounted = template.getDiscounted(); + builder.tiers = template.getTiers(); + builder.custom = template.getCustom(); + builder.recurrencePolicy = template.getRecurrencePolicy(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceImpl.java index 6ed09b97621..0da95ac7288 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceImpl.java @@ -17,23 +17,62 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Price + *

                                                                                                                                                                                              The representation for prices embedded in LineItems and in ProductVariants when the ProductPriceMode is Embedded. For the Standalone ProductPriceMode refer to StandalonePrice.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class PriceImpl implements Price, ModelBase { private String id; - private com.commercetools.history.models.common.Money value; + private String key; + + private com.commercetools.history.models.common.TypedMoney value; + + private String country; + + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + private com.commercetools.history.models.common.ChannelReference channel; + + private java.time.ZonedDateTime validFrom; + + private java.time.ZonedDateTime validUntil; + + private com.commercetools.history.models.common.DiscountedPrice discounted; + + private java.util.List tiers; + + private com.commercetools.history.models.common.CustomFields custom; + + private com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy; /** * create instance with all properties */ @JsonCreator - PriceImpl(@JsonProperty("id") final String id, - @JsonProperty("value") final com.commercetools.history.models.common.Money value) { + PriceImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("value") final com.commercetools.history.models.common.TypedMoney value, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.history.models.common.CustomerGroupReference customerGroup, + @JsonProperty("channel") final com.commercetools.history.models.common.ChannelReference channel, + @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom, + @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, + @JsonProperty("discounted") final com.commercetools.history.models.common.DiscountedPrice discounted, + @JsonProperty("tiers") final java.util.List tiers, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, + @JsonProperty("recurrencePolicy") final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { this.id = id; + this.key = key; this.value = value; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.validFrom = validFrom; + this.validUntil = validUntil; + this.discounted = discounted; + this.tiers = tiers; + this.custom = custom; + this.recurrencePolicy = recurrencePolicy; } /** @@ -43,7 +82,7 @@ public PriceImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of this Price.

                                                                                                                                                                                              */ public String getId() { @@ -51,21 +90,147 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined identifier of the Price. It is unique per ProductVariant.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getValue() { + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Money value of this Price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { return this.value; } + /** + *

                                                                                                                                                                                              Country for which this Price is valid.

                                                                                                                                                                                              + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              CustomerGroup for which this Price is valid.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + /** + *

                                                                                                                                                                                              ProductDistribution Channel for which this Price is valid.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ChannelReference getChannel() { + return this.channel; + } + + /** + *

                                                                                                                                                                                              Date and time from which this Price is valid.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

                                                                                                                                                                                              Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

                                                                                                                                                                                              Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice value is 0.5, the value is rounded in favor of the customer with half-down rounding.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.DiscountedPrice getDiscounted() { + return this.discounted; + } + + /** + *

                                                                                                                                                                                              Present if different Prices for certain LineItem quantities have been specified.

                                                                                                                                                                                              + *

                                                                                                                                                                                              If discounted is present, the tiered Price is ignored for a Product Variant.

                                                                                                                                                                                              + */ + + public java.util.List getTiers() { + return this.tiers; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Recurrence Policy for which this Price is valid.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + public void setId(final String id) { this.id = id; } - public void setValue(final com.commercetools.history.models.common.Money value) { + public void setKey(final String key) { + this.key = key; + } + + public void setValue(final com.commercetools.history.models.common.TypedMoney value) { this.value = value; } + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup(final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.history.models.common.ChannelReference channel) { + this.channel = channel; + } + + public void setValidFrom(final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + } + + public void setValidUntil(final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + } + + public void setDiscounted(final com.commercetools.history.models.common.DiscountedPrice discounted) { + this.discounted = discounted; + } + + public void setTiers(final com.commercetools.history.models.common.PriceTier... tiers) { + this.tiers = new ArrayList<>(Arrays.asList(tiers)); + } + + public void setTiers(final java.util.List tiers) { + this.tiers = tiers; + } + + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + public void setRecurrencePolicy( + final com.commercetools.history.models.common.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + @Override public boolean equals(Object o) { if (this == o) @@ -77,21 +242,63 @@ public boolean equals(Object o) { PriceImpl that = (PriceImpl) o; return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(value, that.value) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(discounted, that.discounted) + .append(tiers, that.tiers) + .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .append(id, that.id) + .append(key, that.key) .append(value, that.value) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(discounted, that.discounted) + .append(tiers, that.tiers) + .append(custom, that.custom) + .append(recurrencePolicy, that.recurrencePolicy) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(id).append(value).toHashCode(); + return new HashCodeBuilder(17, 37).append(id) + .append(key) + .append(value) + .append(country) + .append(customerGroup) + .append(channel) + .append(validFrom) + .append(validUntil) + .append(discounted) + .append(tiers) + .append(custom) + .append(recurrencePolicy) + .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("value", value) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("validFrom", validFrom) + .append("validUntil", validUntil) + .append("discounted", discounted) + .append("tiers", tiers) + .append("custom", custom) + .append("recurrencePolicy", recurrencePolicy) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceSelectionMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceSelectionMode.java new file mode 100644 index 00000000000..f5367bed788 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceSelectionMode.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 how the price of a Line Item or Custom Line Item is selected during Order creation.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface PriceSelectionMode extends JsonEnum { + + PriceSelectionMode FIXED = PriceSelectionModeEnum.FIXED; + + PriceSelectionMode DYNAMIC = PriceSelectionModeEnum.DYNAMIC; + + /** + * possible values of PriceSelectionMode + */ + enum PriceSelectionModeEnum implements PriceSelectionMode { + /** + * Fixed + */ + FIXED("Fixed"), + + /** + * Dynamic + */ + DYNAMIC("Dynamic"); + private final String jsonName; + + private PriceSelectionModeEnum(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 PriceSelectionMode + * 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 PriceSelectionMode findEnum(String value) { + return findEnumViaJsonName(value).orElse(new PriceSelectionMode() { + @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 PriceSelectionMode[] values() { + return PriceSelectionModeEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTier.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTier.java new file mode 100644 index 00000000000..44b7a1a6a1d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTier.java @@ -0,0 +1,148 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              A Price tier is selected instead of the default Price when a certain quantity of the ProductVariant is added to a Cart and ordered. _For If no Price tier is found for the Order quantity, the base Price is used. A Price tier is applied for the entire quantity of a Product Variant put as LineItem in a Cart as soon as the minimum quantity for the Price tier is reached. The Price tier is applied per Line Item of the Product Variant. If, for example, the same Product Variant appears in the same Cart as several Line Items, (what can be achieved by different values of a Custom Field on the Line Items) for each Line Item the minimum quantity must be reached to get the Price tier.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     PriceTier priceTier = PriceTier.builder()
                                                                                                                                                                                              + *             .minimumQuantity(0.3)
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = PriceTierImpl.class) +public interface PriceTier { + + /** + *

                                                                                                                                                                                              Minimum quantity this Price tier is valid for.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity.

                                                                                                                                                                                              + * @return minimumQuantity + */ + @NotNull + @JsonProperty("minimumQuantity") + public Long getMinimumQuantity(); + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + * @return value + */ + @NotNull + @Valid + @JsonProperty("value") + public TypedMoney getValue(); + + /** + *

                                                                                                                                                                                              Minimum quantity this Price tier is valid for.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity.

                                                                                                                                                                                              + * @param minimumQuantity value to be set + */ + + public void setMinimumQuantity(final Long minimumQuantity); + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + * @param value value to be set + */ + + public void setValue(final TypedMoney value); + + /** + * factory method + * @return instance of PriceTier + */ + public static PriceTier of() { + return new PriceTierImpl(); + } + + /** + * factory method to create a shallow copy PriceTier + * @param template instance to be copied + * @return copy instance + */ + public static PriceTier of(final PriceTier template) { + PriceTierImpl instance = new PriceTierImpl(); + instance.setMinimumQuantity(template.getMinimumQuantity()); + instance.setValue(template.getValue()); + return instance; + } + + public PriceTier copyDeep(); + + /** + * factory method to create a deep copy of PriceTier + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static PriceTier deepCopy(@Nullable final PriceTier template) { + if (template == null) { + return null; + } + PriceTierImpl instance = new PriceTierImpl(); + instance.setMinimumQuantity(template.getMinimumQuantity()); + instance.setValue(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getValue())); + return instance; + } + + /** + * builder factory method for PriceTier + * @return builder + */ + public static PriceTierBuilder builder() { + return PriceTierBuilder.of(); + } + + /** + * create builder for PriceTier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PriceTierBuilder builder(final PriceTier template) { + return PriceTierBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withPriceTier(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/PriceTierBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTierBuilder.java new file mode 100644 index 00000000000..ab8e18adc03 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTierBuilder.java @@ -0,0 +1,125 @@ + +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; + +/** + * PriceTierBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     PriceTier priceTier = PriceTier.builder()
                                                                                                                                                                                              + *             .minimumQuantity(0.3)
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PriceTierBuilder implements Builder { + + private Long minimumQuantity; + + private com.commercetools.history.models.common.TypedMoney value; + + /** + *

                                                                                                                                                                                              Minimum quantity this Price tier is valid for.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity.

                                                                                                                                                                                              + * @param minimumQuantity value to be set + * @return Builder + */ + + public PriceTierBuilder minimumQuantity(final Long minimumQuantity) { + this.minimumQuantity = minimumQuantity; + return this; + } + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + * @param value value to be set + * @return Builder + */ + + public PriceTierBuilder value(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + return this; + } + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + * @param builder function to build the value value + * @return Builder + */ + + public PriceTierBuilder value( + Function> builder) { + this.value = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Minimum quantity this Price tier is valid for.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity.

                                                                                                                                                                                              + * @return minimumQuantity + */ + + public Long getMinimumQuantity() { + return this.minimumQuantity; + } + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + * @return value + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + /** + * builds PriceTier with checking for non-null required values + * @return PriceTier + */ + public PriceTier build() { + Objects.requireNonNull(minimumQuantity, PriceTier.class + ": minimumQuantity is missing"); + Objects.requireNonNull(value, PriceTier.class + ": value is missing"); + return new PriceTierImpl(minimumQuantity, value); + } + + /** + * builds PriceTier without checking for non-null required values + * @return PriceTier + */ + public PriceTier buildUnchecked() { + return new PriceTierImpl(minimumQuantity, value); + } + + /** + * factory method for an instance of PriceTierBuilder + * @return builder + */ + public static PriceTierBuilder of() { + return new PriceTierBuilder(); + } + + /** + * create builder for PriceTier instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static PriceTierBuilder of(final PriceTier template) { + PriceTierBuilder builder = new PriceTierBuilder(); + builder.minimumQuantity = template.getMinimumQuantity(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTierImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTierImpl.java new file mode 100644 index 00000000000..dcd9677aa89 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/PriceTierImpl.java @@ -0,0 +1,104 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              A Price tier is selected instead of the default Price when a certain quantity of the ProductVariant is added to a Cart and ordered. _For If no Price tier is found for the Order quantity, the base Price is used. A Price tier is applied for the entire quantity of a Product Variant put as LineItem in a Cart as soon as the minimum quantity for the Price tier is reached. The Price tier is applied per Line Item of the Product Variant. If, for example, the same Product Variant appears in the same Cart as several Line Items, (what can be achieved by different values of a Custom Field on the Line Items) for each Line Item the minimum quantity must be reached to get the Price tier.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class PriceTierImpl implements PriceTier, ModelBase { + + private Long minimumQuantity; + + private com.commercetools.history.models.common.TypedMoney value; + + /** + * create instance with all properties + */ + @JsonCreator + PriceTierImpl(@JsonProperty("minimumQuantity") final Long minimumQuantity, + @JsonProperty("value") final com.commercetools.history.models.common.TypedMoney value) { + this.minimumQuantity = minimumQuantity; + this.value = value; + } + + /** + * create empty instance + */ + public PriceTierImpl() { + } + + /** + *

                                                                                                                                                                                              Minimum quantity this Price tier is valid for.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same minimumQuantity.

                                                                                                                                                                                              + */ + + public Long getMinimumQuantity() { + return this.minimumQuantity; + } + + /** + *

                                                                                                                                                                                              Money value that applies when the minimumQuantity is greater than or equal to the LineItem quantity.

                                                                                                                                                                                              + *

                                                                                                                                                                                              The currencyCode of a Price tier is always the same as the currencyCode in the value of the related Price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + public void setMinimumQuantity(final Long minimumQuantity) { + this.minimumQuantity = minimumQuantity; + } + + public void setValue(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + PriceTierImpl that = (PriceTierImpl) o; + + return new EqualsBuilder().append(minimumQuantity, that.minimumQuantity) + .append(value, that.value) + .append(minimumQuantity, that.minimumQuantity) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(minimumQuantity).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("minimumQuantity", minimumQuantity) + .append("value", value) + .build(); + } + + @Override + public PriceTier copyDeep() { + return PriceTier.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReference.java new file mode 100644 index 00000000000..fd1aefff9fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a ProductDiscount.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductDiscountReference productDiscountReference = ProductDiscountReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("product-discount") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductDiscountReferenceImpl.class) +public interface ProductDiscountReference extends Reference { + + /** + * discriminator value for ProductDiscountReference + */ + String PRODUCT_DISCOUNT = "product-discount"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductDiscount.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductDiscount.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ProductDiscountReference + */ + public static ProductDiscountReference of() { + return new ProductDiscountReferenceImpl(); + } + + /** + * factory method to create a shallow copy ProductDiscountReference + * @param template instance to be copied + * @return copy instance + */ + public static ProductDiscountReference of(final ProductDiscountReference template) { + ProductDiscountReferenceImpl instance = new ProductDiscountReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ProductDiscountReference copyDeep(); + + /** + * factory method to create a deep copy of ProductDiscountReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductDiscountReference deepCopy(@Nullable final ProductDiscountReference template) { + if (template == null) { + return null; + } + ProductDiscountReferenceImpl instance = new ProductDiscountReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ProductDiscountReference + * @return builder + */ + public static ProductDiscountReferenceBuilder builder() { + return ProductDiscountReferenceBuilder.of(); + } + + /** + * create builder for ProductDiscountReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductDiscountReferenceBuilder builder(final ProductDiscountReference template) { + return ProductDiscountReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductDiscountReference(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/ProductDiscountReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceBuilder.java new file mode 100644 index 00000000000..59ee1ba22fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductDiscountReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductDiscountReference productDiscountReference = ProductDiscountReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductDiscountReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductDiscount.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductDiscountReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductDiscount.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ProductDiscountReference with checking for non-null required values + * @return ProductDiscountReference + */ + public ProductDiscountReference build() { + Objects.requireNonNull(id, ProductDiscountReference.class + ": id is missing"); + return new ProductDiscountReferenceImpl(id); + } + + /** + * builds ProductDiscountReference without checking for non-null required values + * @return ProductDiscountReference + */ + public ProductDiscountReference buildUnchecked() { + return new ProductDiscountReferenceImpl(id); + } + + /** + * factory method for an instance of ProductDiscountReferenceBuilder + * @return builder + */ + public static ProductDiscountReferenceBuilder of() { + return new ProductDiscountReferenceBuilder(); + } + + /** + * create builder for ProductDiscountReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductDiscountReferenceBuilder of(final ProductDiscountReference template) { + ProductDiscountReferenceBuilder builder = new ProductDiscountReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceImpl.java new file mode 100644 index 00000000000..0ecf3f3710b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a ProductDiscount.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductDiscountReferenceImpl implements ProductDiscountReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ProductDiscountReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("product-discount"); + } + + /** + * create empty instance + */ + public ProductDiscountReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("product-discount"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductDiscount.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductDiscountReferenceImpl that = (ProductDiscountReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ProductDiscountReference copyDeep() { + return ProductDiscountReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValue.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValue.java new file mode 100644 index 00000000000..9421a884641 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValue.java @@ -0,0 +1,124 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * ProductDiscountValue + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductDiscountValue productDiscountValue = ProductDiscountValue.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductDiscountValueImpl.class) +public interface ProductDiscountValue { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set type + * @param type value to be set + */ + + public void setType(final String type); + + /** + * factory method + * @return instance of ProductDiscountValue + */ + public static ProductDiscountValue of() { + return new ProductDiscountValueImpl(); + } + + /** + * factory method to create a shallow copy ProductDiscountValue + * @param template instance to be copied + * @return copy instance + */ + public static ProductDiscountValue of(final ProductDiscountValue template) { + ProductDiscountValueImpl instance = new ProductDiscountValueImpl(); + instance.setType(template.getType()); + return instance; + } + + public ProductDiscountValue copyDeep(); + + /** + * factory method to create a deep copy of ProductDiscountValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductDiscountValue deepCopy(@Nullable final ProductDiscountValue template) { + if (template == null) { + return null; + } + ProductDiscountValueImpl instance = new ProductDiscountValueImpl(); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for ProductDiscountValue + * @return builder + */ + public static ProductDiscountValueBuilder builder() { + return ProductDiscountValueBuilder.of(); + } + + /** + * create builder for ProductDiscountValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductDiscountValueBuilder builder(final ProductDiscountValue template) { + return ProductDiscountValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductDiscountValue(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/ProductDiscountValueBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValueBuilder.java new file mode 100644 index 00000000000..f1ad78fb1b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValueBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductDiscountValueBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductDiscountValue productDiscountValue = ProductDiscountValue.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductDiscountValueBuilder implements Builder { + + private String type; + + /** + * set the value to the type + * @param type value to be set + * @return Builder + */ + + public ProductDiscountValueBuilder type(final String type) { + this.type = type; + return this; + } + + /** + * value of type} + * @return type + */ + + public String getType() { + return this.type; + } + + /** + * builds ProductDiscountValue with checking for non-null required values + * @return ProductDiscountValue + */ + public ProductDiscountValue build() { + Objects.requireNonNull(type, ProductDiscountValue.class + ": type is missing"); + return new ProductDiscountValueImpl(type); + } + + /** + * builds ProductDiscountValue without checking for non-null required values + * @return ProductDiscountValue + */ + public ProductDiscountValue buildUnchecked() { + return new ProductDiscountValueImpl(type); + } + + /** + * factory method for an instance of ProductDiscountValueBuilder + * @return builder + */ + public static ProductDiscountValueBuilder of() { + return new ProductDiscountValueBuilder(); + } + + /** + * create builder for ProductDiscountValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductDiscountValueBuilder of(final ProductDiscountValue template) { + ProductDiscountValueBuilder builder = new ProductDiscountValueBuilder(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValueImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValueImpl.java new file mode 100644 index 00000000000..050a39c41a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductDiscountValueImpl.java @@ -0,0 +1,80 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ProductDiscountValue + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductDiscountValueImpl implements ProductDiscountValue, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + ProductDiscountValueImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public ProductDiscountValueImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + public void setType(final String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductDiscountValueImpl that = (ProductDiscountValueImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public ProductDiscountValue copyDeep() { + return ProductDiscountValue.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductPriceModeEnum.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductPriceModeEnum.java new file mode 100644 index 00000000000..8c59ba7764f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductPriceModeEnum.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; + +/** + *

                                                                                                                                                                                              This mode determines the type of Prices used for price selection by Line Items and Products. For more information about the difference between the Prices, see Pricing.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ProductPriceModeEnum extends JsonEnum { + + ProductPriceModeEnum EMBEDDED = ProductPriceModeEnumEnum.EMBEDDED; + + ProductPriceModeEnum STANDALONE = ProductPriceModeEnumEnum.STANDALONE; + + /** + * possible values of ProductPriceModeEnum + */ + enum ProductPriceModeEnumEnum implements ProductPriceModeEnum { + /** + * Embedded + */ + EMBEDDED("Embedded"), + + /** + * Standalone + */ + STANDALONE("Standalone"); + private final String jsonName; + + private ProductPriceModeEnumEnum(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 ProductPriceModeEnum + * 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 ProductPriceModeEnum findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ProductPriceModeEnum() { + @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 ProductPriceModeEnum[] values() { + return ProductPriceModeEnumEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReference.java new file mode 100644 index 00000000000..12cbd48caaa --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Product.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductReference productReference = ProductReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("product") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductReferenceImpl.class) +public interface ProductReference extends Reference { + + /** + * discriminator value for ProductReference + */ + String PRODUCT = "product"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Product.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Product.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ProductReference + */ + public static ProductReference of() { + return new ProductReferenceImpl(); + } + + /** + * factory method to create a shallow copy ProductReference + * @param template instance to be copied + * @return copy instance + */ + public static ProductReference of(final ProductReference template) { + ProductReferenceImpl instance = new ProductReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ProductReference copyDeep(); + + /** + * factory method to create a deep copy of ProductReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductReference deepCopy(@Nullable final ProductReference template) { + if (template == null) { + return null; + } + ProductReferenceImpl instance = new ProductReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ProductReference + * @return builder + */ + public static ProductReferenceBuilder builder() { + return ProductReferenceBuilder.of(); + } + + /** + * create builder for ProductReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductReferenceBuilder builder(final ProductReference template) { + return ProductReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductReference(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/ProductReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReferenceBuilder.java new file mode 100644 index 00000000000..0e13570009c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductReference productReference = ProductReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Product.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Product.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ProductReference with checking for non-null required values + * @return ProductReference + */ + public ProductReference build() { + Objects.requireNonNull(id, ProductReference.class + ": id is missing"); + return new ProductReferenceImpl(id); + } + + /** + * builds ProductReference without checking for non-null required values + * @return ProductReference + */ + public ProductReference buildUnchecked() { + return new ProductReferenceImpl(id); + } + + /** + * factory method for an instance of ProductReferenceBuilder + * @return builder + */ + public static ProductReferenceBuilder of() { + return new ProductReferenceBuilder(); + } + + /** + * create builder for ProductReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductReferenceBuilder of(final ProductReference template) { + ProductReferenceBuilder builder = new ProductReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReferenceImpl.java new file mode 100644 index 00000000000..f93559cbfd2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Product.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductReferenceImpl implements ProductReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ProductReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("product"); + } + + /** + * create empty instance + */ + public ProductReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("product"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Product.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductReferenceImpl that = (ProductReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ProductReference copyDeep() { + return ProductReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReference.java new file mode 100644 index 00000000000..cfeb8c7443a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductSelectionReference productSelectionReference = ProductSelectionReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("product-selection") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductSelectionReferenceImpl.class) +public interface ProductSelectionReference extends Reference { + + /** + * discriminator value for ProductSelectionReference + */ + String PRODUCT_SELECTION = "product-selection"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductSelection.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductSelection.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ProductSelectionReference + */ + public static ProductSelectionReference of() { + return new ProductSelectionReferenceImpl(); + } + + /** + * factory method to create a shallow copy ProductSelectionReference + * @param template instance to be copied + * @return copy instance + */ + public static ProductSelectionReference of(final ProductSelectionReference template) { + ProductSelectionReferenceImpl instance = new ProductSelectionReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ProductSelectionReference copyDeep(); + + /** + * factory method to create a deep copy of ProductSelectionReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductSelectionReference deepCopy(@Nullable final ProductSelectionReference template) { + if (template == null) { + return null; + } + ProductSelectionReferenceImpl instance = new ProductSelectionReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ProductSelectionReference + * @return builder + */ + public static ProductSelectionReferenceBuilder builder() { + return ProductSelectionReferenceBuilder.of(); + } + + /** + * create builder for ProductSelectionReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSelectionReferenceBuilder builder(final ProductSelectionReference template) { + return ProductSelectionReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductSelectionReference(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/ProductSelectionReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceBuilder.java new file mode 100644 index 00000000000..07aa20f3f4e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductSelectionReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductSelectionReference productSelectionReference = ProductSelectionReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSelectionReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductSelection.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductSelectionReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductSelection.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ProductSelectionReference with checking for non-null required values + * @return ProductSelectionReference + */ + public ProductSelectionReference build() { + Objects.requireNonNull(id, ProductSelectionReference.class + ": id is missing"); + return new ProductSelectionReferenceImpl(id); + } + + /** + * builds ProductSelectionReference without checking for non-null required values + * @return ProductSelectionReference + */ + public ProductSelectionReference buildUnchecked() { + return new ProductSelectionReferenceImpl(id); + } + + /** + * factory method for an instance of ProductSelectionReferenceBuilder + * @return builder + */ + public static ProductSelectionReferenceBuilder of() { + return new ProductSelectionReferenceBuilder(); + } + + /** + * create builder for ProductSelectionReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductSelectionReferenceBuilder of(final ProductSelectionReference template) { + ProductSelectionReferenceBuilder builder = new ProductSelectionReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceImpl.java new file mode 100644 index 00000000000..e15e316b76b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductSelectionReferenceImpl implements ProductSelectionReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ProductSelectionReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("product-selection"); + } + + /** + * create empty instance + */ + public ProductSelectionReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("product-selection"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductSelection.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductSelectionReferenceImpl that = (ProductSelectionReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ProductSelectionReference copyDeep() { + return ProductSelectionReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSetting.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSetting.java index de5e540957e..1fee2414f24 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSetting.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSetting.java @@ -34,16 +34,16 @@ public interface ProductSelectionSetting { /** - * + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @return productSelection */ @NotNull @Valid @JsonProperty("productSelection") - public Reference getProductSelection(); + public ProductSelectionReference getProductSelection(); /** - * + *

                                                                                                                                                                                              If true, all Products assigned to this Product Selection are part of the Store's assortment.

                                                                                                                                                                                              * @return active */ @NotNull @@ -51,14 +51,14 @@ public interface ProductSelectionSetting { public Boolean getActive(); /** - * set productSelection + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @param productSelection value to be set */ - public void setProductSelection(final Reference productSelection); + public void setProductSelection(final ProductSelectionReference productSelection); /** - * set active + *

                                                                                                                                                                                              If true, all Products assigned to this Product Selection are part of the Store's assortment.

                                                                                                                                                                                              * @param active value to be set */ @@ -98,7 +98,7 @@ public static ProductSelectionSetting deepCopy(@Nullable final ProductSelectionS } ProductSelectionSettingImpl instance = new ProductSelectionSettingImpl(); instance.setProductSelection( - com.commercetools.history.models.common.Reference.deepCopy(template.getProductSelection())); + com.commercetools.history.models.common.ProductSelectionReference.deepCopy(template.getProductSelection())); instance.setActive(template.getActive()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingBuilder.java index f1dd82ff07f..5d1cfa4c138 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingBuilder.java @@ -23,48 +23,51 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductSelectionSettingBuilder implements Builder { - private com.commercetools.history.models.common.Reference productSelection; + private com.commercetools.history.models.common.ProductSelectionReference productSelection; private Boolean active; /** - * set the value to the productSelection using the builder function + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @param builder function to build the productSelection value * @return Builder */ public ProductSelectionSettingBuilder productSelection( - Function builder) { - this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.productSelection = builder + .apply(com.commercetools.history.models.common.ProductSelectionReferenceBuilder.of()) + .build(); return this; } /** - * set the value to the productSelection using the builder function + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @param builder function to build the productSelection value * @return Builder */ public ProductSelectionSettingBuilder withProductSelection( - Function builder) { - this.productSelection = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.productSelection = builder + .apply(com.commercetools.history.models.common.ProductSelectionReferenceBuilder.of()); return this; } /** - * set the value to the productSelection + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @param productSelection value to be set * @return Builder */ public ProductSelectionSettingBuilder productSelection( - final com.commercetools.history.models.common.Reference productSelection) { + final com.commercetools.history.models.common.ProductSelectionReference productSelection) { this.productSelection = productSelection; return this; } /** - * set the value to the active + *

                                                                                                                                                                                              If true, all Products assigned to this Product Selection are part of the Store's assortment.

                                                                                                                                                                                              * @param active value to be set * @return Builder */ @@ -75,16 +78,16 @@ public ProductSelectionSettingBuilder active(final Boolean active) { } /** - * value of productSelection} + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              * @return productSelection */ - public com.commercetools.history.models.common.Reference getProductSelection() { + public com.commercetools.history.models.common.ProductSelectionReference getProductSelection() { return this.productSelection; } /** - * value of active} + *

                                                                                                                                                                                              If true, all Products assigned to this Product Selection are part of the Store's assortment.

                                                                                                                                                                                              * @return active */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingImpl.java index c17fa944bbd..adc5a9c5ccd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductSelectionSettingImpl.java @@ -22,7 +22,7 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductSelectionSettingImpl implements ProductSelectionSetting, ModelBase { - private com.commercetools.history.models.common.Reference productSelection; + private com.commercetools.history.models.common.ProductSelectionReference productSelection; private Boolean active; @@ -31,7 +31,7 @@ public class ProductSelectionSettingImpl implements ProductSelectionSetting, Mod */ @JsonCreator ProductSelectionSettingImpl( - @JsonProperty("productSelection") final com.commercetools.history.models.common.Reference productSelection, + @JsonProperty("productSelection") final com.commercetools.history.models.common.ProductSelectionReference productSelection, @JsonProperty("active") final Boolean active) { this.productSelection = productSelection; this.active = active; @@ -44,22 +44,23 @@ public ProductSelectionSettingImpl() { } /** - * + *

                                                                                                                                                                                              Reference to a ProductSelection.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getProductSelection() { + public com.commercetools.history.models.common.ProductSelectionReference getProductSelection() { return this.productSelection; } /** - * + *

                                                                                                                                                                                              If true, all Products assigned to this Product Selection are part of the Store's assortment.

                                                                                                                                                                                              */ public Boolean getActive() { return this.active; } - public void setProductSelection(final com.commercetools.history.models.common.Reference productSelection) { + public void setProductSelection( + final com.commercetools.history.models.common.ProductSelectionReference productSelection) { this.productSelection = productSelection; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReference.java new file mode 100644 index 00000000000..4c59f631f7e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a ProductType.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductTypeReference productTypeReference = ProductTypeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("product-type") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTypeReferenceImpl.class) +public interface ProductTypeReference extends Reference { + + /** + * discriminator value for ProductTypeReference + */ + String PRODUCT_TYPE = "product-type"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductType.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductType.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ProductTypeReference + */ + public static ProductTypeReference of() { + return new ProductTypeReferenceImpl(); + } + + /** + * factory method to create a shallow copy ProductTypeReference + * @param template instance to be copied + * @return copy instance + */ + public static ProductTypeReference of(final ProductTypeReference template) { + ProductTypeReferenceImpl instance = new ProductTypeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ProductTypeReference copyDeep(); + + /** + * factory method to create a deep copy of ProductTypeReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTypeReference deepCopy(@Nullable final ProductTypeReference template) { + if (template == null) { + return null; + } + ProductTypeReferenceImpl instance = new ProductTypeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ProductTypeReference + * @return builder + */ + public static ProductTypeReferenceBuilder builder() { + return ProductTypeReferenceBuilder.of(); + } + + /** + * create builder for ProductTypeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTypeReferenceBuilder builder(final ProductTypeReference template) { + return ProductTypeReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTypeReference(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/ProductTypeReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReferenceBuilder.java new file mode 100644 index 00000000000..2fcf077f017 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTypeReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductTypeReference productTypeReference = ProductTypeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTypeReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductType.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductTypeReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductType.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ProductTypeReference with checking for non-null required values + * @return ProductTypeReference + */ + public ProductTypeReference build() { + Objects.requireNonNull(id, ProductTypeReference.class + ": id is missing"); + return new ProductTypeReferenceImpl(id); + } + + /** + * builds ProductTypeReference without checking for non-null required values + * @return ProductTypeReference + */ + public ProductTypeReference buildUnchecked() { + return new ProductTypeReferenceImpl(id); + } + + /** + * factory method for an instance of ProductTypeReferenceBuilder + * @return builder + */ + public static ProductTypeReferenceBuilder of() { + return new ProductTypeReferenceBuilder(); + } + + /** + * create builder for ProductTypeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTypeReferenceBuilder of(final ProductTypeReference template) { + ProductTypeReferenceBuilder builder = new ProductTypeReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReferenceImpl.java new file mode 100644 index 00000000000..4361bd77503 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductTypeReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a ProductType.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTypeReferenceImpl implements ProductTypeReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTypeReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("product-type"); + } + + /** + * create empty instance + */ + public ProductTypeReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("product-type"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ProductType.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTypeReferenceImpl that = (ProductTypeReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ProductTypeReference copyDeep() { + return ProductTypeReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariant.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariant.java new file mode 100644 index 00000000000..8b593505811 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariant.java @@ -0,0 +1,394 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductVariant productVariant = ProductVariant.builder()
                                                                                                                                                                                              + *             .id(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantImpl.class) +public interface ProductVariant { + + /** + *

                                                                                                                                                                                              A unique, sequential identifier of the Product Variant within the Product.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public Long getId(); + + /** + *

                                                                                                                                                                                              User-defined unique SKU of the Product Variant.

                                                                                                                                                                                              + * @return sku + */ + + @JsonProperty("sku") + public String getSku(); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This is different from Product key.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @return prices + */ + @Valid + @JsonProperty("prices") + public List getPrices(); + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @return attributes + */ + @Valid + @JsonProperty("attributes") + public List getAttributes(); + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @return price + */ + @Valid + @JsonProperty("price") + public Price getPrice(); + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @return assets + */ + @Valid + @JsonProperty("assets") + public List getAssets(); + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @return availability + */ + @Valid + @JsonProperty("availability") + public ProductVariantAvailability getAvailability(); + + /** + *

                                                                                                                                                                                              true if the Product Variant matches the search query. Only available in response to a Product Projection Search request.

                                                                                                                                                                                              + * @return isMatchingVariant + */ + + @JsonProperty("isMatchingVariant") + public Boolean getIsMatchingVariant(); + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @return scopedPrice + */ + @Valid + @JsonProperty("scopedPrice") + public ScopedPrice getScopedPrice(); + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection.

                                                                                                                                                                                              + * @return scopedPriceDiscounted + */ + + @JsonProperty("scopedPriceDiscounted") + public Boolean getScopedPriceDiscounted(); + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @return recurrencePrices + */ + @Valid + @JsonProperty("recurrencePrices") + public List getRecurrencePrices(); + + /** + *

                                                                                                                                                                                              A unique, sequential identifier of the Product Variant within the Product.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final Long id); + + /** + *

                                                                                                                                                                                              User-defined unique SKU of the Product Variant.

                                                                                                                                                                                              + * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This is different from Product key.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param prices values to be set + */ + + @JsonIgnore + public void setPrices(final Price... prices); + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param prices values to be set + */ + + public void setPrices(final List prices); + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param attributes values to be set + */ + + @JsonIgnore + public void setAttributes(final Attribute... attributes); + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param attributes values to be set + */ + + public void setAttributes(final List attributes); + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param price value to be set + */ + + public void setPrice(final Price price); + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param images values to be set + */ + + public void setImages(final List images); + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param assets values to be set + */ + + @JsonIgnore + public void setAssets(final Asset... assets); + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param assets values to be set + */ + + public void setAssets(final List assets); + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @param availability value to be set + */ + + public void setAvailability(final ProductVariantAvailability availability); + + /** + *

                                                                                                                                                                                              true if the Product Variant matches the search query. Only available in response to a Product Projection Search request.

                                                                                                                                                                                              + * @param isMatchingVariant value to be set + */ + + public void setIsMatchingVariant(final Boolean isMatchingVariant); + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @param scopedPrice value to be set + */ + + public void setScopedPrice(final ScopedPrice scopedPrice); + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection.

                                                                                                                                                                                              + * @param scopedPriceDiscounted value to be set + */ + + public void setScopedPriceDiscounted(final Boolean scopedPriceDiscounted); + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param recurrencePrices values to be set + */ + + @JsonIgnore + public void setRecurrencePrices(final Price... recurrencePrices); + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param recurrencePrices values to be set + */ + + public void setRecurrencePrices(final List recurrencePrices); + + /** + * factory method + * @return instance of ProductVariant + */ + public static ProductVariant of() { + return new ProductVariantImpl(); + } + + /** + * factory method to create a shallow copy ProductVariant + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariant of(final ProductVariant template) { + ProductVariantImpl instance = new ProductVariantImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setKey(template.getKey()); + instance.setPrices(template.getPrices()); + instance.setAttributes(template.getAttributes()); + instance.setPrice(template.getPrice()); + instance.setImages(template.getImages()); + instance.setAssets(template.getAssets()); + instance.setAvailability(template.getAvailability()); + instance.setIsMatchingVariant(template.getIsMatchingVariant()); + instance.setScopedPrice(template.getScopedPrice()); + instance.setScopedPriceDiscounted(template.getScopedPriceDiscounted()); + instance.setRecurrencePrices(template.getRecurrencePrices()); + return instance; + } + + public ProductVariant copyDeep(); + + /** + * factory method to create a deep copy of ProductVariant + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariant deepCopy(@Nullable final ProductVariant template) { + if (template == null) { + return null; + } + ProductVariantImpl instance = new ProductVariantImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setKey(template.getKey()); + instance.setPrices(Optional.ofNullable(template.getPrices()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Price::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAttributes(Optional.ofNullable(template.getAttributes()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Attribute::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setPrice(com.commercetools.history.models.common.Price.deepCopy(template.getPrice())); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAssets(Optional.ofNullable(template.getAssets()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Asset::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAvailability( + com.commercetools.history.models.common.ProductVariantAvailability.deepCopy(template.getAvailability())); + instance.setIsMatchingVariant(template.getIsMatchingVariant()); + instance.setScopedPrice( + com.commercetools.history.models.common.ScopedPrice.deepCopy(template.getScopedPrice())); + instance.setScopedPriceDiscounted(template.getScopedPriceDiscounted()); + instance.setRecurrencePrices(Optional.ofNullable(template.getRecurrencePrices()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Price::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductVariant + * @return builder + */ + public static ProductVariantBuilder builder() { + return ProductVariantBuilder.of(); + } + + /** + * create builder for ProductVariant instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantBuilder builder(final ProductVariant template) { + return ProductVariantBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariant(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/ProductVariantAvailability.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailability.java index 4a6f29a3eea..af1915b8d71 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailability.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailability.java @@ -13,20 +13,15 @@ import io.vrap.rmf.base.client.utils.Generated; import jakarta.validation.Valid; -import jakarta.validation.constraints.NotNull; /** - * ProductVariantAvailability + *

                                                                                                                                                                                              The InventoryEntry information of the Product Variant. If there is a supply Channel for the InventoryEntry, then channels is returned. If not, then isOnStock, restockableInDays, and availableQuantity are returned.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
                                                                                                                                                                                              - *             .isOnStock(true)
                                                                                                                                                                                              - *             .restockableInDays(1)
                                                                                                                                                                                              - *             .availableQuantity(1)
                                                                                                                                                                                              - *             .channels(channelsBuilder -> channelsBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -36,65 +31,94 @@ public interface ProductVariantAvailability { /** - * + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @return channels + */ + @Valid + @JsonProperty("channels") + public ProductVariantChannelAvailabilityMap getChannels(); + + /** + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock.

                                                                                                                                                                                              * @return isOnStock */ - @NotNull + @JsonProperty("isOnStock") public Boolean getIsOnStock(); /** - * + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock.

                                                                                                                                                                                              * @return restockableInDays */ - @NotNull + @JsonProperty("restockableInDays") - public Integer getRestockableInDays(); + public Long getRestockableInDays(); /** - * + *

                                                                                                                                                                                              Number of items of the Product Variant that are in stock.

                                                                                                                                                                                              * @return availableQuantity */ - @NotNull + @JsonProperty("availableQuantity") - public Integer getAvailableQuantity(); + public Long getAvailableQuantity(); /** - * - * @return channels + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @return id */ - @NotNull - @Valid - @JsonProperty("channels") - public ProductVariantChannelAvailabilityMap getChannels(); + + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @return version + */ + + @JsonProperty("version") + public Long getVersion(); /** - * set isOnStock + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @param channels value to be set + */ + + public void setChannels(final ProductVariantChannelAvailabilityMap channels); + + /** + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock.

                                                                                                                                                                                              * @param isOnStock value to be set */ public void setIsOnStock(final Boolean isOnStock); /** - * set restockableInDays + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock.

                                                                                                                                                                                              * @param restockableInDays value to be set */ - public void setRestockableInDays(final Integer restockableInDays); + public void setRestockableInDays(final Long restockableInDays); /** - * set availableQuantity + *

                                                                                                                                                                                              Number of items of the Product Variant that are in stock.

                                                                                                                                                                                              * @param availableQuantity value to be set */ - public void setAvailableQuantity(final Integer availableQuantity); + public void setAvailableQuantity(final Long availableQuantity); /** - * set channels - * @param channels value to be set + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @param id value to be set */ - public void setChannels(final ProductVariantChannelAvailabilityMap channels); + public void setId(final String id); + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @param version value to be set + */ + + public void setVersion(final Long version); /** * factory method @@ -111,10 +135,12 @@ public static ProductVariantAvailability of() { */ public static ProductVariantAvailability of(final ProductVariantAvailability template) { ProductVariantAvailabilityImpl instance = new ProductVariantAvailabilityImpl(); + instance.setChannels(template.getChannels()); instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); - instance.setChannels(template.getChannels()); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } @@ -131,11 +157,13 @@ public static ProductVariantAvailability deepCopy(@Nullable final ProductVariant return null; } ProductVariantAvailabilityImpl instance = new ProductVariantAvailabilityImpl(); + instance.setChannels(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap + .deepCopy(template.getChannels())); instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); - instance.setChannels(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap - .deepCopy(template.getChannels())); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityBuilder.java index 0137546d0cd..bc99d689166 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,10 +16,6 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantAvailability productVariantAvailability = ProductVariantAvailability.builder()
                                                                                                                                                                                              - *             .isOnStock(true)
                                                                                                                                                                                              - *             .restockableInDays(1)
                                                                                                                                                                                              - *             .availableQuantity(1)
                                                                                                                                                                                              - *             .channels(channelsBuilder -> channelsBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -25,120 +23,176 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantAvailabilityBuilder implements Builder { + @Nullable + private com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels; + + @Nullable private Boolean isOnStock; - private Integer restockableInDays; + @Nullable + private Long restockableInDays; - private Integer availableQuantity; + @Nullable + private Long availableQuantity; - private com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels; + @Nullable + private String id; + + @Nullable + private Long version; + + /** + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @param builder function to build the channels value + * @return Builder + */ + + public ProductVariantAvailabilityBuilder channels( + Function builder) { + this.channels = builder + .apply(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapBuilder.of()) + .build(); + return this; + } /** - * set the value to the isOnStock + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @param builder function to build the channels value + * @return Builder + */ + + public ProductVariantAvailabilityBuilder withChannels( + Function builder) { + this.channels = builder + .apply(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @param channels value to be set + * @return Builder + */ + + public ProductVariantAvailabilityBuilder channels( + @Nullable final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels) { + this.channels = channels; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock.

                                                                                                                                                                                              * @param isOnStock value to be set * @return Builder */ - public ProductVariantAvailabilityBuilder isOnStock(final Boolean isOnStock) { + public ProductVariantAvailabilityBuilder isOnStock(@Nullable final Boolean isOnStock) { this.isOnStock = isOnStock; return this; } /** - * set the value to the restockableInDays + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock.

                                                                                                                                                                                              * @param restockableInDays value to be set * @return Builder */ - public ProductVariantAvailabilityBuilder restockableInDays(final Integer restockableInDays) { + public ProductVariantAvailabilityBuilder restockableInDays(@Nullable final Long restockableInDays) { this.restockableInDays = restockableInDays; return this; } /** - * set the value to the availableQuantity + *

                                                                                                                                                                                              Number of items of the Product Variant that are in stock.

                                                                                                                                                                                              * @param availableQuantity value to be set * @return Builder */ - public ProductVariantAvailabilityBuilder availableQuantity(final Integer availableQuantity) { + public ProductVariantAvailabilityBuilder availableQuantity(@Nullable final Long availableQuantity) { this.availableQuantity = availableQuantity; return this; } /** - * set the value to the channels using the builder function - * @param builder function to build the channels value + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @param id value to be set * @return Builder */ - public ProductVariantAvailabilityBuilder channels( - Function builder) { - this.channels = builder - .apply(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapBuilder.of()) - .build(); + public ProductVariantAvailabilityBuilder id(@Nullable final String id) { + this.id = id; return this; } /** - * set the value to the channels using the builder function - * @param builder function to build the channels value + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @param version value to be set * @return Builder */ - public ProductVariantAvailabilityBuilder withChannels( - Function builder) { - this.channels = builder - .apply(com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapBuilder.of()); + public ProductVariantAvailabilityBuilder version(@Nullable final Long version) { + this.version = version; return this; } /** - * set the value to the channels - * @param channels value to be set - * @return Builder + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + * @return channels */ - public ProductVariantAvailabilityBuilder channels( - final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels) { - this.channels = channels; - return this; + @Nullable + public com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap getChannels() { + return this.channels; } /** - * value of isOnStock} + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock.

                                                                                                                                                                                              * @return isOnStock */ + @Nullable public Boolean getIsOnStock() { return this.isOnStock; } /** - * value of restockableInDays} + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock.

                                                                                                                                                                                              * @return restockableInDays */ - public Integer getRestockableInDays() { + @Nullable + public Long getRestockableInDays() { return this.restockableInDays; } /** - * value of availableQuantity} + *

                                                                                                                                                                                              Number of items of the Product Variant that are in stock.

                                                                                                                                                                                              * @return availableQuantity */ - public Integer getAvailableQuantity() { + @Nullable + public Long getAvailableQuantity() { return this.availableQuantity; } /** - * value of channels} - * @return channels + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @return id */ - public com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap getChannels() { - return this.channels; + @Nullable + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @return version + */ + + @Nullable + public Long getVersion() { + return this.version; } /** @@ -146,11 +200,8 @@ public com.commercetools.history.models.common.ProductVariantChannelAvailability * @return ProductVariantAvailability */ public ProductVariantAvailability build() { - Objects.requireNonNull(isOnStock, ProductVariantAvailability.class + ": isOnStock is missing"); - Objects.requireNonNull(restockableInDays, ProductVariantAvailability.class + ": restockableInDays is missing"); - Objects.requireNonNull(availableQuantity, ProductVariantAvailability.class + ": availableQuantity is missing"); - Objects.requireNonNull(channels, ProductVariantAvailability.class + ": channels is missing"); - return new ProductVariantAvailabilityImpl(isOnStock, restockableInDays, availableQuantity, channels); + return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity, id, + version); } /** @@ -158,7 +209,8 @@ public ProductVariantAvailability build() { * @return ProductVariantAvailability */ public ProductVariantAvailability buildUnchecked() { - return new ProductVariantAvailabilityImpl(isOnStock, restockableInDays, availableQuantity, channels); + return new ProductVariantAvailabilityImpl(channels, isOnStock, restockableInDays, availableQuantity, id, + version); } /** @@ -176,10 +228,12 @@ public static ProductVariantAvailabilityBuilder of() { */ public static ProductVariantAvailabilityBuilder of(final ProductVariantAvailability template) { ProductVariantAvailabilityBuilder builder = new ProductVariantAvailabilityBuilder(); + builder.channels = template.getChannels(); builder.isOnStock = template.getIsOnStock(); builder.restockableInDays = template.getRestockableInDays(); builder.availableQuantity = template.getAvailableQuantity(); - builder.channels = template.getChannels(); + builder.id = template.getId(); + builder.version = template.getVersion(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityImpl.java index 38b171833df..7b4429f43dd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityImpl.java @@ -17,31 +17,39 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ProductVariantAvailability + *

                                                                                                                                                                                              The InventoryEntry information of the Product Variant. If there is a supply Channel for the InventoryEntry, then channels is returned. If not, then isOnStock, restockableInDays, and availableQuantity are returned.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantAvailabilityImpl implements ProductVariantAvailability, ModelBase { + private com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels; + private Boolean isOnStock; - private Integer restockableInDays; + private Long restockableInDays; - private Integer availableQuantity; + private Long availableQuantity; - private com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels; + private String id; + + private Long version; /** * create instance with all properties */ @JsonCreator - ProductVariantAvailabilityImpl(@JsonProperty("isOnStock") final Boolean isOnStock, - @JsonProperty("restockableInDays") final Integer restockableInDays, - @JsonProperty("availableQuantity") final Integer availableQuantity, - @JsonProperty("channels") final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels) { + ProductVariantAvailabilityImpl( + @JsonProperty("channels") final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels, + @JsonProperty("isOnStock") final Boolean isOnStock, + @JsonProperty("restockableInDays") final Long restockableInDays, + @JsonProperty("availableQuantity") final Long availableQuantity, @JsonProperty("id") final String id, + @JsonProperty("version") final Long version) { + this.channels = channels; this.isOnStock = isOnStock; this.restockableInDays = restockableInDays; this.availableQuantity = availableQuantity; - this.channels = channels; + this.id = id; + this.version = version; } /** @@ -51,7 +59,15 @@ public ProductVariantAvailabilityImpl() { } /** - * + *

                                                                                                                                                                                              For each InventoryEntry with a supply Channel, an entry is added to channels.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap getChannels() { + return this.channels; + } + + /** + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock.

                                                                                                                                                                                              */ public Boolean getIsOnStock() { @@ -59,44 +75,60 @@ public Boolean getIsOnStock() { } /** - * + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock.

                                                                                                                                                                                              */ - public Integer getRestockableInDays() { + public Long getRestockableInDays() { return this.restockableInDays; } /** - * + *

                                                                                                                                                                                              Number of items of the Product Variant that are in stock.

                                                                                                                                                                                              */ - public Integer getAvailableQuantity() { + public Long getAvailableQuantity() { return this.availableQuantity; } /** - * + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap getChannels() { - return this.channels; + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + */ + + public Long getVersion() { + return this.version; + } + + public void setChannels( + final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels) { + this.channels = channels; } public void setIsOnStock(final Boolean isOnStock) { this.isOnStock = isOnStock; } - public void setRestockableInDays(final Integer restockableInDays) { + public void setRestockableInDays(final Long restockableInDays) { this.restockableInDays = restockableInDays; } - public void setAvailableQuantity(final Integer availableQuantity) { + public void setAvailableQuantity(final Long availableQuantity) { this.availableQuantity = availableQuantity; } - public void setChannels( - final com.commercetools.history.models.common.ProductVariantChannelAvailabilityMap channels) { - this.channels = channels; + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; } @Override @@ -109,32 +141,40 @@ public boolean equals(Object o) { ProductVariantAvailabilityImpl that = (ProductVariantAvailabilityImpl) o; - return new EqualsBuilder().append(isOnStock, that.isOnStock) + return new EqualsBuilder().append(channels, that.channels) + .append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) + .append(id, that.id) + .append(version, that.version) .append(channels, that.channels) .append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) - .append(channels, that.channels) + .append(id, that.id) + .append(version, that.version) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(isOnStock) + return new HashCodeBuilder(17, 37).append(channels) + .append(isOnStock) .append(restockableInDays) .append(availableQuantity) - .append(channels) + .append(id) + .append(version) .toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("isOnStock", isOnStock) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("channels", channels) + .append("isOnStock", isOnStock) .append("restockableInDays", restockableInDays) .append("availableQuantity", availableQuantity) - .append("channels", channels) + .append("id", id) + .append("version", version) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantBuilder.java new file mode 100644 index 00000000000..e9c78a71956 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantBuilder.java @@ -0,0 +1,850 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductVariant productVariant = ProductVariant.builder()
                                                                                                                                                                                              + *             .id(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantBuilder implements Builder { + + private Long id; + + @Nullable + private String sku; + + @Nullable + private String key; + + @Nullable + private java.util.List prices; + + @Nullable + private java.util.List attributes; + + @Nullable + private com.commercetools.history.models.common.Price price; + + @Nullable + private java.util.List images; + + @Nullable + private java.util.List assets; + + @Nullable + private com.commercetools.history.models.common.ProductVariantAvailability availability; + + @Nullable + private Boolean isMatchingVariant; + + @Nullable + private com.commercetools.history.models.common.ScopedPrice scopedPrice; + + @Nullable + private Boolean scopedPriceDiscounted; + + @Nullable + private java.util.List recurrencePrices; + + /** + *

                                                                                                                                                                                              A unique, sequential identifier of the Product Variant within the Product.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductVariantBuilder id(final Long id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined unique SKU of the Product Variant.

                                                                                                                                                                                              + * @param sku value to be set + * @return Builder + */ + + public ProductVariantBuilder sku(@Nullable final String sku) { + this.sku = sku; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This is different from Product key.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public ProductVariantBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param prices value to be set + * @return Builder + */ + + public ProductVariantBuilder prices(@Nullable final com.commercetools.history.models.common.Price... prices) { + this.prices = new ArrayList<>(Arrays.asList(prices)); + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param prices value to be set + * @return Builder + */ + + public ProductVariantBuilder prices( + @Nullable final java.util.List prices) { + this.prices = prices; + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param prices value to be set + * @return Builder + */ + + public ProductVariantBuilder plusPrices(@Nullable final com.commercetools.history.models.common.Price... prices) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(Arrays.asList(prices)); + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param builder function to build the prices value + * @return Builder + */ + + public ProductVariantBuilder plusPrices( + Function builder) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param builder function to build the prices value + * @return Builder + */ + + public ProductVariantBuilder withPrices( + Function builder) { + this.prices = new ArrayList<>(); + this.prices.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param builder function to build the prices value + * @return Builder + */ + + public ProductVariantBuilder addPrices( + Function builder) { + return plusPrices(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @param builder function to build the prices value + * @return Builder + */ + + public ProductVariantBuilder setPrices( + Function builder) { + return prices(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param attributes value to be set + * @return Builder + */ + + public ProductVariantBuilder attributes( + @Nullable final com.commercetools.history.models.common.Attribute... attributes) { + this.attributes = new ArrayList<>(Arrays.asList(attributes)); + return this; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param attributes value to be set + * @return Builder + */ + + public ProductVariantBuilder attributes( + @Nullable final java.util.List attributes) { + this.attributes = attributes; + return this; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param attributes value to be set + * @return Builder + */ + + public ProductVariantBuilder plusAttributes( + @Nullable final com.commercetools.history.models.common.Attribute... attributes) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.addAll(Arrays.asList(attributes)); + return this; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantBuilder plusAttributes( + Function builder) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantBuilder withAttributes( + Function builder) { + this.attributes = new ArrayList<>(); + this.attributes.add(builder.apply(com.commercetools.history.models.common.AttributeBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantBuilder addAttributes( + Function builder) { + return plusAttributes(builder.apply(com.commercetools.history.models.common.AttributeBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantBuilder setAttributes( + Function builder) { + return attributes(builder.apply(com.commercetools.history.models.common.AttributeBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public ProductVariantBuilder price( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public ProductVariantBuilder withPrice( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.PriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param price value to be set + * @return Builder + */ + + public ProductVariantBuilder price(@Nullable final com.commercetools.history.models.common.Price price) { + this.price = price; + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param images value to be set + * @return Builder + */ + + public ProductVariantBuilder images(@Nullable final com.commercetools.history.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param images value to be set + * @return Builder + */ + + public ProductVariantBuilder images( + @Nullable final java.util.List images) { + this.images = images; + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param images value to be set + * @return Builder + */ + + public ProductVariantBuilder plusImages(@Nullable final com.commercetools.history.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.history.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.history.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.history.models.common.ImageBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.history.models.common.ImageBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param assets value to be set + * @return Builder + */ + + public ProductVariantBuilder assets(@Nullable final com.commercetools.history.models.common.Asset... assets) { + this.assets = new ArrayList<>(Arrays.asList(assets)); + return this; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param assets value to be set + * @return Builder + */ + + public ProductVariantBuilder assets( + @Nullable final java.util.List assets) { + this.assets = assets; + return this; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param assets value to be set + * @return Builder + */ + + public ProductVariantBuilder plusAssets(@Nullable final com.commercetools.history.models.common.Asset... assets) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.addAll(Arrays.asList(assets)); + return this; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantBuilder plusAssets( + Function builder) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(builder.apply(com.commercetools.history.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantBuilder withAssets( + Function builder) { + this.assets = new ArrayList<>(); + this.assets.add(builder.apply(com.commercetools.history.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantBuilder addAssets( + Function builder) { + return plusAssets(builder.apply(com.commercetools.history.models.common.AssetBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantBuilder setAssets( + Function builder) { + return assets(builder.apply(com.commercetools.history.models.common.AssetBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @param builder function to build the availability value + * @return Builder + */ + + public ProductVariantBuilder availability( + Function builder) { + this.availability = builder + .apply(com.commercetools.history.models.common.ProductVariantAvailabilityBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @param builder function to build the availability value + * @return Builder + */ + + public ProductVariantBuilder withAvailability( + Function builder) { + this.availability = builder + .apply(com.commercetools.history.models.common.ProductVariantAvailabilityBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @param availability value to be set + * @return Builder + */ + + public ProductVariantBuilder availability( + @Nullable final com.commercetools.history.models.common.ProductVariantAvailability availability) { + this.availability = availability; + return this; + } + + /** + *

                                                                                                                                                                                              true if the Product Variant matches the search query. Only available in response to a Product Projection Search request.

                                                                                                                                                                                              + * @param isMatchingVariant value to be set + * @return Builder + */ + + public ProductVariantBuilder isMatchingVariant(@Nullable final Boolean isMatchingVariant) { + this.isMatchingVariant = isMatchingVariant; + return this; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @param builder function to build the scopedPrice value + * @return Builder + */ + + public ProductVariantBuilder scopedPrice( + Function builder) { + this.scopedPrice = builder.apply(com.commercetools.history.models.common.ScopedPriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @param builder function to build the scopedPrice value + * @return Builder + */ + + public ProductVariantBuilder withScopedPrice( + Function builder) { + this.scopedPrice = builder.apply(com.commercetools.history.models.common.ScopedPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @param scopedPrice value to be set + * @return Builder + */ + + public ProductVariantBuilder scopedPrice( + @Nullable final com.commercetools.history.models.common.ScopedPrice scopedPrice) { + this.scopedPrice = scopedPrice; + return this; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection.

                                                                                                                                                                                              + * @param scopedPriceDiscounted value to be set + * @return Builder + */ + + public ProductVariantBuilder scopedPriceDiscounted(@Nullable final Boolean scopedPriceDiscounted) { + this.scopedPriceDiscounted = scopedPriceDiscounted; + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder recurrencePrices( + @Nullable final com.commercetools.history.models.common.Price... recurrencePrices) { + this.recurrencePrices = new ArrayList<>(Arrays.asList(recurrencePrices)); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder recurrencePrices( + @Nullable final java.util.List recurrencePrices) { + this.recurrencePrices = recurrencePrices; + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param recurrencePrices value to be set + * @return Builder + */ + + public ProductVariantBuilder plusRecurrencePrices( + @Nullable final com.commercetools.history.models.common.Price... recurrencePrices) { + if (this.recurrencePrices == null) { + this.recurrencePrices = new ArrayList<>(); + } + this.recurrencePrices.addAll(Arrays.asList(recurrencePrices)); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder plusRecurrencePrices( + Function builder) { + if (this.recurrencePrices == null) { + this.recurrencePrices = new ArrayList<>(); + } + this.recurrencePrices.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder withRecurrencePrices( + Function builder) { + this.recurrencePrices = new ArrayList<>(); + this.recurrencePrices.add(builder.apply(com.commercetools.history.models.common.PriceBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder addRecurrencePrices( + Function builder) { + return plusRecurrencePrices(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @param builder function to build the recurrencePrices value + * @return Builder + */ + + public ProductVariantBuilder setRecurrencePrices( + Function builder) { + return recurrencePrices(builder.apply(com.commercetools.history.models.common.PriceBuilder.of())); + } + + /** + *

                                                                                                                                                                                              A unique, sequential identifier of the Product Variant within the Product.

                                                                                                                                                                                              + * @return id + */ + + public Long getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined unique SKU of the Product Variant.

                                                                                                                                                                                              + * @return sku + */ + + @Nullable + public String getSku() { + return this.sku; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This is different from Product key.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + * @return prices + */ + + @Nullable + public java.util.List getPrices() { + return this.prices; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + * @return attributes + */ + + @Nullable + public java.util.List getAttributes() { + return this.attributes; + } + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @return price + */ + + @Nullable + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + * @return assets + */ + + @Nullable + public java.util.List getAssets() { + return this.assets; + } + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + * @return availability + */ + + @Nullable + public com.commercetools.history.models.common.ProductVariantAvailability getAvailability() { + return this.availability; + } + + /** + *

                                                                                                                                                                                              true if the Product Variant matches the search query. Only available in response to a Product Projection Search request.

                                                                                                                                                                                              + * @return isMatchingVariant + */ + + @Nullable + public Boolean getIsMatchingVariant() { + return this.isMatchingVariant; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + * @return scopedPrice + */ + + @Nullable + public com.commercetools.history.models.common.ScopedPrice getScopedPrice() { + return this.scopedPrice; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection.

                                                                                                                                                                                              + * @return scopedPriceDiscounted + */ + + @Nullable + public Boolean getScopedPriceDiscounted() { + return this.scopedPriceDiscounted; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + * @return recurrencePrices + */ + + @Nullable + public java.util.List getRecurrencePrices() { + return this.recurrencePrices; + } + + /** + * builds ProductVariant with checking for non-null required values + * @return ProductVariant + */ + public ProductVariant build() { + Objects.requireNonNull(id, ProductVariant.class + ": id is missing"); + return new ProductVariantImpl(id, sku, key, prices, attributes, price, images, assets, availability, + isMatchingVariant, scopedPrice, scopedPriceDiscounted, recurrencePrices); + } + + /** + * builds ProductVariant without checking for non-null required values + * @return ProductVariant + */ + public ProductVariant buildUnchecked() { + return new ProductVariantImpl(id, sku, key, prices, attributes, price, images, assets, availability, + isMatchingVariant, scopedPrice, scopedPriceDiscounted, recurrencePrices); + } + + /** + * factory method for an instance of ProductVariantBuilder + * @return builder + */ + public static ProductVariantBuilder of() { + return new ProductVariantBuilder(); + } + + /** + * create builder for ProductVariant instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantBuilder of(final ProductVariant template) { + ProductVariantBuilder builder = new ProductVariantBuilder(); + builder.id = template.getId(); + builder.sku = template.getSku(); + builder.key = template.getKey(); + builder.prices = template.getPrices(); + builder.attributes = template.getAttributes(); + builder.price = template.getPrice(); + builder.images = template.getImages(); + builder.assets = template.getAssets(); + builder.availability = template.getAvailability(); + builder.isMatchingVariant = template.getIsMatchingVariant(); + builder.scopedPrice = template.getScopedPrice(); + builder.scopedPriceDiscounted = template.getScopedPriceDiscounted(); + builder.recurrencePrices = template.getRecurrencePrices(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailability.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailability.java index 2779878cc36..337207c44a7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailability.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailability.java @@ -22,9 +22,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantChannelAvailability productVariantChannelAvailability = ProductVariantChannelAvailability.builder()
                                                                                                                                                                                              - *             .isOnStock(true)
                                                                                                                                                                                              - *             .restockableInDays(1)
                                                                                                                                                                                              - *             .availableQuantity(1)
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .version(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -34,49 +33,79 @@ public interface ProductVariantChannelAvailability { /** - * + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock in a specified Channel.

                                                                                                                                                                                              * @return isOnStock */ - @NotNull + @JsonProperty("isOnStock") public Boolean getIsOnStock(); /** - * + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock in a specified Channel.

                                                                                                                                                                                              * @return restockableInDays */ - @NotNull + @JsonProperty("restockableInDays") - public Integer getRestockableInDays(); + public Long getRestockableInDays(); /** - * + *

                                                                                                                                                                                              Number of items of this Product Variant that are in stock in a specified Channel.

                                                                                                                                                                                              * @return availableQuantity */ - @NotNull + @JsonProperty("availableQuantity") - public Integer getAvailableQuantity(); + public Long getAvailableQuantity(); + + /** + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @return version + */ + @NotNull + @JsonProperty("version") + public Long getVersion(); /** - * set isOnStock + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock in a specified Channel.

                                                                                                                                                                                              * @param isOnStock value to be set */ public void setIsOnStock(final Boolean isOnStock); /** - * set restockableInDays + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock in a specified Channel.

                                                                                                                                                                                              * @param restockableInDays value to be set */ - public void setRestockableInDays(final Integer restockableInDays); + public void setRestockableInDays(final Long restockableInDays); /** - * set availableQuantity + *

                                                                                                                                                                                              Number of items of this Product Variant that are in stock in a specified Channel.

                                                                                                                                                                                              * @param availableQuantity value to be set */ - public void setAvailableQuantity(final Integer availableQuantity); + public void setAvailableQuantity(final Long availableQuantity); + + /** + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @param version value to be set + */ + + public void setVersion(final Long version); /** * factory method @@ -96,6 +125,8 @@ public static ProductVariantChannelAvailability of(final ProductVariantChannelAv instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } @@ -116,6 +147,8 @@ public static ProductVariantChannelAvailability deepCopy( instance.setIsOnStock(template.getIsOnStock()); instance.setRestockableInDays(template.getRestockableInDays()); instance.setAvailableQuantity(template.getAvailableQuantity()); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityBuilder.java index b5e1d466d38..e31c0920489 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -13,9 +15,8 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantChannelAvailability productVariantChannelAvailability = ProductVariantChannelAvailability.builder()
                                                                                                                                                                                              - *             .isOnStock(true)
                                                                                                                                                                                              - *             .restockableInDays(1)
                                                                                                                                                                                              - *             .availableQuantity(1)
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .version(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -23,83 +24,130 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantChannelAvailabilityBuilder implements Builder { + @Nullable private Boolean isOnStock; - private Integer restockableInDays; + @Nullable + private Long restockableInDays; + + @Nullable + private Long availableQuantity; - private Integer availableQuantity; + private String id; + + private Long version; /** - * set the value to the isOnStock + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock in a specified Channel.

                                                                                                                                                                                              * @param isOnStock value to be set * @return Builder */ - public ProductVariantChannelAvailabilityBuilder isOnStock(final Boolean isOnStock) { + public ProductVariantChannelAvailabilityBuilder isOnStock(@Nullable final Boolean isOnStock) { this.isOnStock = isOnStock; return this; } /** - * set the value to the restockableInDays + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock in a specified Channel.

                                                                                                                                                                                              * @param restockableInDays value to be set * @return Builder */ - public ProductVariantChannelAvailabilityBuilder restockableInDays(final Integer restockableInDays) { + public ProductVariantChannelAvailabilityBuilder restockableInDays(@Nullable final Long restockableInDays) { this.restockableInDays = restockableInDays; return this; } /** - * set the value to the availableQuantity + *

                                                                                                                                                                                              Number of items of this Product Variant that are in stock in a specified Channel.

                                                                                                                                                                                              * @param availableQuantity value to be set * @return Builder */ - public ProductVariantChannelAvailabilityBuilder availableQuantity(final Integer availableQuantity) { + public ProductVariantChannelAvailabilityBuilder availableQuantity(@Nullable final Long availableQuantity) { this.availableQuantity = availableQuantity; return this; } /** - * value of isOnStock} + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ProductVariantChannelAvailabilityBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @param version value to be set + * @return Builder + */ + + public ProductVariantChannelAvailabilityBuilder version(final Long version) { + this.version = version; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock in a specified Channel.

                                                                                                                                                                                              * @return isOnStock */ + @Nullable public Boolean getIsOnStock() { return this.isOnStock; } /** - * value of restockableInDays} + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock in a specified Channel.

                                                                                                                                                                                              * @return restockableInDays */ - public Integer getRestockableInDays() { + @Nullable + public Long getRestockableInDays() { return this.restockableInDays; } /** - * value of availableQuantity} + *

                                                                                                                                                                                              Number of items of this Product Variant that are in stock in a specified Channel.

                                                                                                                                                                                              * @return availableQuantity */ - public Integer getAvailableQuantity() { + @Nullable + public Long getAvailableQuantity() { return this.availableQuantity; } + /** + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + * @return version + */ + + public Long getVersion() { + return this.version; + } + /** * builds ProductVariantChannelAvailability with checking for non-null required values * @return ProductVariantChannelAvailability */ public ProductVariantChannelAvailability build() { - Objects.requireNonNull(isOnStock, ProductVariantChannelAvailability.class + ": isOnStock is missing"); - Objects.requireNonNull(restockableInDays, - ProductVariantChannelAvailability.class + ": restockableInDays is missing"); - Objects.requireNonNull(availableQuantity, - ProductVariantChannelAvailability.class + ": availableQuantity is missing"); - return new ProductVariantChannelAvailabilityImpl(isOnStock, restockableInDays, availableQuantity); + Objects.requireNonNull(id, ProductVariantChannelAvailability.class + ": id is missing"); + Objects.requireNonNull(version, ProductVariantChannelAvailability.class + ": version is missing"); + return new ProductVariantChannelAvailabilityImpl(isOnStock, restockableInDays, availableQuantity, id, version); } /** @@ -107,7 +155,7 @@ public ProductVariantChannelAvailability build() { * @return ProductVariantChannelAvailability */ public ProductVariantChannelAvailability buildUnchecked() { - return new ProductVariantChannelAvailabilityImpl(isOnStock, restockableInDays, availableQuantity); + return new ProductVariantChannelAvailabilityImpl(isOnStock, restockableInDays, availableQuantity, id, version); } /** @@ -128,6 +176,8 @@ public static ProductVariantChannelAvailabilityBuilder of(final ProductVariantCh builder.isOnStock = template.getIsOnStock(); builder.restockableInDays = template.getRestockableInDays(); builder.availableQuantity = template.getAvailableQuantity(); + builder.id = template.getId(); + builder.version = template.getVersion(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityImpl.java index e0984ce49f6..972c239b60f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityImpl.java @@ -24,20 +24,27 @@ public class ProductVariantChannelAvailabilityImpl implements ProductVariantChan private Boolean isOnStock; - private Integer restockableInDays; + private Long restockableInDays; - private Integer availableQuantity; + private Long availableQuantity; + + private String id; + + private Long version; /** * create instance with all properties */ @JsonCreator ProductVariantChannelAvailabilityImpl(@JsonProperty("isOnStock") final Boolean isOnStock, - @JsonProperty("restockableInDays") final Integer restockableInDays, - @JsonProperty("availableQuantity") final Integer availableQuantity) { + @JsonProperty("restockableInDays") final Long restockableInDays, + @JsonProperty("availableQuantity") final Long availableQuantity, @JsonProperty("id") final String id, + @JsonProperty("version") final Long version) { this.isOnStock = isOnStock; this.restockableInDays = restockableInDays; this.availableQuantity = availableQuantity; + this.id = id; + this.version = version; } /** @@ -47,7 +54,7 @@ public ProductVariantChannelAvailabilityImpl() { } /** - * + *

                                                                                                                                                                                              Indicates whether a Product Variant is in stock in a specified Channel.

                                                                                                                                                                                              */ public Boolean getIsOnStock() { @@ -55,33 +62,57 @@ public Boolean getIsOnStock() { } /** - * + *

                                                                                                                                                                                              Number of days to restock a Product Variant once it is out of stock in a specified Channel.

                                                                                                                                                                                              */ - public Integer getRestockableInDays() { + public Long getRestockableInDays() { return this.restockableInDays; } /** - * + *

                                                                                                                                                                                              Number of items of this Product Variant that are in stock in a specified Channel.

                                                                                                                                                                                              */ - public Integer getAvailableQuantity() { + public Long getAvailableQuantity() { return this.availableQuantity; } + /** + *

                                                                                                                                                                                              Unique identifier of the InventoryEntry.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Current version of the InventoryEntry.

                                                                                                                                                                                              + */ + + public Long getVersion() { + return this.version; + } + public void setIsOnStock(final Boolean isOnStock) { this.isOnStock = isOnStock; } - public void setRestockableInDays(final Integer restockableInDays) { + public void setRestockableInDays(final Long restockableInDays) { this.restockableInDays = restockableInDays; } - public void setAvailableQuantity(final Integer availableQuantity) { + public void setAvailableQuantity(final Long availableQuantity) { this.availableQuantity = availableQuantity; } + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + @Override public boolean equals(Object o) { if (this == o) @@ -95,9 +126,13 @@ public boolean equals(Object o) { return new EqualsBuilder().append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) + .append(id, that.id) + .append(version, that.version) .append(isOnStock, that.isOnStock) .append(restockableInDays, that.restockableInDays) .append(availableQuantity, that.availableQuantity) + .append(id, that.id) + .append(version, that.version) .isEquals(); } @@ -106,6 +141,8 @@ public int hashCode() { return new HashCodeBuilder(17, 37).append(isOnStock) .append(restockableInDays) .append(availableQuantity) + .append(id) + .append(version) .toHashCode(); } @@ -114,6 +151,8 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("isOnStock", isOnStock) .append("restockableInDays", restockableInDays) .append("availableQuantity", availableQuantity) + .append("id", id) + .append("version", version) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMap.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMap.java index 58f3437ed98..298ea859816 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMap.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMap.java @@ -16,14 +16,14 @@ import jakarta.validation.constraints.NotNull; /** - * ProductVariantChannelAvailabilityMap + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantChannelAvailabilityMap productVariantChannelAvailabilityMap = ProductVariantChannelAvailabilityMap.builder()
                                                                                                                                                                                              - *             .//(//Builder -> //Builder)
                                                                                                                                                                                              + *             ./^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/Builder -> /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/Builder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -33,7 +33,7 @@ public interface ProductVariantChannelAvailabilityMap { /** - * + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * @return map of the pattern property values */ @NotNull @@ -42,7 +42,7 @@ public interface ProductVariantChannelAvailabilityMap { public Map values(); /** - * set pattern property + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * @param key property name * @param value property value */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapBuilder.java index 8ab5df5cc3f..ebfc650b8ee 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapBuilder.java @@ -13,7 +13,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantChannelAvailabilityMap productVariantChannelAvailabilityMap = ProductVariantChannelAvailabilityMap.builder()
                                                                                                                                                                                              - *             .//(//Builder -> //Builder)
                                                                                                                                                                                              + *             ./^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/Builder -> /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/Builder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -24,7 +24,7 @@ public class ProductVariantChannelAvailabilityMapBuilder implements Builder values = new HashMap<>(); /** - * assign pattern properties to the builder + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * @param values properties to be set * @return Builder */ @@ -36,7 +36,7 @@ public ProductVariantChannelAvailabilityMapBuilder values( } /** - * assign a pattern property to the builder + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * @param key property name * @param value property value * @return Builder @@ -52,7 +52,7 @@ public ProductVariantChannelAvailabilityMapBuilder addValue(final String key, } /** - * values of pattern properties + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              * @return pattern properties */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapImpl.java index 0adf73f9edd..18eaaa6c50a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityMapImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ProductVariantChannelAvailabilityMap + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantChannelAvailabilityMapImpl implements ProductVariantChannelAvailabilityMap, ModelBase { @@ -41,7 +41,7 @@ public ProductVariantChannelAvailabilityMapImpl() { } /** - * + *

                                                                                                                                                                                              JSON object where the keys are supply Channel id, and the values are ProductVariantChannelAvailability.

                                                                                                                                                                                              */ public Map values() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusion.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusion.java new file mode 100644 index 00000000000..fbd88bc6902 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusion.java @@ -0,0 +1,132 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductVariantExclusion productVariantExclusion = ProductVariantExclusion.builder()
                                                                                                                                                                                              + *             .plusSkus(skusBuilder -> skusBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantExclusionImpl.class) +public interface ProductVariantExclusion { + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @return skus + */ + @NotNull + @JsonProperty("skus") + public List getSkus(); + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @param skus values to be set + */ + + @JsonIgnore + public void setSkus(final String... skus); + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @param skus values to be set + */ + + public void setSkus(final List skus); + + /** + * factory method + * @return instance of ProductVariantExclusion + */ + public static ProductVariantExclusion of() { + return new ProductVariantExclusionImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantExclusion + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantExclusion of(final ProductVariantExclusion template) { + ProductVariantExclusionImpl instance = new ProductVariantExclusionImpl(); + instance.setSkus(template.getSkus()); + return instance; + } + + public ProductVariantExclusion copyDeep(); + + /** + * factory method to create a deep copy of ProductVariantExclusion + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantExclusion deepCopy(@Nullable final ProductVariantExclusion template) { + if (template == null) { + return null; + } + ProductVariantExclusionImpl instance = new ProductVariantExclusionImpl(); + instance.setSkus(Optional.ofNullable(template.getSkus()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for ProductVariantExclusion + * @return builder + */ + public static ProductVariantExclusionBuilder builder() { + return ProductVariantExclusionBuilder.of(); + } + + /** + * create builder for ProductVariantExclusion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantExclusionBuilder builder(final ProductVariantExclusion template) { + return ProductVariantExclusionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantExclusion(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/ProductVariantExclusionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusionBuilder.java new file mode 100644 index 00000000000..4d621cc74d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusionBuilder.java @@ -0,0 +1,107 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantExclusionBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ProductVariantExclusion productVariantExclusion = ProductVariantExclusion.builder()
                                                                                                                                                                                              + *             .plusSkus(skusBuilder -> skusBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantExclusionBuilder implements Builder { + + private java.util.List skus; + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @param skus value to be set + * @return Builder + */ + + public ProductVariantExclusionBuilder skus(final String... skus) { + this.skus = new ArrayList<>(Arrays.asList(skus)); + return this; + } + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @param skus value to be set + * @return Builder + */ + + public ProductVariantExclusionBuilder skus(final java.util.List skus) { + this.skus = skus; + return this; + } + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @param skus value to be set + * @return Builder + */ + + public ProductVariantExclusionBuilder 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 in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + * @return skus + */ + + public java.util.List getSkus() { + return this.skus; + } + + /** + * builds ProductVariantExclusion with checking for non-null required values + * @return ProductVariantExclusion + */ + public ProductVariantExclusion build() { + Objects.requireNonNull(skus, ProductVariantExclusion.class + ": skus is missing"); + return new ProductVariantExclusionImpl(skus); + } + + /** + * builds ProductVariantExclusion without checking for non-null required values + * @return ProductVariantExclusion + */ + public ProductVariantExclusion buildUnchecked() { + return new ProductVariantExclusionImpl(skus); + } + + /** + * factory method for an instance of ProductVariantExclusionBuilder + * @return builder + */ + public static ProductVariantExclusionBuilder of() { + return new ProductVariantExclusionBuilder(); + } + + /** + * create builder for ProductVariantExclusion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantExclusionBuilder of(final ProductVariantExclusion template) { + ProductVariantExclusionBuilder builder = new ProductVariantExclusionBuilder(); + builder.skus = template.getSkus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusionImpl.java new file mode 100644 index 00000000000..e1a0bffc2ad --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantExclusionImpl.java @@ -0,0 +1,84 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Only Product Variants with the explicitly listed SKUs are part of a Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantExclusionImpl implements ProductVariantExclusion, ModelBase { + + private java.util.List skus; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantExclusionImpl(@JsonProperty("skus") final java.util.List skus) { + this.skus = skus; + } + + /** + * create empty instance + */ + public ProductVariantExclusionImpl() { + } + + /** + *

                                                                                                                                                                                              Non-empty array of SKUs representing Product Variants to be included in the Product Selection with IndividualExclusion ProductSelectionMode.

                                                                                                                                                                                              + */ + + 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; + + ProductVariantExclusionImpl that = (ProductVariantExclusionImpl) o; + + return new EqualsBuilder().append(skus, that.skus).append(skus, that.skus).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(skus).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("skus", skus).build(); + } + + @Override + public ProductVariantExclusion copyDeep() { + return ProductVariantExclusion.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantImpl.java new file mode 100644 index 00000000000..ac25b290f42 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantImpl.java @@ -0,0 +1,345 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              A concrete sellable good for which inventory can be tracked. Product Variants are generally mapped to specific SKUs.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantImpl implements ProductVariant, ModelBase { + + private Long id; + + private String sku; + + private String key; + + private java.util.List prices; + + private java.util.List attributes; + + private com.commercetools.history.models.common.Price price; + + private java.util.List images; + + private java.util.List assets; + + private com.commercetools.history.models.common.ProductVariantAvailability availability; + + private Boolean isMatchingVariant; + + private com.commercetools.history.models.common.ScopedPrice scopedPrice; + + private Boolean scopedPriceDiscounted; + + private java.util.List recurrencePrices; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, + @JsonProperty("key") final String key, + @JsonProperty("prices") final java.util.List prices, + @JsonProperty("attributes") final java.util.List attributes, + @JsonProperty("price") final com.commercetools.history.models.common.Price price, + @JsonProperty("images") final java.util.List images, + @JsonProperty("assets") final java.util.List assets, + @JsonProperty("availability") final com.commercetools.history.models.common.ProductVariantAvailability availability, + @JsonProperty("isMatchingVariant") final Boolean isMatchingVariant, + @JsonProperty("scopedPrice") final com.commercetools.history.models.common.ScopedPrice scopedPrice, + @JsonProperty("scopedPriceDiscounted") final Boolean scopedPriceDiscounted, + @JsonProperty("recurrencePrices") final java.util.List recurrencePrices) { + this.id = id; + this.sku = sku; + this.key = key; + this.prices = prices; + this.attributes = attributes; + this.price = price; + this.images = images; + this.assets = assets; + this.availability = availability; + this.isMatchingVariant = isMatchingVariant; + this.scopedPrice = scopedPrice; + this.scopedPriceDiscounted = scopedPriceDiscounted; + this.recurrencePrices = recurrencePrices; + } + + /** + * create empty instance + */ + public ProductVariantImpl() { + } + + /** + *

                                                                                                                                                                                              A unique, sequential identifier of the Product Variant within the Product.

                                                                                                                                                                                              + */ + + public Long getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined unique SKU of the Product Variant.

                                                                                                                                                                                              + */ + + public String getSku() { + return this.sku; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the ProductVariant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This is different from Product key.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              The Embedded Prices of the Product Variant. Cannot contain two Prices of the same Price scope (with same currency, country, Customer Group, Channel, validFrom and validUntil).

                                                                                                                                                                                              + */ + + public java.util.List getPrices() { + return this.prices; + } + + /** + *

                                                                                                                                                                                              Variant Attributes according to the respective AttributeDefinition.

                                                                                                                                                                                              + */ + + public java.util.List getAttributes() { + return this.attributes; + } + + /** + *

                                                                                                                                                                                              Only available when price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.Price getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Images of the Product Variant.

                                                                                                                                                                                              + */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

                                                                                                                                                                                              Media assets of the Product Variant.

                                                                                                                                                                                              + */ + + public java.util.List getAssets() { + return this.assets; + } + + /** + *

                                                                                                                                                                                              Set if the Product Variant is tracked by Inventory. Can be used as an optimization to reduce calls to the Inventory service. May not contain the latest Inventory State (it is eventually consistent).

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductVariantAvailability getAvailability() { + return this.availability; + } + + /** + *

                                                                                                                                                                                              true if the Product Variant matches the search query. Only available in response to a Product Projection Search request.

                                                                                                                                                                                              + */ + + public Boolean getIsMatchingVariant() { + return this.isMatchingVariant; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection. Can be used to sort, filter, and facet.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ScopedPrice getScopedPrice() { + return this.scopedPrice; + } + + /** + *

                                                                                                                                                                                              Only available in response to a Product Projection Search request with Product price selection.

                                                                                                                                                                                              + */ + + public Boolean getScopedPriceDiscounted() { + return this.scopedPriceDiscounted; + } + + /** + *

                                                                                                                                                                                              Only available when Product price selection is used. Cannot be used in a Query Predicate.

                                                                                                                                                                                              + */ + + public java.util.List getRecurrencePrices() { + return this.recurrencePrices; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setPrices(final com.commercetools.history.models.common.Price... prices) { + this.prices = new ArrayList<>(Arrays.asList(prices)); + } + + public void setPrices(final java.util.List prices) { + this.prices = prices; + } + + public void setAttributes(final com.commercetools.history.models.common.Attribute... attributes) { + this.attributes = new ArrayList<>(Arrays.asList(attributes)); + } + + public void setAttributes(final java.util.List attributes) { + this.attributes = attributes; + } + + public void setPrice(final com.commercetools.history.models.common.Price price) { + this.price = price; + } + + public void setImages(final com.commercetools.history.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + public void setAssets(final com.commercetools.history.models.common.Asset... assets) { + this.assets = new ArrayList<>(Arrays.asList(assets)); + } + + public void setAssets(final java.util.List assets) { + this.assets = assets; + } + + public void setAvailability(final com.commercetools.history.models.common.ProductVariantAvailability availability) { + this.availability = availability; + } + + public void setIsMatchingVariant(final Boolean isMatchingVariant) { + this.isMatchingVariant = isMatchingVariant; + } + + public void setScopedPrice(final com.commercetools.history.models.common.ScopedPrice scopedPrice) { + this.scopedPrice = scopedPrice; + } + + public void setScopedPriceDiscounted(final Boolean scopedPriceDiscounted) { + this.scopedPriceDiscounted = scopedPriceDiscounted; + } + + public void setRecurrencePrices(final com.commercetools.history.models.common.Price... recurrencePrices) { + this.recurrencePrices = new ArrayList<>(Arrays.asList(recurrencePrices)); + } + + public void setRecurrencePrices( + final java.util.List recurrencePrices) { + this.recurrencePrices = recurrencePrices; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantImpl that = (ProductVariantImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(sku, that.sku) + .append(key, that.key) + .append(prices, that.prices) + .append(attributes, that.attributes) + .append(price, that.price) + .append(images, that.images) + .append(assets, that.assets) + .append(availability, that.availability) + .append(isMatchingVariant, that.isMatchingVariant) + .append(scopedPrice, that.scopedPrice) + .append(scopedPriceDiscounted, that.scopedPriceDiscounted) + .append(recurrencePrices, that.recurrencePrices) + .append(id, that.id) + .append(sku, that.sku) + .append(key, that.key) + .append(prices, that.prices) + .append(attributes, that.attributes) + .append(price, that.price) + .append(images, that.images) + .append(assets, that.assets) + .append(availability, that.availability) + .append(isMatchingVariant, that.isMatchingVariant) + .append(scopedPrice, that.scopedPrice) + .append(scopedPriceDiscounted, that.scopedPriceDiscounted) + .append(recurrencePrices, that.recurrencePrices) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(sku) + .append(key) + .append(prices) + .append(attributes) + .append(price) + .append(images) + .append(assets) + .append(availability) + .append(isMatchingVariant) + .append(scopedPrice) + .append(scopedPriceDiscounted) + .append(recurrencePrices) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("sku", sku) + .append("key", key) + .append("prices", prices) + .append("attributes", attributes) + .append("price", price) + .append("images", images) + .append("assets", assets) + .append("availability", availability) + .append("isMatchingVariant", isMatchingVariant) + .append("scopedPrice", scopedPrice) + .append("scopedPriceDiscounted", scopedPriceDiscounted) + .append("recurrencePrices", recurrencePrices) + .build(); + } + + @Override + public ProductVariant copyDeep() { + return ProductVariant.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java index 273181070be..ff4daf005bb 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelection.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - * ProductVariantSelection + *

                                                                                                                                                                                              Polymorphic base type for Product Variant Selections. The actual type is determined by the type field.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -23,7 +23,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantSelection productVariantSelection = ProductVariantSelection.builder()
                                                                                                                                                                                                *             .type(ProductVariantSelectionTypeEnum.INCLUSION)
                                                                                                                                                                                              - *             .plusSkus(skusBuilder -> skusBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -33,7 +32,7 @@ public interface ProductVariantSelection { /** - * + *

                                                                                                                                                                                              Determines whether the SKUs are to be included in, or excluded from, the Product Selection.

                                                                                                                                                                                              * @return type */ @NotNull @@ -41,35 +40,12 @@ public interface ProductVariantSelection { public ProductVariantSelectionTypeEnum getType(); /** - * - * @return skus - */ - @NotNull - @JsonProperty("skus") - public List getSkus(); - - /** - * set type + *

                                                                                                                                                                                              Determines whether the SKUs are to be included in, or excluded from, the Product Selection.

                                                                                                                                                                                              * @param type value to be set */ public void setType(final ProductVariantSelectionTypeEnum type); - /** - * set skus - * @param skus values to be set - */ - - @JsonIgnore - public void setSkus(final String... skus); - - /** - * set skus - * @param skus values to be set - */ - - public void setSkus(final List skus); - /** * factory method * @return instance of ProductVariantSelection @@ -86,7 +62,6 @@ public static ProductVariantSelection of() { public static ProductVariantSelection of(final ProductVariantSelection template) { ProductVariantSelectionImpl instance = new ProductVariantSelectionImpl(); instance.setType(template.getType()); - instance.setSkus(template.getSkus()); return instance; } @@ -104,7 +79,6 @@ public static ProductVariantSelection deepCopy(@Nullable final ProductVariantSel } ProductVariantSelectionImpl instance = new ProductVariantSelectionImpl(); instance.setType(template.getType()); - instance.setSkus(Optional.ofNullable(template.getSkus()).map(ArrayList::new).orElse(null)); return instance; } 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 index 3b59a2800a0..b0c486bee40 100644 --- 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 @@ -14,7 +14,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ProductVariantSelection productVariantSelection = ProductVariantSelection.builder()
                                                                                                                                                                                                *             .type(ProductVariantSelectionTypeEnum.INCLUSION)
                                                                                                                                                                                              - *             .plusSkus(skusBuilder -> skusBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -24,10 +23,8 @@ public class ProductVariantSelectionBuilder implements Builder skus; - /** - * set the value to the type + *

                                                                                                                                                                                              Determines whether the SKUs are to be included in, or excluded from, the Product Selection.

                                                                                                                                                                                              * @param type value to be set * @return Builder */ @@ -39,43 +36,7 @@ public ProductVariantSelectionBuilder type( } /** - * 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} + *

                                                                                                                                                                                              Determines whether the SKUs are to be included in, or excluded from, the Product Selection.

                                                                                                                                                                                              * @return type */ @@ -83,23 +44,13 @@ public com.commercetools.history.models.common.ProductVariantSelectionTypeEnum g 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); + return new ProductVariantSelectionImpl(type); } /** @@ -107,7 +58,7 @@ public ProductVariantSelection build() { * @return ProductVariantSelection */ public ProductVariantSelection buildUnchecked() { - return new ProductVariantSelectionImpl(type, skus); + return new ProductVariantSelectionImpl(type); } /** @@ -126,7 +77,6 @@ public static ProductVariantSelectionBuilder of() { 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-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java index 5fb172256ab..d864e809de0 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ProductVariantSelectionImpl.java @@ -17,24 +17,20 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ProductVariantSelection + *

                                                                                                                                                                                              Polymorphic base type for Product Variant Selections. The actual type is determined by the type field.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductVariantSelectionImpl implements ProductVariantSelection, ModelBase { private com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type; - private java.util.List skus; - /** * create instance with all properties */ @JsonCreator ProductVariantSelectionImpl( - @JsonProperty("type") final com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type, - @JsonProperty("skus") final java.util.List skus) { + @JsonProperty("type") final com.commercetools.history.models.common.ProductVariantSelectionTypeEnum type) { this.type = type; - this.skus = skus; } /** @@ -44,33 +40,17 @@ public ProductVariantSelectionImpl() { } /** - * + *

                                                                                                                                                                                              Determines whether the SKUs are to be included in, or excluded from, the Product Selection.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.ProductVariantSelectionTypeEnum getType() { return this.type; } - /** - * - */ - - 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)); - } - - public void setSkus(final java.util.List skus) { - this.skus = skus; - } - @Override public boolean equals(Object o) { if (this == o) @@ -81,23 +61,17 @@ public boolean equals(Object o) { ProductVariantSelectionImpl that = (ProductVariantSelectionImpl) o; - return new EqualsBuilder().append(type, that.type) - .append(skus, that.skus) - .append(type, that.type) - .append(skus, that.skus) - .isEquals(); + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(type).append(skus).toHashCode(); + return new HashCodeBuilder(17, 37).append(type).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) - .append("skus", skus) - .build(); + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); } @Override 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 index 87382477c41..11686047666 100644 --- 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 @@ -20,6 +20,10 @@ public interface ProductVariantSelectionTypeEnum extends JsonEnum { ProductVariantSelectionTypeEnum EXCLUSION = ProductVariantSelectionTypeEnumEnum.EXCLUSION; + ProductVariantSelectionTypeEnum INCLUDE_ONLY = ProductVariantSelectionTypeEnumEnum.INCLUDE_ONLY; + + ProductVariantSelectionTypeEnum INCLUDE_ALL_EXCEPT = ProductVariantSelectionTypeEnumEnum.INCLUDE_ALL_EXCEPT; + /** * possible values of ProductVariantSelectionTypeEnum */ @@ -32,7 +36,17 @@ enum ProductVariantSelectionTypeEnumEnum implements ProductVariantSelectionTypeE /** * exclusion */ - EXCLUSION("exclusion"); + EXCLUSION("exclusion"), + + /** + * includeOnly + */ + INCLUDE_ONLY("includeOnly"), + + /** + * includeAllExcept + */ + INCLUDE_ALL_EXCEPT("includeAllExcept"); private final String jsonName; private ProductVariantSelectionTypeEnumEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteRequestState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteRequestState.java index fb2259effda..d183ad1f077 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteRequestState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/QuoteRequestState.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * QuoteRequestState + *

                                                                                                                                                                                              Predefined states tracking the status of the Quote Request in the negotiation process.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface QuoteRequestState extends JsonEnum { 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 2b1642d8628..dab1abec76a 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 @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * QuoteState + *

                                                                                                                                                                                              Predefined states tracking the status of the Quote.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface QuoteState extends JsonEnum { @@ -22,9 +22,9 @@ public interface QuoteState extends JsonEnum { QuoteState DECLINED_FOR_RENEGOTIATION = QuoteStateEnum.DECLINED_FOR_RENEGOTIATION; - QuoteState ACCEPTED = QuoteStateEnum.ACCEPTED; + QuoteState RENEGOTIATION_ADDRESSED = QuoteStateEnum.RENEGOTIATION_ADDRESSED; - QuoteState FAILED = QuoteStateEnum.FAILED; + QuoteState ACCEPTED = QuoteStateEnum.ACCEPTED; QuoteState WITHDRAWN = QuoteStateEnum.WITHDRAWN; @@ -48,14 +48,14 @@ enum QuoteStateEnum implements QuoteState { DECLINED_FOR_RENEGOTIATION("DeclinedForRenegotiation"), /** - * Accepted + * RenegotiationAddressed */ - ACCEPTED("Accepted"), + RENEGOTIATION_ADDRESSED("RenegotiationAddressed"), /** - * Failed + * Accepted */ - FAILED("Failed"), + ACCEPTED("Accepted"), /** * Withdrawn diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReference.java new file mode 100644 index 00000000000..848f4c6970a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     RecurrencePolicyReference recurrencePolicyReference = RecurrencePolicyReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("recurrence-policy") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = RecurrencePolicyReferenceImpl.class) +public interface RecurrencePolicyReference extends Reference { + + /** + * discriminator value for RecurrencePolicyReference + */ + String RECURRENCE_POLICY = "recurrence-policy"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced RecurrencePolicy.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced RecurrencePolicy.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of RecurrencePolicyReference + */ + public static RecurrencePolicyReference of() { + return new RecurrencePolicyReferenceImpl(); + } + + /** + * factory method to create a shallow copy RecurrencePolicyReference + * @param template instance to be copied + * @return copy instance + */ + public static RecurrencePolicyReference of(final RecurrencePolicyReference template) { + RecurrencePolicyReferenceImpl instance = new RecurrencePolicyReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public RecurrencePolicyReference copyDeep(); + + /** + * factory method to create a deep copy of RecurrencePolicyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static RecurrencePolicyReference deepCopy(@Nullable final RecurrencePolicyReference template) { + if (template == null) { + return null; + } + RecurrencePolicyReferenceImpl instance = new RecurrencePolicyReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for RecurrencePolicyReference + * @return builder + */ + public static RecurrencePolicyReferenceBuilder builder() { + return RecurrencePolicyReferenceBuilder.of(); + } + + /** + * create builder for RecurrencePolicyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder builder(final RecurrencePolicyReference template) { + return RecurrencePolicyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withRecurrencePolicyReference(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/RecurrencePolicyReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceBuilder.java new file mode 100644 index 00000000000..81eb325e94f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * RecurrencePolicyReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     RecurrencePolicyReference recurrencePolicyReference = RecurrencePolicyReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced RecurrencePolicy.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public RecurrencePolicyReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced RecurrencePolicy.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds RecurrencePolicyReference with checking for non-null required values + * @return RecurrencePolicyReference + */ + public RecurrencePolicyReference build() { + Objects.requireNonNull(id, RecurrencePolicyReference.class + ": id is missing"); + return new RecurrencePolicyReferenceImpl(id); + } + + /** + * builds RecurrencePolicyReference without checking for non-null required values + * @return RecurrencePolicyReference + */ + public RecurrencePolicyReference buildUnchecked() { + return new RecurrencePolicyReferenceImpl(id); + } + + /** + * factory method for an instance of RecurrencePolicyReferenceBuilder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder of() { + return new RecurrencePolicyReferenceBuilder(); + } + + /** + * create builder for RecurrencePolicyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static RecurrencePolicyReferenceBuilder of(final RecurrencePolicyReference template) { + RecurrencePolicyReferenceBuilder builder = new RecurrencePolicyReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceImpl.java new file mode 100644 index 00000000000..26ab3de129a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a RecurrencePolicy.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class RecurrencePolicyReferenceImpl implements RecurrencePolicyReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + RecurrencePolicyReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + * create empty instance + */ + public RecurrencePolicyReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("recurrence-policy"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced RecurrencePolicy.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + RecurrencePolicyReferenceImpl that = (RecurrencePolicyReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public RecurrencePolicyReference copyDeep() { + return RecurrencePolicyReference.deepCopy(this); + } +} 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 9092a5848d3..c9e004adec4 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 @@ -15,33 +15,25 @@ import jakarta.validation.constraints.NotNull; /** - * Reference + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              * *
                                                                                                                                                                                              - * Example to create an instance using the builder pattern + * Example to create a subtype instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                              - *     Reference reference = Reference.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              + *     Reference reference = Reference.cartDiscountBuilder()
                                                                                                                                                                                              + *             id("{id}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "typeId", defaultImpl = ReferenceImpl.class, visible = true) @JsonDeserialize(as = ReferenceImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface Reference { /** - * - * @return id - */ - @NotNull - @JsonProperty("id") - public String getId(); - - /** - * + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              * @return typeId */ @NotNull @@ -49,38 +41,19 @@ public interface Reference { public ReferenceTypeId getTypeId(); /** - * set id - * @param id value to be set - */ - - public void setId(final String id); - - /** - * set typeId - * @param typeId value to be set + *

                                                                                                                                                                                              Unique ID of the referenced resource.

                                                                                                                                                                                              + * @return id */ - - public void setTypeId(final ReferenceTypeId typeId); + @NotNull + @JsonProperty("id") + public String getId(); /** - * factory method - * @return instance of Reference + *

                                                                                                                                                                                              Unique ID of the referenced resource.

                                                                                                                                                                                              + * @param id value to be set */ - public static Reference of() { - return new ReferenceImpl(); - } - /** - * factory method to create a shallow copy Reference - * @param template instance to be copied - * @return copy instance - */ - public static Reference of(final Reference template) { - ReferenceImpl instance = new ReferenceImpl(); - instance.setId(template.getId()); - instance.setTypeId(template.getTypeId()); - return instance; - } + public void setId(final String id); public Reference copyDeep(); @@ -94,27 +67,141 @@ public static Reference deepCopy(@Nullable final Reference template) { if (template == null) { return null; } + + if (!(template instanceof ReferenceImpl)) { + return template.copyDeep(); + } ReferenceImpl instance = new ReferenceImpl(); instance.setId(template.getId()); - instance.setTypeId(template.getTypeId()); return instance; } /** - * builder factory method for Reference + * builder for cartDiscount subtype + * @return builder + */ + public static com.commercetools.history.models.common.CartDiscountReferenceBuilder cartDiscountBuilder() { + return com.commercetools.history.models.common.CartDiscountReferenceBuilder.of(); + } + + /** + * builder for category subtype + * @return builder + */ + public static com.commercetools.history.models.common.CategoryReferenceBuilder categoryBuilder() { + return com.commercetools.history.models.common.CategoryReferenceBuilder.of(); + } + + /** + * builder for channel subtype + * @return builder + */ + public static com.commercetools.history.models.common.ChannelReferenceBuilder channelBuilder() { + return com.commercetools.history.models.common.ChannelReferenceBuilder.of(); + } + + /** + * builder for customerGroup subtype + * @return builder + */ + public static com.commercetools.history.models.common.CustomerGroupReferenceBuilder customerGroupBuilder() { + return com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of(); + } + + /** + * builder for customer subtype + * @return builder + */ + public static com.commercetools.history.models.common.CustomerReferenceBuilder customerBuilder() { + return com.commercetools.history.models.common.CustomerReferenceBuilder.of(); + } + + /** + * builder for discountCode subtype + * @return builder + */ + public static com.commercetools.history.models.common.DiscountCodeReferenceBuilder discountCodeBuilder() { + return com.commercetools.history.models.common.DiscountCodeReferenceBuilder.of(); + } + + /** + * builder for payment subtype + * @return builder + */ + public static com.commercetools.history.models.common.PaymentReferenceBuilder paymentBuilder() { + return com.commercetools.history.models.common.PaymentReferenceBuilder.of(); + } + + /** + * builder for productDiscount subtype + * @return builder + */ + public static com.commercetools.history.models.common.ProductDiscountReferenceBuilder productDiscountBuilder() { + return com.commercetools.history.models.common.ProductDiscountReferenceBuilder.of(); + } + + /** + * builder for product subtype + * @return builder + */ + public static com.commercetools.history.models.common.ProductReferenceBuilder productBuilder() { + return com.commercetools.history.models.common.ProductReferenceBuilder.of(); + } + + /** + * builder for productSelection subtype + * @return builder + */ + public static com.commercetools.history.models.common.ProductSelectionReferenceBuilder productSelectionBuilder() { + return com.commercetools.history.models.common.ProductSelectionReferenceBuilder.of(); + } + + /** + * builder for productType subtype + * @return builder + */ + public static com.commercetools.history.models.common.ProductTypeReferenceBuilder productTypeBuilder() { + return com.commercetools.history.models.common.ProductTypeReferenceBuilder.of(); + } + + /** + * builder for recurrencePolicy subtype + * @return builder + */ + public static com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder recurrencePolicyBuilder() { + return com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of(); + } + + /** + * builder for shippingMethod subtype + * @return builder + */ + public static com.commercetools.history.models.common.ShippingMethodReferenceBuilder shippingMethodBuilder() { + return com.commercetools.history.models.common.ShippingMethodReferenceBuilder.of(); + } + + /** + * builder for state subtype + * @return builder + */ + public static com.commercetools.history.models.common.StateReferenceBuilder stateBuilder() { + return com.commercetools.history.models.common.StateReferenceBuilder.of(); + } + + /** + * builder for taxCategory subtype * @return builder */ - public static ReferenceBuilder builder() { - return ReferenceBuilder.of(); + public static com.commercetools.history.models.common.TaxCategoryReferenceBuilder taxCategoryBuilder() { + return com.commercetools.history.models.common.TaxCategoryReferenceBuilder.of(); } /** - * create builder for Reference instance - * @param template instance with prefilled values for the builder + * builder for type subtype * @return builder */ - public static ReferenceBuilder builder(final Reference template) { - return ReferenceBuilder.of(template); + public static com.commercetools.history.models.common.TypeReferenceBuilder typeBuilder() { + return com.commercetools.history.models.common.TypeReferenceBuilder.of(); } /** 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 96bea58312f..4b68a86a850 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 @@ -3,85 +3,76 @@ import java.util.*; -import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; /** * ReferenceBuilder - *
                                                                                                                                                                                              - * Example to create an instance using the builder pattern - *
                                                                                                                                                                                              - *
                                                                                                                                                                                              
                                                                                                                                                                                              - *     Reference reference = Reference.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              - *             .build()
                                                                                                                                                                                              - * 
                                                                                                                                                                                              - *
                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ReferenceBuilder implements Builder { +public class ReferenceBuilder { - private String id; + public com.commercetools.history.models.common.CartDiscountReferenceBuilder cartDiscountBuilder() { + return com.commercetools.history.models.common.CartDiscountReferenceBuilder.of(); + } - private com.commercetools.history.models.common.ReferenceTypeId typeId; + public com.commercetools.history.models.common.CategoryReferenceBuilder categoryBuilder() { + return com.commercetools.history.models.common.CategoryReferenceBuilder.of(); + } - /** - * set the value to the id - * @param id value to be set - * @return Builder - */ + public com.commercetools.history.models.common.ChannelReferenceBuilder channelBuilder() { + return com.commercetools.history.models.common.ChannelReferenceBuilder.of(); + } - public ReferenceBuilder id(final String id) { - this.id = id; - return this; + public com.commercetools.history.models.common.CustomerGroupReferenceBuilder customerGroupBuilder() { + return com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of(); } - /** - * set the value to the typeId - * @param typeId value to be set - * @return Builder - */ + public com.commercetools.history.models.common.CustomerReferenceBuilder customerBuilder() { + return com.commercetools.history.models.common.CustomerReferenceBuilder.of(); + } - public ReferenceBuilder typeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { - this.typeId = typeId; - return this; + public com.commercetools.history.models.common.DiscountCodeReferenceBuilder discountCodeBuilder() { + return com.commercetools.history.models.common.DiscountCodeReferenceBuilder.of(); } - /** - * value of id} - * @return id - */ + public com.commercetools.history.models.common.PaymentReferenceBuilder paymentBuilder() { + return com.commercetools.history.models.common.PaymentReferenceBuilder.of(); + } - public String getId() { - return this.id; + public com.commercetools.history.models.common.ProductDiscountReferenceBuilder productDiscountBuilder() { + return com.commercetools.history.models.common.ProductDiscountReferenceBuilder.of(); } - /** - * value of typeId} - * @return typeId - */ + public com.commercetools.history.models.common.ProductReferenceBuilder productBuilder() { + return com.commercetools.history.models.common.ProductReferenceBuilder.of(); + } - public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { - return this.typeId; + public com.commercetools.history.models.common.ProductSelectionReferenceBuilder productSelectionBuilder() { + return com.commercetools.history.models.common.ProductSelectionReferenceBuilder.of(); } - /** - * builds Reference with checking for non-null required values - * @return Reference - */ - public Reference build() { - Objects.requireNonNull(id, Reference.class + ": id is missing"); - Objects.requireNonNull(typeId, Reference.class + ": typeId is missing"); - return new ReferenceImpl(id, typeId); + public com.commercetools.history.models.common.ProductTypeReferenceBuilder productTypeBuilder() { + return com.commercetools.history.models.common.ProductTypeReferenceBuilder.of(); } - /** - * builds Reference without checking for non-null required values - * @return Reference - */ - public Reference buildUnchecked() { - return new ReferenceImpl(id, typeId); + public com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder recurrencePolicyBuilder() { + return com.commercetools.history.models.common.RecurrencePolicyReferenceBuilder.of(); + } + + public com.commercetools.history.models.common.ShippingMethodReferenceBuilder shippingMethodBuilder() { + return com.commercetools.history.models.common.ShippingMethodReferenceBuilder.of(); + } + + public com.commercetools.history.models.common.StateReferenceBuilder stateBuilder() { + return com.commercetools.history.models.common.StateReferenceBuilder.of(); + } + + public com.commercetools.history.models.common.TaxCategoryReferenceBuilder taxCategoryBuilder() { + return com.commercetools.history.models.common.TaxCategoryReferenceBuilder.of(); + } + + public com.commercetools.history.models.common.TypeReferenceBuilder typeBuilder() { + return com.commercetools.history.models.common.TypeReferenceBuilder.of(); } /** @@ -92,16 +83,4 @@ public static ReferenceBuilder of() { return new ReferenceBuilder(); } - /** - * create builder for Reference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ReferenceBuilder of(final Reference template) { - ReferenceBuilder builder = new ReferenceBuilder(); - builder.id = template.getId(); - builder.typeId = template.getTypeId(); - return builder; - } - } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceImpl.java index 015243baead..9e01f0d6f52 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReferenceImpl.java @@ -17,23 +17,23 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Reference + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ReferenceImpl implements Reference, ModelBase { - private String id; - private com.commercetools.history.models.common.ReferenceTypeId typeId; + private String id; + /** * create instance with all properties */ @JsonCreator - ReferenceImpl(@JsonProperty("id") final String id, - @JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId) { - this.id = id; + ReferenceImpl(@JsonProperty("typeId") final com.commercetools.history.models.common.ReferenceTypeId typeId, + @JsonProperty("id") final String id) { this.typeId = typeId; + this.id = id; } /** @@ -43,29 +43,25 @@ public ReferenceImpl() { } /** - * + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              */ - public String getId() { - return this.id; + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; } /** - * + *

                                                                                                                                                                                              Unique ID of the referenced resource.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { - return this.typeId; + public String getId() { + return this.id; } public void setId(final String id) { this.id = id; } - public void setTypeId(final com.commercetools.history.models.common.ReferenceTypeId typeId) { - this.typeId = typeId; - } - @Override public boolean equals(Object o) { if (this == o) @@ -76,22 +72,22 @@ public boolean equals(Object o) { ReferenceImpl that = (ReferenceImpl) o; - return new EqualsBuilder().append(id, that.id) - .append(typeId, that.typeId) + return new EqualsBuilder().append(typeId, that.typeId) .append(id, that.id) .append(typeId, that.typeId) + .append(id, that.id) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(id).append(typeId).toHashCode(); + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); } @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) - .append("typeId", typeId) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) .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 7cb780e5cb2..adc9a716095 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 @@ -11,13 +11,19 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * ReferenceTypeId + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ReferenceTypeId extends JsonEnum { + ReferenceTypeId APPROVAL_FLOW = ReferenceTypeIdEnum.APPROVAL_FLOW; + + ReferenceTypeId APPROVAL_RULE = ReferenceTypeIdEnum.APPROVAL_RULE; + ReferenceTypeId ASSOCIATE_ROLE = ReferenceTypeIdEnum.ASSOCIATE_ROLE; + ReferenceTypeId ATTRIBUTE_GROUP = ReferenceTypeIdEnum.ATTRIBUTE_GROUP; + ReferenceTypeId BUSINESS_UNIT = ReferenceTypeIdEnum.BUSINESS_UNIT; ReferenceTypeId CART = ReferenceTypeIdEnum.CART; @@ -36,8 +42,12 @@ public interface ReferenceTypeId extends JsonEnum { ReferenceTypeId CUSTOMER_PASSWORD_TOKEN = ReferenceTypeIdEnum.CUSTOMER_PASSWORD_TOKEN; + ReferenceTypeId DIRECT_DISCOUNT = ReferenceTypeIdEnum.DIRECT_DISCOUNT; + ReferenceTypeId DISCOUNT_CODE = ReferenceTypeIdEnum.DISCOUNT_CODE; + ReferenceTypeId DISCOUNT_GROUP = ReferenceTypeIdEnum.DISCOUNT_GROUP; + ReferenceTypeId EXTENSION = ReferenceTypeIdEnum.EXTENSION; ReferenceTypeId INVENTORY_ENTRY = ReferenceTypeIdEnum.INVENTORY_ENTRY; @@ -56,14 +66,22 @@ public interface ReferenceTypeId extends JsonEnum { ReferenceTypeId PRODUCT_DISCOUNT = ReferenceTypeIdEnum.PRODUCT_DISCOUNT; + ReferenceTypeId PRODUCT_PRICE = ReferenceTypeIdEnum.PRODUCT_PRICE; + ReferenceTypeId PRODUCT_SELECTION = ReferenceTypeIdEnum.PRODUCT_SELECTION; + ReferenceTypeId PRODUCT_TAILORING = ReferenceTypeIdEnum.PRODUCT_TAILORING; + ReferenceTypeId PRODUCT_TYPE = ReferenceTypeIdEnum.PRODUCT_TYPE; ReferenceTypeId QUOTE = ReferenceTypeIdEnum.QUOTE; ReferenceTypeId QUOTE_REQUEST = ReferenceTypeIdEnum.QUOTE_REQUEST; + ReferenceTypeId RECURRENCE_POLICY = ReferenceTypeIdEnum.RECURRENCE_POLICY; + + ReferenceTypeId RECURRING_ORDER = ReferenceTypeIdEnum.RECURRING_ORDER; + ReferenceTypeId REVIEW = ReferenceTypeIdEnum.REVIEW; ReferenceTypeId SHIPPING_METHOD = ReferenceTypeIdEnum.SHIPPING_METHOD; @@ -72,6 +90,8 @@ public interface ReferenceTypeId extends JsonEnum { ReferenceTypeId STAGED_QUOTE = ReferenceTypeIdEnum.STAGED_QUOTE; + ReferenceTypeId STANDALONE_PRICE = ReferenceTypeIdEnum.STANDALONE_PRICE; + ReferenceTypeId STATE = ReferenceTypeIdEnum.STATE; ReferenceTypeId STORE = ReferenceTypeIdEnum.STORE; @@ -88,11 +108,26 @@ public interface ReferenceTypeId extends JsonEnum { * possible values of ReferenceTypeId */ enum ReferenceTypeIdEnum implements ReferenceTypeId { + /** + * approval-flow + */ + APPROVAL_FLOW("approval-flow"), + + /** + * approval-rule + */ + APPROVAL_RULE("approval-rule"), + /** * associate-role */ ASSOCIATE_ROLE("associate-role"), + /** + * attribute-group + */ + ATTRIBUTE_GROUP("attribute-group"), + /** * business-unit */ @@ -138,11 +173,21 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ CUSTOMER_PASSWORD_TOKEN("customer-password-token"), + /** + * direct-discount + */ + DIRECT_DISCOUNT("direct-discount"), + /** * discount-code */ DISCOUNT_CODE("discount-code"), + /** + * discount-group + */ + DISCOUNT_GROUP("discount-group"), + /** * extension */ @@ -188,11 +233,21 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ PRODUCT_DISCOUNT("product-discount"), + /** + * product-price + */ + PRODUCT_PRICE("product-price"), + /** * product-selection */ PRODUCT_SELECTION("product-selection"), + /** + * product-tailoring + */ + PRODUCT_TAILORING("product-tailoring"), + /** * product-type */ @@ -208,6 +263,16 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ QUOTE_REQUEST("quote-request"), + /** + * recurrence-policy + */ + RECURRENCE_POLICY("recurrence-policy"), + + /** + * recurring-order + */ + RECURRING_ORDER("recurring-order"), + /** * review */ @@ -228,6 +293,11 @@ enum ReferenceTypeIdEnum implements ReferenceTypeId { */ STAGED_QUOTE("staged-quote"), + /** + * standalone-price + */ + STANDALONE_PRICE("standalone-price"), + /** * state */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reservation.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reservation.java index 326d376c49a..52ec6270423 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reservation.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Reservation.java @@ -44,7 +44,7 @@ public interface Reservation { public Integer getQuantity(); /** - * + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              * @return owner */ @NotNull @@ -76,7 +76,7 @@ public interface Reservation { public void setQuantity(final Integer quantity); /** - * set owner + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              * @param owner value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationBuilder.java index 250184f47a2..034e9240f09 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationBuilder.java @@ -45,37 +45,25 @@ public ReservationBuilder quantity(final Integer quantity) { } /** - * set the value to the owner using the builder function - * @param builder function to build the owner value + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              + * @param owner value to be set * @return Builder */ - public ReservationBuilder owner( - Function builder) { - this.owner = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public ReservationBuilder owner(final com.commercetools.history.models.common.Reference owner) { + this.owner = owner; return this; } /** - * set the value to the owner using the builder function + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              * @param builder function to build the owner value * @return Builder */ - public ReservationBuilder withOwner( - Function builder) { - this.owner = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - * set the value to the owner - * @param owner value to be set - * @return Builder - */ - - public ReservationBuilder owner(final com.commercetools.history.models.common.Reference owner) { - this.owner = owner; + public ReservationBuilder owner( + Function> builder) { + this.owner = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } @@ -111,7 +99,7 @@ public Integer getQuantity() { } /** - * value of owner} + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              * @return owner */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationImpl.java index 95a6c64aa71..21e7b781f2b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReservationImpl.java @@ -59,7 +59,7 @@ public Integer getQuantity() { } /** - * + *

                                                                                                                                                                                              A Reference represents a loose reference to another resource in the same Project identified by its id. The typeId indicates the type of the referenced resource. Each resource type has its corresponding Reference type, like ChannelReference. A referenced resource can be embedded through Reference Expansion. The expanded reference is the value of an additional obj field then.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.Reference getOwner() { 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 index 18fe0e034e1..7545092b6dd 100644 --- 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 @@ -22,9 +22,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              + *             .typeId(ReferenceTypeId.APPROVAL_FLOW)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -37,7 +35,7 @@ public interface ResourceIdentifier { * * @return id */ - @NotNull + @JsonProperty("id") public String getId(); @@ -45,12 +43,12 @@ public interface ResourceIdentifier { * * @return key */ - @NotNull + @JsonProperty("key") public String getKey(); /** - * + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              * @return typeId */ @NotNull @@ -72,7 +70,7 @@ public interface ResourceIdentifier { public void setKey(final String key); /** - * set typeId + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              * @param typeId value to be set */ @@ -111,6 +109,10 @@ public static ResourceIdentifier deepCopy(@Nullable final ResourceIdentifier tem if (template == null) { return null; } + + if (!(template instanceof ResourceIdentifierImpl)) { + return template.copyDeep(); + } ResourceIdentifierImpl instance = new ResourceIdentifierImpl(); instance.setId(template.getId()); instance.setKey(template.getKey()); 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 index faca8cba2fb..65c3eb76781 100644 --- 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 @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -13,9 +15,7 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ResourceIdentifier resourceIdentifier = ResourceIdentifier.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                              - *             .key("{key}")
                                                                                                                                                                                              - *             .typeId(ReferenceTypeId.ASSOCIATE_ROLE)
                                                                                                                                                                                              + *             .typeId(ReferenceTypeId.APPROVAL_FLOW)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -23,8 +23,10 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ResourceIdentifierBuilder implements Builder { + @Nullable private String id; + @Nullable private String key; private com.commercetools.history.models.common.ReferenceTypeId typeId; @@ -35,7 +37,7 @@ public class ResourceIdentifierBuilder implements Builder { * @return Builder */ - public ResourceIdentifierBuilder id(final String id) { + public ResourceIdentifierBuilder id(@Nullable final String id) { this.id = id; return this; } @@ -46,13 +48,13 @@ public ResourceIdentifierBuilder id(final String id) { * @return Builder */ - public ResourceIdentifierBuilder key(final String key) { + public ResourceIdentifierBuilder key(@Nullable final String key) { this.key = key; return this; } /** - * set the value to the typeId + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              * @param typeId value to be set * @return Builder */ @@ -67,6 +69,7 @@ public ResourceIdentifierBuilder typeId(final com.commercetools.history.models.c * @return id */ + @Nullable public String getId() { return this.id; } @@ -76,12 +79,13 @@ public String getId() { * @return key */ + @Nullable public String getKey() { return this.key; } /** - * value of typeId} + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              * @return typeId */ @@ -94,8 +98,6 @@ public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { * @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); } 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 index 441badf2781..e42ed65bf58 100644 --- 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 @@ -62,7 +62,7 @@ public String getKey() { } /** - * + *

                                                                                                                                                                                              Type of resource the value should reference. Supported resource type identifiers are:

                                                                                                                                                                                              */ public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceTypeId.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceTypeId.java new file mode 100644 index 00000000000..e91b4f9107d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ResourceTypeId.java @@ -0,0 +1,343 @@ + +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; + +/** + *

                                                                                                                                                                                              With Types, you can model your own Custom Fields on the following resources and data types.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ResourceTypeId extends JsonEnum { + + ResourceTypeId ADDRESS = ResourceTypeIdEnum.ADDRESS; + + ResourceTypeId ASSET = ResourceTypeIdEnum.ASSET; + + ResourceTypeId APPROVAL_FLOW = ResourceTypeIdEnum.APPROVAL_FLOW; + + ResourceTypeId APPROVAL_RULE = ResourceTypeIdEnum.APPROVAL_RULE; + + ResourceTypeId ASSOCIATE_ROLE = ResourceTypeIdEnum.ASSOCIATE_ROLE; + + ResourceTypeId BUSINESS_UNIT = ResourceTypeIdEnum.BUSINESS_UNIT; + + ResourceTypeId CART_DISCOUNT = ResourceTypeIdEnum.CART_DISCOUNT; + + ResourceTypeId CATEGORY = ResourceTypeIdEnum.CATEGORY; + + ResourceTypeId CHANNEL = ResourceTypeIdEnum.CHANNEL; + + ResourceTypeId CUSTOMER = ResourceTypeIdEnum.CUSTOMER; + + ResourceTypeId CUSTOMER_GROUP = ResourceTypeIdEnum.CUSTOMER_GROUP; + + ResourceTypeId CUSTOM_LINE_ITEM = ResourceTypeIdEnum.CUSTOM_LINE_ITEM; + + ResourceTypeId DISCOUNT_CODE = ResourceTypeIdEnum.DISCOUNT_CODE; + + ResourceTypeId INVENTORY_ENTRY = ResourceTypeIdEnum.INVENTORY_ENTRY; + + ResourceTypeId LINE_ITEM = ResourceTypeIdEnum.LINE_ITEM; + + ResourceTypeId ORDER = ResourceTypeIdEnum.ORDER; + + ResourceTypeId ORDER_EDIT = ResourceTypeIdEnum.ORDER_EDIT; + + ResourceTypeId ORDER_DELIVERY = ResourceTypeIdEnum.ORDER_DELIVERY; + + ResourceTypeId ORDER_PARCEL = ResourceTypeIdEnum.ORDER_PARCEL; + + ResourceTypeId ORDER_RETURN_ITEM = ResourceTypeIdEnum.ORDER_RETURN_ITEM; + + ResourceTypeId PAYMENT = ResourceTypeIdEnum.PAYMENT; + + ResourceTypeId PAYMENT_INTERFACE_INTERACTION = ResourceTypeIdEnum.PAYMENT_INTERFACE_INTERACTION; + + ResourceTypeId PRODUCT_PRICE = ResourceTypeIdEnum.PRODUCT_PRICE; + + ResourceTypeId PRODUCT_SELECTION = ResourceTypeIdEnum.PRODUCT_SELECTION; + + ResourceTypeId PRODUCT_TAILORING = ResourceTypeIdEnum.PRODUCT_TAILORING; + + ResourceTypeId QUOTE = ResourceTypeIdEnum.QUOTE; + + ResourceTypeId REVIEW = ResourceTypeIdEnum.REVIEW; + + ResourceTypeId RECURRING_ORDER = ResourceTypeIdEnum.RECURRING_ORDER; + + ResourceTypeId SHIPPING = ResourceTypeIdEnum.SHIPPING; + + ResourceTypeId SHIPPING_METHOD = ResourceTypeIdEnum.SHIPPING_METHOD; + + ResourceTypeId SHOPPING_LIST = ResourceTypeIdEnum.SHOPPING_LIST; + + ResourceTypeId SHOPPING_LIST_TEXT_LINE_ITEM = ResourceTypeIdEnum.SHOPPING_LIST_TEXT_LINE_ITEM; + + ResourceTypeId STANDALONE_PRICE = ResourceTypeIdEnum.STANDALONE_PRICE; + + ResourceTypeId STORE = ResourceTypeIdEnum.STORE; + + ResourceTypeId TRANSACTION = ResourceTypeIdEnum.TRANSACTION; + + /** + * possible values of ResourceTypeId + */ + enum ResourceTypeIdEnum implements ResourceTypeId { + /** + * address + */ + ADDRESS("address"), + + /** + * asset + */ + ASSET("asset"), + + /** + * approval-flow + */ + APPROVAL_FLOW("approval-flow"), + + /** + * approval-rule + */ + APPROVAL_RULE("approval-rule"), + + /** + * associate-role + */ + ASSOCIATE_ROLE("associate-role"), + + /** + * business-unit + */ + BUSINESS_UNIT("business-unit"), + + /** + * cart-discount + */ + CART_DISCOUNT("cart-discount"), + + /** + * category + */ + CATEGORY("category"), + + /** + * channel + */ + CHANNEL("channel"), + + /** + * customer + */ + CUSTOMER("customer"), + + /** + * customer-group + */ + CUSTOMER_GROUP("customer-group"), + + /** + * custom-line-item + */ + CUSTOM_LINE_ITEM("custom-line-item"), + + /** + * discount-code + */ + DISCOUNT_CODE("discount-code"), + + /** + * inventory-entry + */ + INVENTORY_ENTRY("inventory-entry"), + + /** + * line-item + */ + LINE_ITEM("line-item"), + + /** + * order + */ + ORDER("order"), + + /** + * order-edit + */ + ORDER_EDIT("order-edit"), + + /** + * order-delivery + */ + ORDER_DELIVERY("order-delivery"), + + /** + * order-parcel + */ + ORDER_PARCEL("order-parcel"), + + /** + * order-return-item + */ + ORDER_RETURN_ITEM("order-return-item"), + + /** + * payment + */ + PAYMENT("payment"), + + /** + * payment-interface-interaction + */ + PAYMENT_INTERFACE_INTERACTION("payment-interface-interaction"), + + /** + * product-price + */ + PRODUCT_PRICE("product-price"), + + /** + * product-selection + */ + PRODUCT_SELECTION("product-selection"), + + /** + * product-tailoring + */ + PRODUCT_TAILORING("product-tailoring"), + + /** + * quote + */ + QUOTE("quote"), + + /** + * review + */ + REVIEW("review"), + + /** + * recurring-order + */ + RECURRING_ORDER("recurring-order"), + + /** + * shipping + */ + SHIPPING("shipping"), + + /** + * shipping-method + */ + SHIPPING_METHOD("shipping-method"), + + /** + * shopping-list + */ + SHOPPING_LIST("shopping-list"), + + /** + * shopping-list-text-line-item + */ + SHOPPING_LIST_TEXT_LINE_ITEM("shopping-list-text-line-item"), + + /** + * standalone-price + */ + STANDALONE_PRICE("standalone-price"), + + /** + * store + */ + STORE("store"), + + /** + * transaction + */ + TRANSACTION("transaction"); + private final String jsonName; + + private ResourceTypeIdEnum(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 ResourceTypeId + * 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 ResourceTypeId findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ResourceTypeId() { + @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 ResourceTypeId[] values() { + return ResourceTypeIdEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfo.java index 43c9be80de9..57f707ca750 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfo.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfo.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -17,7 +18,7 @@ import jakarta.validation.constraints.NotNull; /** - * ReturnInfo + *

                                                                                                                                                                                              Stores information about returns connected to an Order.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -25,8 +26,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReturnInfo returnInfo = ReturnInfo.builder()
                                                                                                                                                                                                *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                              - *             .returnTrackingId("{returnTrackingId}")
                                                                                                                                                                                              - *             .returnDate("{returnDate}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -36,7 +35,7 @@ public interface ReturnInfo { /** - * + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @return items */ @NotNull @@ -45,23 +44,23 @@ public interface ReturnInfo { public List getItems(); /** - *

                                                                                                                                                                                              Identifies, which return tracking ID is connected to this particular return.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier to track the return.

                                                                                                                                                                                              * @return returnTrackingId */ - @NotNull + @JsonProperty("returnTrackingId") public String getReturnTrackingId(); /** - * + *

                                                                                                                                                                                              Date and time (UTC) the return is initiated.

                                                                                                                                                                                              * @return returnDate */ - @NotNull + @JsonProperty("returnDate") - public String getReturnDate(); + public ZonedDateTime getReturnDate(); /** - * set items + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param items values to be set */ @@ -69,25 +68,25 @@ public interface ReturnInfo { public void setItems(final ReturnItem... items); /** - * set items + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param items values to be set */ public void setItems(final List items); /** - *

                                                                                                                                                                                              Identifies, which return tracking ID is connected to this particular return.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier to track the return.

                                                                                                                                                                                              * @param returnTrackingId value to be set */ public void setReturnTrackingId(final String returnTrackingId); /** - * set returnDate + *

                                                                                                                                                                                              Date and time (UTC) the return is initiated.

                                                                                                                                                                                              * @param returnDate value to be set */ - public void setReturnDate(final String returnDate); + public void setReturnDate(final ZonedDateTime returnDate); /** * factory method diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoBuilder.java index 81efcf54d5c..0550f80015c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,8 +17,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReturnInfo returnInfo = ReturnInfo.builder()
                                                                                                                                                                                                *             .plusItems(itemsBuilder -> itemsBuilder)
                                                                                                                                                                                              - *             .returnTrackingId("{returnTrackingId}")
                                                                                                                                                                                              - *             .returnDate("{returnDate}")
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -26,12 +26,14 @@ public class ReturnInfoBuilder implements Builder { private java.util.List items; + @Nullable private String returnTrackingId; - private String returnDate; + @Nullable + private java.time.ZonedDateTime returnDate; /** - * set values to the items + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -42,7 +44,7 @@ public ReturnInfoBuilder items(final com.commercetools.history.models.common.Ret } /** - * set value to the items + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -53,7 +55,7 @@ public ReturnInfoBuilder items(final java.util.ListInformation on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param items value to be set * @return Builder */ @@ -67,7 +69,7 @@ public ReturnInfoBuilder plusItems(final com.commercetools.history.models.common } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -82,7 +84,7 @@ public ReturnInfoBuilder plusItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -95,7 +97,7 @@ public ReturnInfoBuilder withItems( } /** - * add the value to the items using the builder function + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -106,7 +108,7 @@ public ReturnInfoBuilder addItems( } /** - * set the value to the items using the builder function + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param builder function to build the items value * @return Builder */ @@ -117,29 +119,29 @@ public ReturnInfoBuilder setItems( } /** - *

                                                                                                                                                                                              Identifies, which return tracking ID is connected to this particular return.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier to track the return.

                                                                                                                                                                                              * @param returnTrackingId value to be set * @return Builder */ - public ReturnInfoBuilder returnTrackingId(final String returnTrackingId) { + public ReturnInfoBuilder returnTrackingId(@Nullable final String returnTrackingId) { this.returnTrackingId = returnTrackingId; return this; } /** - * set the value to the returnDate + *

                                                                                                                                                                                              Date and time (UTC) the return is initiated.

                                                                                                                                                                                              * @param returnDate value to be set * @return Builder */ - public ReturnInfoBuilder returnDate(final String returnDate) { + public ReturnInfoBuilder returnDate(@Nullable final java.time.ZonedDateTime returnDate) { this.returnDate = returnDate; return this; } /** - * value of items} + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @return items */ @@ -148,20 +150,22 @@ public java.util.List getIte } /** - *

                                                                                                                                                                                              Identifies, which return tracking ID is connected to this particular return.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier to track the return.

                                                                                                                                                                                              * @return returnTrackingId */ + @Nullable public String getReturnTrackingId() { return this.returnTrackingId; } /** - * value of returnDate} + *

                                                                                                                                                                                              Date and time (UTC) the return is initiated.

                                                                                                                                                                                              * @return returnDate */ - public String getReturnDate() { + @Nullable + public java.time.ZonedDateTime getReturnDate() { return this.returnDate; } @@ -171,8 +175,6 @@ public String getReturnDate() { */ public ReturnInfo build() { Objects.requireNonNull(items, ReturnInfo.class + ": items is missing"); - Objects.requireNonNull(returnTrackingId, ReturnInfo.class + ": returnTrackingId is missing"); - Objects.requireNonNull(returnDate, ReturnInfo.class + ": returnDate is missing"); return new ReturnInfoImpl(items, returnTrackingId, returnDate); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoImpl.java index 05a5f255eea..fcec22abe21 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnInfoImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * ReturnInfo + *

                                                                                                                                                                                              Stores information about returns connected to an Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ReturnInfoImpl implements ReturnInfo, ModelBase { @@ -26,7 +26,7 @@ public class ReturnInfoImpl implements ReturnInfo, ModelBase { private String returnTrackingId; - private String returnDate; + private java.time.ZonedDateTime returnDate; /** * create instance with all properties @@ -35,7 +35,7 @@ public class ReturnInfoImpl implements ReturnInfo, ModelBase { ReturnInfoImpl( @JsonProperty("items") final java.util.List items, @JsonProperty("returnTrackingId") final String returnTrackingId, - @JsonProperty("returnDate") final String returnDate) { + @JsonProperty("returnDate") final java.time.ZonedDateTime returnDate) { this.items = items; this.returnTrackingId = returnTrackingId; this.returnDate = returnDate; @@ -48,7 +48,7 @@ public ReturnInfoImpl() { } /** - * + *

                                                                                                                                                                                              Information on the Line Items or Custom Line Items returned.

                                                                                                                                                                                              */ public java.util.List getItems() { @@ -56,7 +56,7 @@ public java.util.List getIte } /** - *

                                                                                                                                                                                              Identifies, which return tracking ID is connected to this particular return.

                                                                                                                                                                                              + *

                                                                                                                                                                                              User-defined identifier to track the return.

                                                                                                                                                                                              */ public String getReturnTrackingId() { @@ -64,10 +64,10 @@ public String getReturnTrackingId() { } /** - * + *

                                                                                                                                                                                              Date and time (UTC) the return is initiated.

                                                                                                                                                                                              */ - public String getReturnDate() { + public java.time.ZonedDateTime getReturnDate() { return this.returnDate; } @@ -83,7 +83,7 @@ public void setReturnTrackingId(final String returnTrackingId) { this.returnTrackingId = returnTrackingId; } - public void setReturnDate(final String returnDate) { + public void setReturnDate(final java.time.ZonedDateTime returnDate) { this.returnDate = returnDate; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItem.java index c0bc75fc112..32d58a2dec7 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItem.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItem.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; @@ -12,6 +13,7 @@ import io.vrap.rmf.base.client.utils.Generated; +import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; /** @@ -23,13 +25,12 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReturnItem returnItem = ReturnItem.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .type("{type}")
                                                                                                                                                                                              - *             .comment("{comment}")
                                                                                                                                                                                                *             .shipmentState(ReturnShipmentState.ADVISED)
                                                                                                                                                                                                *             .paymentState(ReturnPaymentState.NON_REFUNDABLE)
                                                                                                                                                                                              - *             .lastModifiedAt("{lastModifiedAt}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -39,7 +40,7 @@ public interface ReturnItem { /** - * + *

                                                                                                                                                                                              Unique identifier of the Return Item.

                                                                                                                                                                                              * @return id */ @NotNull @@ -47,12 +48,20 @@ public interface ReturnItem { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Return Item.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** * @@ -63,15 +72,15 @@ public interface ReturnItem { public String getType(); /** - * + *

                                                                                                                                                                                              User-defined description for the return.

                                                                                                                                                                                              * @return comment */ - @NotNull + @JsonProperty("comment") public String getComment(); /** - * + *

                                                                                                                                                                                              Shipment status of the Return Item.

                                                                                                                                                                                              * @return shipmentState */ @NotNull @@ -79,7 +88,11 @@ public interface ReturnItem { public ReturnShipmentState getShipmentState(); /** - * + *

                                                                                                                                                                                              Payment status of the Return Item:

                                                                                                                                                                                              + * * @return paymentState */ @NotNull @@ -87,34 +100,49 @@ public interface ReturnItem { public ReturnPaymentState getPaymentState(); /** - * + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was last updated.

                                                                                                                                                                                              * @return lastModifiedAt */ @NotNull @JsonProperty("lastModifiedAt") - public String getLastModifiedAt(); + public ZonedDateTime getLastModifiedAt(); /** - * + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was initially created.

                                                                                                                                                                                              * @return createdAt */ @NotNull @JsonProperty("createdAt") - public String getCreatedAt(); + public ZonedDateTime getCreatedAt(); /** - * set id + *

                                                                                                                                                                                              Unique identifier of the Return Item.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set quantity + *

                                                                                                                                                                                              User-defined unique identifier of the Return Item.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** * set type @@ -124,39 +152,50 @@ public interface ReturnItem { public void setType(final String type); /** - * set comment + *

                                                                                                                                                                                              User-defined description for the return.

                                                                                                                                                                                              * @param comment value to be set */ public void setComment(final String comment); /** - * set shipmentState + *

                                                                                                                                                                                              Shipment status of the Return Item.

                                                                                                                                                                                              * @param shipmentState value to be set */ public void setShipmentState(final ReturnShipmentState shipmentState); /** - * set paymentState + *

                                                                                                                                                                                              Payment status of the Return Item:

                                                                                                                                                                                              + * * @param paymentState value to be set */ public void setPaymentState(final ReturnPaymentState paymentState); /** - * set lastModifiedAt + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was last updated.

                                                                                                                                                                                              * @param lastModifiedAt value to be set */ - public void setLastModifiedAt(final String lastModifiedAt); + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); /** - * set createdAt + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was initially created.

                                                                                                                                                                                              * @param createdAt value to be set */ - public void setCreatedAt(final String createdAt); + public void setCreatedAt(final ZonedDateTime createdAt); /** * factory method @@ -174,11 +213,13 @@ public static ReturnItem of() { public static ReturnItem of(final ReturnItem template) { ReturnItemImpl instance = new ReturnItemImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setQuantity(template.getQuantity()); instance.setType(template.getType()); instance.setComment(template.getComment()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); + instance.setCustom(template.getCustom()); instance.setLastModifiedAt(template.getLastModifiedAt()); instance.setCreatedAt(template.getCreatedAt()); return instance; @@ -198,11 +239,13 @@ public static ReturnItem deepCopy(@Nullable final ReturnItem template) { } ReturnItemImpl instance = new ReturnItemImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setQuantity(template.getQuantity()); instance.setType(template.getType()); instance.setComment(template.getComment()); instance.setShipmentState(template.getShipmentState()); instance.setPaymentState(template.getPaymentState()); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); instance.setLastModifiedAt(template.getLastModifiedAt()); instance.setCreatedAt(template.getCreatedAt()); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemBuilder.java index 6c3c4d95dde..5bae624e54a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemBuilder.java @@ -2,6 +2,9 @@ package com.commercetools.history.models.common; import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,13 +17,12 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReturnItem returnItem = ReturnItem.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .type("{type}")
                                                                                                                                                                                              - *             .comment("{comment}")
                                                                                                                                                                                                *             .shipmentState(ReturnShipmentState.ADVISED)
                                                                                                                                                                                                *             .paymentState(ReturnPaymentState.NON_REFUNDABLE)
                                                                                                                                                                                              - *             .lastModifiedAt("{lastModifiedAt}")
                                                                                                                                                                                              - *             .createdAt("{createdAt}")
                                                                                                                                                                                              + *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                              + *             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -30,22 +32,29 @@ public class ReturnItemBuilder implements Builder { private String id; - private Integer quantity; + @Nullable + private String key; + + private Long quantity; private String type; + @Nullable private String comment; private com.commercetools.history.models.common.ReturnShipmentState shipmentState; private com.commercetools.history.models.common.ReturnPaymentState paymentState; - private String lastModifiedAt; + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + private java.time.ZonedDateTime lastModifiedAt; - private String createdAt; + private java.time.ZonedDateTime createdAt; /** - * set the value to the id + *

                                                                                                                                                                                              Unique identifier of the Return Item.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -56,12 +65,23 @@ public ReturnItemBuilder id(final String id) { } /** - * set the value to the quantity + *

                                                                                                                                                                                              User-defined unique identifier of the Return Item.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public ReturnItemBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public ReturnItemBuilder quantity(final Integer quantity) { + public ReturnItemBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } @@ -78,18 +98,18 @@ public ReturnItemBuilder type(final String type) { } /** - * set the value to the comment + *

                                                                                                                                                                                              User-defined description for the return.

                                                                                                                                                                                              * @param comment value to be set * @return Builder */ - public ReturnItemBuilder comment(final String comment) { + public ReturnItemBuilder comment(@Nullable final String comment) { this.comment = comment; return this; } /** - * set the value to the shipmentState + *

                                                                                                                                                                                              Shipment status of the Return Item.

                                                                                                                                                                                              * @param shipmentState value to be set * @return Builder */ @@ -101,7 +121,11 @@ public ReturnItemBuilder shipmentState( } /** - * set the value to the paymentState + *

                                                                                                                                                                                              Payment status of the Return Item:

                                                                                                                                                                                              + * * @param paymentState value to be set * @return Builder */ @@ -113,29 +137,64 @@ public ReturnItemBuilder paymentState( } /** - * set the value to the lastModifiedAt + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ReturnItemBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ReturnItemBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public ReturnItemBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was last updated.

                                                                                                                                                                                              * @param lastModifiedAt value to be set * @return Builder */ - public ReturnItemBuilder lastModifiedAt(final String lastModifiedAt) { + public ReturnItemBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { this.lastModifiedAt = lastModifiedAt; return this; } /** - * set the value to the createdAt + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was initially created.

                                                                                                                                                                                              * @param createdAt value to be set * @return Builder */ - public ReturnItemBuilder createdAt(final String createdAt) { + public ReturnItemBuilder createdAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; return this; } /** - * value of id} + *

                                                                                                                                                                                              Unique identifier of the Return Item.

                                                                                                                                                                                              * @return id */ @@ -144,11 +203,21 @@ public String getId() { } /** - * value of quantity} + *

                                                                                                                                                                                              User-defined unique identifier of the Return Item.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items returned.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } @@ -162,16 +231,17 @@ public String getType() { } /** - * value of comment} + *

                                                                                                                                                                                              User-defined description for the return.

                                                                                                                                                                                              * @return comment */ + @Nullable public String getComment() { return this.comment; } /** - * value of shipmentState} + *

                                                                                                                                                                                              Shipment status of the Return Item.

                                                                                                                                                                                              * @return shipmentState */ @@ -180,7 +250,11 @@ public com.commercetools.history.models.common.ReturnShipmentState getShipmentSt } /** - * value of paymentState} + *

                                                                                                                                                                                              Payment status of the Return Item:

                                                                                                                                                                                              + * * @return paymentState */ @@ -189,20 +263,30 @@ public com.commercetools.history.models.common.ReturnPaymentState getPaymentStat } /** - * value of lastModifiedAt} + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was last updated.

                                                                                                                                                                                              * @return lastModifiedAt */ - public String getLastModifiedAt() { + public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } /** - * value of createdAt} + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was initially created.

                                                                                                                                                                                              * @return createdAt */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } @@ -214,12 +298,12 @@ public ReturnItem build() { Objects.requireNonNull(id, ReturnItem.class + ": id is missing"); Objects.requireNonNull(quantity, ReturnItem.class + ": quantity is missing"); Objects.requireNonNull(type, ReturnItem.class + ": type is missing"); - Objects.requireNonNull(comment, ReturnItem.class + ": comment is missing"); Objects.requireNonNull(shipmentState, ReturnItem.class + ": shipmentState is missing"); Objects.requireNonNull(paymentState, ReturnItem.class + ": paymentState is missing"); Objects.requireNonNull(lastModifiedAt, ReturnItem.class + ": lastModifiedAt is missing"); Objects.requireNonNull(createdAt, ReturnItem.class + ": createdAt is missing"); - return new ReturnItemImpl(id, quantity, type, comment, shipmentState, paymentState, lastModifiedAt, createdAt); + return new ReturnItemImpl(id, key, quantity, type, comment, shipmentState, paymentState, custom, lastModifiedAt, + createdAt); } /** @@ -227,7 +311,8 @@ public ReturnItem build() { * @return ReturnItem */ public ReturnItem buildUnchecked() { - return new ReturnItemImpl(id, quantity, type, comment, shipmentState, paymentState, lastModifiedAt, createdAt); + return new ReturnItemImpl(id, key, quantity, type, comment, shipmentState, paymentState, custom, lastModifiedAt, + createdAt); } /** @@ -246,11 +331,13 @@ public static ReturnItemBuilder of() { public static ReturnItemBuilder of(final ReturnItem template) { ReturnItemBuilder builder = new ReturnItemBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.quantity = template.getQuantity(); builder.type = template.getType(); builder.comment = template.getComment(); builder.shipmentState = template.getShipmentState(); builder.paymentState = template.getPaymentState(); + builder.custom = template.getCustom(); builder.lastModifiedAt = template.getLastModifiedAt(); builder.createdAt = template.getCreatedAt(); return builder; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemImpl.java index 2179e681c3e..c9fe63aa4d5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReturnItemImpl.java @@ -24,7 +24,9 @@ public class ReturnItemImpl implements ReturnItem, ModelBase { private String id; - private Integer quantity; + private String key; + + private Long quantity; private String type; @@ -34,26 +36,32 @@ public class ReturnItemImpl implements ReturnItem, ModelBase { private com.commercetools.history.models.common.ReturnPaymentState paymentState; - private String lastModifiedAt; + private com.commercetools.history.models.common.CustomFields custom; + + private java.time.ZonedDateTime lastModifiedAt; - private String createdAt; + private java.time.ZonedDateTime createdAt; /** * create instance with all properties */ @JsonCreator - ReturnItemImpl(@JsonProperty("id") final String id, @JsonProperty("quantity") final Integer quantity, - @JsonProperty("type") final String type, @JsonProperty("comment") final String comment, + ReturnItemImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("quantity") final Long quantity, @JsonProperty("type") final String type, + @JsonProperty("comment") final String comment, @JsonProperty("shipmentState") final com.commercetools.history.models.common.ReturnShipmentState shipmentState, @JsonProperty("paymentState") final com.commercetools.history.models.common.ReturnPaymentState paymentState, - @JsonProperty("lastModifiedAt") final String lastModifiedAt, - @JsonProperty("createdAt") final String createdAt) { + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt) { this.id = id; + this.key = key; this.quantity = quantity; this.type = type; this.comment = comment; this.shipmentState = shipmentState; this.paymentState = paymentState; + this.custom = custom; this.lastModifiedAt = lastModifiedAt; this.createdAt = createdAt; } @@ -65,7 +73,7 @@ public ReturnItemImpl() { } /** - * + *

                                                                                                                                                                                              Unique identifier of the Return Item.

                                                                                                                                                                                              */ public String getId() { @@ -73,10 +81,18 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the Return Item.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Number of Line Items or Custom Line Items returned.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } @@ -89,7 +105,7 @@ public String getType() { } /** - * + *

                                                                                                                                                                                              User-defined description for the return.

                                                                                                                                                                                              */ public String getComment() { @@ -97,7 +113,7 @@ public String getComment() { } /** - * + *

                                                                                                                                                                                              Shipment status of the Return Item.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.ReturnShipmentState getShipmentState() { @@ -105,7 +121,11 @@ public com.commercetools.history.models.common.ReturnShipmentState getShipmentSt } /** - * + *

                                                                                                                                                                                              Payment status of the Return Item:

                                                                                                                                                                                              + * */ public com.commercetools.history.models.common.ReturnPaymentState getPaymentState() { @@ -113,18 +133,26 @@ public com.commercetools.history.models.common.ReturnPaymentState getPaymentStat } /** - * + *

                                                                                                                                                                                              Custom Fields of the Return Item.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was last updated.

                                                                                                                                                                                              */ - public String getLastModifiedAt() { + public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } /** - * + *

                                                                                                                                                                                              Date and time (UTC) the Return Item was initially created.

                                                                                                                                                                                              */ - public String getCreatedAt() { + public java.time.ZonedDateTime getCreatedAt() { return this.createdAt; } @@ -132,7 +160,11 @@ public void setId(final String id) { this.id = id; } - public void setQuantity(final Integer quantity) { + public void setKey(final String key) { + this.key = key; + } + + public void setQuantity(final Long quantity) { this.quantity = quantity; } @@ -152,11 +184,15 @@ public void setPaymentState(final com.commercetools.history.models.common.Return this.paymentState = paymentState; } - public void setLastModifiedAt(final String lastModifiedAt) { + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { this.lastModifiedAt = lastModifiedAt; } - public void setCreatedAt(final String createdAt) { + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { this.createdAt = createdAt; } @@ -171,19 +207,23 @@ public boolean equals(Object o) { ReturnItemImpl that = (ReturnItemImpl) o; return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(quantity, that.quantity) .append(type, that.type) .append(comment, that.comment) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) + .append(custom, that.custom) .append(lastModifiedAt, that.lastModifiedAt) .append(createdAt, that.createdAt) .append(id, that.id) + .append(key, that.key) .append(quantity, that.quantity) .append(type, that.type) .append(comment, that.comment) .append(shipmentState, that.shipmentState) .append(paymentState, that.paymentState) + .append(custom, that.custom) .append(lastModifiedAt, that.lastModifiedAt) .append(createdAt, that.createdAt) .isEquals(); @@ -192,11 +232,13 @@ public boolean equals(Object o) { @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(id) + .append(key) .append(quantity) .append(type) .append(comment) .append(shipmentState) .append(paymentState) + .append(custom) .append(lastModifiedAt) .append(createdAt) .toHashCode(); @@ -205,11 +247,13 @@ public int hashCode() { @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("quantity", quantity) .append("type", type) .append("comment", comment) .append("shipmentState", shipmentState) .append("paymentState", paymentState) + .append("custom", custom) .append("lastModifiedAt", lastModifiedAt) .append("createdAt", createdAt) .build(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatistics.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatistics.java index c38218409bd..98b26fd4e27 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatistics.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatistics.java @@ -23,9 +23,9 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReviewRatingStatistics reviewRatingStatistics = ReviewRatingStatistics.builder()
                                                                                                                                                                                              - *             .averageRating(1)
                                                                                                                                                                                              - *             .highestRating(1)
                                                                                                                                                                                              - *             .lowestRating(1)
                                                                                                                                                                                              + *             .averageRating(0.3)
                                                                                                                                                                                              + *             .highestRating(0.3)
                                                                                                                                                                                              + *             .lowestRating(0.3)
                                                                                                                                                                                                *             .count(1)
                                                                                                                                                                                                *             .ratingsDistribution(ratingsDistributionBuilder -> ratingsDistributionBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                              @@ -42,7 +42,7 @@ public interface ReviewRatingStatistics {
                                                                                                                                                                                                    */
                                                                                                                                                                                                   @NotNull
                                                                                                                                                                                                   @JsonProperty("averageRating")
                                                                                                                                                                                              -    public Integer getAverageRating();
                                                                                                                                                                                              +    public Double getAverageRating();
                                                                                                                                                                                               
                                                                                                                                                                                                   /**
                                                                                                                                                                                                    *  

                                                                                                                                                                                              Highest rating of one target

                                                                                                                                                                                              @@ -50,7 +50,7 @@ public interface ReviewRatingStatistics { */ @NotNull @JsonProperty("highestRating") - public Integer getHighestRating(); + public Double getHighestRating(); /** *

                                                                                                                                                                                              Lowest rating of one target

                                                                                                                                                                                              @@ -58,7 +58,7 @@ public interface ReviewRatingStatistics { */ @NotNull @JsonProperty("lowestRating") - public Integer getLowestRating(); + public Double getLowestRating(); /** *

                                                                                                                                                                                              Number of ratings taken into account

                                                                                                                                                                                              @@ -69,7 +69,7 @@ public interface ReviewRatingStatistics { public Integer getCount(); /** - *

                                                                                                                                                                                              The full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              * @return ratingsDistribution */ @NotNull @@ -82,21 +82,21 @@ public interface ReviewRatingStatistics { * @param averageRating value to be set */ - public void setAverageRating(final Integer averageRating); + public void setAverageRating(final Double averageRating); /** *

                                                                                                                                                                                              Highest rating of one target

                                                                                                                                                                                              * @param highestRating value to be set */ - public void setHighestRating(final Integer highestRating); + public void setHighestRating(final Double highestRating); /** *

                                                                                                                                                                                              Lowest rating of one target

                                                                                                                                                                                              * @param lowestRating value to be set */ - public void setLowestRating(final Integer lowestRating); + public void setLowestRating(final Double lowestRating); /** *

                                                                                                                                                                                              Number of ratings taken into account

                                                                                                                                                                                              @@ -106,7 +106,7 @@ public interface ReviewRatingStatistics { public void setCount(final Integer count); /** - *

                                                                                                                                                                                              The full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              * @param ratingsDistribution value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsBuilder.java index e473dcc1a78..c7339ef646f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsBuilder.java @@ -13,9 +13,9 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ReviewRatingStatistics reviewRatingStatistics = ReviewRatingStatistics.builder()
                                                                                                                                                                                              - *             .averageRating(1)
                                                                                                                                                                                              - *             .highestRating(1)
                                                                                                                                                                                              - *             .lowestRating(1)
                                                                                                                                                                                              + *             .averageRating(0.3)
                                                                                                                                                                                              + *             .highestRating(0.3)
                                                                                                                                                                                              + *             .lowestRating(0.3)
                                                                                                                                                                                                *             .count(1)
                                                                                                                                                                                                *             .ratingsDistribution(ratingsDistributionBuilder -> ratingsDistributionBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                              @@ -25,11 +25,11 @@
                                                                                                                                                                                               @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
                                                                                                                                                                                               public class ReviewRatingStatisticsBuilder implements Builder {
                                                                                                                                                                                               
                                                                                                                                                                                              -    private Integer averageRating;
                                                                                                                                                                                              +    private Double averageRating;
                                                                                                                                                                                               
                                                                                                                                                                                              -    private Integer highestRating;
                                                                                                                                                                                              +    private Double highestRating;
                                                                                                                                                                                               
                                                                                                                                                                                              -    private Integer lowestRating;
                                                                                                                                                                                              +    private Double lowestRating;
                                                                                                                                                                                               
                                                                                                                                                                                                   private Integer count;
                                                                                                                                                                                               
                                                                                                                                                                                              @@ -41,7 +41,7 @@ public class ReviewRatingStatisticsBuilder implements BuilderThe full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              * @param ratingsDistribution value to be set * @return Builder */ @@ -95,7 +95,7 @@ public ReviewRatingStatisticsBuilder ratingsDistribution(final java.lang.Object * @return averageRating */ - public Integer getAverageRating() { + public Double getAverageRating() { return this.averageRating; } @@ -104,7 +104,7 @@ public Integer getAverageRating() { * @return highestRating */ - public Integer getHighestRating() { + public Double getHighestRating() { return this.highestRating; } @@ -113,7 +113,7 @@ public Integer getHighestRating() { * @return lowestRating */ - public Integer getLowestRating() { + public Double getLowestRating() { return this.lowestRating; } @@ -127,7 +127,7 @@ public Integer getCount() { } /** - *

                                                                                                                                                                                              The full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              * @return ratingsDistribution */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsImpl.java index f3f19f97fb5..053180457f3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsImpl.java @@ -22,11 +22,11 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ReviewRatingStatisticsImpl implements ReviewRatingStatistics, ModelBase { - private Integer averageRating; + private Double averageRating; - private Integer highestRating; + private Double highestRating; - private Integer lowestRating; + private Double lowestRating; private Integer count; @@ -36,9 +36,9 @@ public class ReviewRatingStatisticsImpl implements ReviewRatingStatistics, Model * create instance with all properties */ @JsonCreator - ReviewRatingStatisticsImpl(@JsonProperty("averageRating") final Integer averageRating, - @JsonProperty("highestRating") final Integer highestRating, - @JsonProperty("lowestRating") final Integer lowestRating, @JsonProperty("count") final Integer count, + ReviewRatingStatisticsImpl(@JsonProperty("averageRating") final Double averageRating, + @JsonProperty("highestRating") final Double highestRating, + @JsonProperty("lowestRating") final Double lowestRating, @JsonProperty("count") final Integer count, @JsonProperty("ratingsDistribution") final java.lang.Object ratingsDistribution) { this.averageRating = averageRating; this.highestRating = highestRating; @@ -57,7 +57,7 @@ public ReviewRatingStatisticsImpl() { *

                                                                                                                                                                                              Average rating of one target This number is rounded with 5 decimals.

                                                                                                                                                                                              */ - public Integer getAverageRating() { + public Double getAverageRating() { return this.averageRating; } @@ -65,7 +65,7 @@ public Integer getAverageRating() { *

                                                                                                                                                                                              Highest rating of one target

                                                                                                                                                                                              */ - public Integer getHighestRating() { + public Double getHighestRating() { return this.highestRating; } @@ -73,7 +73,7 @@ public Integer getHighestRating() { *

                                                                                                                                                                                              Lowest rating of one target

                                                                                                                                                                                              */ - public Integer getLowestRating() { + public Double getLowestRating() { return this.lowestRating; } @@ -86,22 +86,22 @@ public Integer getCount() { } /** - *

                                                                                                                                                                                              The full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Full distribution of the ratings. The keys are the different ratings and the values are the count of reviews having this rating. Only the used ratings appear in this object.

                                                                                                                                                                                              */ public java.lang.Object getRatingsDistribution() { return this.ratingsDistribution; } - public void setAverageRating(final Integer averageRating) { + public void setAverageRating(final Double averageRating) { this.averageRating = averageRating; } - public void setHighestRating(final Integer highestRating) { + public void setHighestRating(final Double highestRating) { this.highestRating = highestRating; } - public void setLowestRating(final Integer lowestRating) { + public void setLowestRating(final Double lowestRating) { this.lowestRating = lowestRating; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RoundingMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RoundingMode.java index 8446cae56e6..7352c0d10eb 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RoundingMode.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/RoundingMode.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * RoundingMode + *

                                                                                                                                                                                              Determines how monetary values are rounded.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface RoundingMode extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPrice.java new file mode 100644 index 00000000000..0737d809458 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPrice.java @@ -0,0 +1,288 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Scoped Price is contained in a ProductVariant which is returned in response to a Product Projection Search request when Scoped Price Search is used.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ScopedPrice scopedPrice = ScopedPrice.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .currentValue(currentValueBuilder -> currentValueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ScopedPriceImpl.class) +public interface ScopedPrice { + + /** + *

                                                                                                                                                                                              Platform-generated unique identifier of the Price.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + * @return value + */ + @NotNull + @Valid + @JsonProperty("value") + public TypedMoney getValue(); + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + * @return currentValue + */ + @NotNull + @Valid + @JsonProperty("currentValue") + public TypedMoney getCurrentValue(); + + /** + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              + * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupReference getCustomerGroup(); + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelReference getChannel(); + + /** + *

                                                                                                                                                                                              Date and time from which the Price is valid.

                                                                                                                                                                                              + * @return validFrom + */ + + @JsonProperty("validFrom") + public ZonedDateTime getValidFrom(); + + /** + *

                                                                                                                                                                                              Date and time until which the Price is valid.

                                                                                                                                                                                              + * @return validUntil + */ + + @JsonProperty("validUntil") + public ZonedDateTime getValidUntil(); + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @return discounted + */ + @Valid + @JsonProperty("discounted") + public DiscountedPrice getDiscounted(); + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              Platform-generated unique identifier of the Price.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + * @param value value to be set + */ + + public void setValue(final TypedMoney value); + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + * @param currentValue value to be set + */ + + public void setCurrentValue(final TypedMoney currentValue); + + /** + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              + * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupReference customerGroup); + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @param channel value to be set + */ + + public void setChannel(final ChannelReference channel); + + /** + *

                                                                                                                                                                                              Date and time from which the Price is valid.

                                                                                                                                                                                              + * @param validFrom value to be set + */ + + public void setValidFrom(final ZonedDateTime validFrom); + + /** + *

                                                                                                                                                                                              Date and time until which the Price is valid.

                                                                                                                                                                                              + * @param validUntil value to be set + */ + + public void setValidUntil(final ZonedDateTime validUntil); + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @param discounted value to be set + */ + + public void setDiscounted(final DiscountedPrice discounted); + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + * factory method + * @return instance of ScopedPrice + */ + public static ScopedPrice of() { + return new ScopedPriceImpl(); + } + + /** + * factory method to create a shallow copy ScopedPrice + * @param template instance to be copied + * @return copy instance + */ + public static ScopedPrice of(final ScopedPrice template) { + ScopedPriceImpl instance = new ScopedPriceImpl(); + instance.setId(template.getId()); + instance.setValue(template.getValue()); + instance.setCurrentValue(template.getCurrentValue()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setDiscounted(template.getDiscounted()); + instance.setCustom(template.getCustom()); + return instance; + } + + public ScopedPrice copyDeep(); + + /** + * factory method to create a deep copy of ScopedPrice + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ScopedPrice deepCopy(@Nullable final ScopedPrice template) { + if (template == null) { + return null; + } + ScopedPriceImpl instance = new ScopedPriceImpl(); + instance.setId(template.getId()); + instance.setValue(com.commercetools.history.models.common.TypedMoney.deepCopy(template.getValue())); + instance.setCurrentValue( + com.commercetools.history.models.common.TypedMoney.deepCopy(template.getCurrentValue())); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup( + com.commercetools.history.models.common.CustomerGroupReference.deepCopy(template.getCustomerGroup())); + instance.setChannel(com.commercetools.history.models.common.ChannelReference.deepCopy(template.getChannel())); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setDiscounted( + com.commercetools.history.models.common.DiscountedPrice.deepCopy(template.getDiscounted())); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); + return instance; + } + + /** + * builder factory method for ScopedPrice + * @return builder + */ + public static ScopedPriceBuilder builder() { + return ScopedPriceBuilder.of(); + } + + /** + * create builder for ScopedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ScopedPriceBuilder builder(final ScopedPrice template) { + return ScopedPriceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withScopedPrice(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/ScopedPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPriceBuilder.java new file mode 100644 index 00000000000..537acd977b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPriceBuilder.java @@ -0,0 +1,440 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ScopedPriceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ScopedPrice scopedPrice = ScopedPrice.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .value(valueBuilder -> valueBuilder)
                                                                                                                                                                                              + *             .currentValue(currentValueBuilder -> currentValueBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ScopedPriceBuilder implements Builder { + + private String id; + + private com.commercetools.history.models.common.TypedMoney value; + + private com.commercetools.history.models.common.TypedMoney currentValue; + + @Nullable + private String country; + + @Nullable + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + @Nullable + private com.commercetools.history.models.common.ChannelReference channel; + + @Nullable + private java.time.ZonedDateTime validFrom; + + @Nullable + private java.time.ZonedDateTime validUntil; + + @Nullable + private com.commercetools.history.models.common.DiscountedPrice discounted; + + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + /** + *

                                                                                                                                                                                              Platform-generated unique identifier of the Price.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ScopedPriceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + * @param value value to be set + * @return Builder + */ + + public ScopedPriceBuilder value(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + return this; + } + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + * @param builder function to build the value value + * @return Builder + */ + + public ScopedPriceBuilder value( + Function> builder) { + this.value = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + * @param currentValue value to be set + * @return Builder + */ + + public ScopedPriceBuilder currentValue(final com.commercetools.history.models.common.TypedMoney currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + * @param builder function to build the currentValue value + * @return Builder + */ + + public ScopedPriceBuilder currentValue( + Function> builder) { + this.currentValue = builder.apply(com.commercetools.history.models.common.TypedMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              + * @param country value to be set + * @return Builder + */ + + public ScopedPriceBuilder country(@Nullable final String country) { + this.country = country; + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @param builder function to build the customerGroup value + * @return Builder + */ + + public ScopedPriceBuilder customerGroup( + Function builder) { + this.customerGroup = builder.apply(com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @param builder function to build the customerGroup value + * @return Builder + */ + + public ScopedPriceBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder.apply(com.commercetools.history.models.common.CustomerGroupReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @param customerGroup value to be set + * @return Builder + */ + + public ScopedPriceBuilder customerGroup( + @Nullable final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @param builder function to build the channel value + * @return Builder + */ + + public ScopedPriceBuilder channel( + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @param builder function to build the channel value + * @return Builder + */ + + public ScopedPriceBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @param channel value to be set + * @return Builder + */ + + public ScopedPriceBuilder channel( + @Nullable final com.commercetools.history.models.common.ChannelReference channel) { + this.channel = channel; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time from which the Price is valid.

                                                                                                                                                                                              + * @param validFrom value to be set + * @return Builder + */ + + public ScopedPriceBuilder validFrom(@Nullable final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time until which the Price is valid.

                                                                                                                                                                                              + * @param validUntil value to be set + * @return Builder + */ + + public ScopedPriceBuilder validUntil(@Nullable final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + return this; + } + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @param builder function to build the discounted value + * @return Builder + */ + + public ScopedPriceBuilder discounted( + Function builder) { + this.discounted = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @param builder function to build the discounted value + * @return Builder + */ + + public ScopedPriceBuilder withDiscounted( + Function builder) { + this.discounted = builder.apply(com.commercetools.history.models.common.DiscountedPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @param discounted value to be set + * @return Builder + */ + + public ScopedPriceBuilder discounted( + @Nullable final com.commercetools.history.models.common.DiscountedPrice discounted) { + this.discounted = discounted; + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ScopedPriceBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ScopedPriceBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public ScopedPriceBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              Platform-generated unique identifier of the Price.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + * @return value + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + * @return currentValue + */ + + public com.commercetools.history.models.common.TypedMoney getCurrentValue() { + return this.currentValue; + } + + /** + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              + * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + * @return customerGroup + */ + + @Nullable + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + * @return channel + */ + + @Nullable + public com.commercetools.history.models.common.ChannelReference getChannel() { + return this.channel; + } + + /** + *

                                                                                                                                                                                              Date and time from which the Price is valid.

                                                                                                                                                                                              + * @return validFrom + */ + + @Nullable + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

                                                                                                                                                                                              Date and time until which the Price is valid.

                                                                                                                                                                                              + * @return validUntil + */ + + @Nullable + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + * @return discounted + */ + + @Nullable + public com.commercetools.history.models.common.DiscountedPrice getDiscounted() { + return this.discounted; + } + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + * builds ScopedPrice with checking for non-null required values + * @return ScopedPrice + */ + public ScopedPrice build() { + Objects.requireNonNull(id, ScopedPrice.class + ": id is missing"); + Objects.requireNonNull(value, ScopedPrice.class + ": value is missing"); + Objects.requireNonNull(currentValue, ScopedPrice.class + ": currentValue is missing"); + return new ScopedPriceImpl(id, value, currentValue, country, customerGroup, channel, validFrom, validUntil, + discounted, custom); + } + + /** + * builds ScopedPrice without checking for non-null required values + * @return ScopedPrice + */ + public ScopedPrice buildUnchecked() { + return new ScopedPriceImpl(id, value, currentValue, country, customerGroup, channel, validFrom, validUntil, + discounted, custom); + } + + /** + * factory method for an instance of ScopedPriceBuilder + * @return builder + */ + public static ScopedPriceBuilder of() { + return new ScopedPriceBuilder(); + } + + /** + * create builder for ScopedPrice instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ScopedPriceBuilder of(final ScopedPrice template) { + ScopedPriceBuilder builder = new ScopedPriceBuilder(); + builder.id = template.getId(); + builder.value = template.getValue(); + builder.currentValue = template.getCurrentValue(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.validFrom = template.getValidFrom(); + builder.validUntil = template.getValidUntil(); + builder.discounted = template.getDiscounted(); + builder.custom = template.getCustom(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPriceImpl.java new file mode 100644 index 00000000000..8d196662f82 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ScopedPriceImpl.java @@ -0,0 +1,265 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Scoped Price is contained in a ProductVariant which is returned in response to a Product Projection Search request when Scoped Price Search is used.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ScopedPriceImpl implements ScopedPrice, ModelBase { + + private String id; + + private com.commercetools.history.models.common.TypedMoney value; + + private com.commercetools.history.models.common.TypedMoney currentValue; + + private String country; + + private com.commercetools.history.models.common.CustomerGroupReference customerGroup; + + private com.commercetools.history.models.common.ChannelReference channel; + + private java.time.ZonedDateTime validFrom; + + private java.time.ZonedDateTime validUntil; + + private com.commercetools.history.models.common.DiscountedPrice discounted; + + private com.commercetools.history.models.common.CustomFields custom; + + /** + * create instance with all properties + */ + @JsonCreator + ScopedPriceImpl(@JsonProperty("id") final String id, + @JsonProperty("value") final com.commercetools.history.models.common.TypedMoney value, + @JsonProperty("currentValue") final com.commercetools.history.models.common.TypedMoney currentValue, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.history.models.common.CustomerGroupReference customerGroup, + @JsonProperty("channel") final com.commercetools.history.models.common.ChannelReference channel, + @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom, + @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, + @JsonProperty("discounted") final com.commercetools.history.models.common.DiscountedPrice discounted, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) { + this.id = id; + this.value = value; + this.currentValue = currentValue; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.validFrom = validFrom; + this.validUntil = validUntil; + this.discounted = discounted; + this.custom = custom; + } + + /** + * create empty instance + */ + public ScopedPriceImpl() { + } + + /** + *

                                                                                                                                                                                              Platform-generated unique identifier of the Price.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              Original value of the Price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getValue() { + return this.value; + } + + /** + *

                                                                                                                                                                                              If available, either the original price value or discounted value.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TypedMoney getCurrentValue() { + return this.currentValue; + } + + /** + *

                                                                                                                                                                                              Country code of the geographic location.

                                                                                                                                                                                              + */ + + public String getCountry() { + return this.country; + } + + /** + *

                                                                                                                                                                                              Reference to a CustomerGroup.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomerGroupReference getCustomerGroup() { + return this.customerGroup; + } + + /** + *

                                                                                                                                                                                              Reference to a Channel.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ChannelReference getChannel() { + return this.channel; + } + + /** + *

                                                                                                                                                                                              Date and time from which the Price is valid.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

                                                                                                                                                                                              Date and time until which the Price is valid.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

                                                                                                                                                                                              Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.

                                                                                                                                                                                              + *

                                                                                                                                                                                              When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.DiscountedPrice getDiscounted() { + return this.discounted; + } + + /** + *

                                                                                                                                                                                              Custom Fields for the Price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + public void setId(final String id) { + this.id = id; + } + + public void setValue(final com.commercetools.history.models.common.TypedMoney value) { + this.value = value; + } + + public void setCurrentValue(final com.commercetools.history.models.common.TypedMoney currentValue) { + this.currentValue = currentValue; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup(final com.commercetools.history.models.common.CustomerGroupReference customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.history.models.common.ChannelReference channel) { + this.channel = channel; + } + + public void setValidFrom(final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + } + + public void setValidUntil(final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + } + + public void setDiscounted(final com.commercetools.history.models.common.DiscountedPrice discounted) { + this.discounted = discounted; + } + + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ScopedPriceImpl that = (ScopedPriceImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(value, that.value) + .append(currentValue, that.currentValue) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(discounted, that.discounted) + .append(custom, that.custom) + .append(id, that.id) + .append(value, that.value) + .append(currentValue, that.currentValue) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(discounted, that.discounted) + .append(custom, that.custom) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(value) + .append(currentValue) + .append(country) + .append(customerGroup) + .append(channel) + .append(validFrom) + .append(validUntil) + .append(discounted) + .append(custom) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("value", value) + .append("currentValue", currentValue) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("validFrom", validFrom) + .append("validUntil", validUntil) + .append("discounted", discounted) + .append("custom", custom) + .build(); + } + + @Override + public ScopedPrice copyDeep() { + return ScopedPrice.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeyword.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeyword.java index 84d89c8d35d..02b908ac69c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeyword.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeyword.java @@ -24,7 +24,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SearchKeyword searchKeyword = SearchKeyword.builder()
                                                                                                                                                                                                *             .text("{text}")
                                                                                                                                                                                              - *             .suggestTokenizer(suggestTokenizerBuilder -> suggestTokenizerBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -34,7 +33,7 @@ public interface SearchKeyword { /** - * + *

                                                                                                                                                                                              Text to return in the SuggestionResult.

                                                                                                                                                                                              * @return text */ @NotNull @@ -42,23 +41,22 @@ public interface SearchKeyword { public String getText(); /** - * + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @return suggestTokenizer */ - @NotNull @Valid @JsonProperty("suggestTokenizer") public SuggestTokenizer getSuggestTokenizer(); /** - * set text + *

                                                                                                                                                                                              Text to return in the SuggestionResult.

                                                                                                                                                                                              * @param text value to be set */ public void setText(final String text); /** - * set suggestTokenizer + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @param suggestTokenizer value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordBuilder.java index b02ce4ce09a..047b2c8f498 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,7 +17,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SearchKeyword searchKeyword = SearchKeyword.builder()
                                                                                                                                                                                                *             .text("{text}")
                                                                                                                                                                                              - *             .suggestTokenizer(suggestTokenizerBuilder -> suggestTokenizerBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -25,10 +26,11 @@ public class SearchKeywordBuilder implements Builder { private String text; + @Nullable private com.commercetools.history.models.common.SuggestTokenizer suggestTokenizer; /** - * set the value to the text + *

                                                                                                                                                                                              Text to return in the SuggestionResult.

                                                                                                                                                                                              * @param text value to be set * @return Builder */ @@ -39,7 +41,7 @@ public SearchKeywordBuilder text(final String text) { } /** - * set the value to the suggestTokenizer using the builder function + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @param builder function to build the suggestTokenizer value * @return Builder */ @@ -52,7 +54,7 @@ public SearchKeywordBuilder suggestTokenizer( } /** - * set the value to the suggestTokenizer using the builder function + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @param builder function to build the suggestTokenizer value * @return Builder */ @@ -64,19 +66,19 @@ public SearchKeywordBuilder withSuggestTokenizer( } /** - * set the value to the suggestTokenizer + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @param suggestTokenizer value to be set * @return Builder */ public SearchKeywordBuilder suggestTokenizer( - final com.commercetools.history.models.common.SuggestTokenizer suggestTokenizer) { + @Nullable final com.commercetools.history.models.common.SuggestTokenizer suggestTokenizer) { this.suggestTokenizer = suggestTokenizer; return this; } /** - * value of text} + *

                                                                                                                                                                                              Text to return in the SuggestionResult.

                                                                                                                                                                                              * @return text */ @@ -85,10 +87,11 @@ public String getText() { } /** - * value of suggestTokenizer} + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              * @return suggestTokenizer */ + @Nullable public com.commercetools.history.models.common.SuggestTokenizer getSuggestTokenizer() { return this.suggestTokenizer; } @@ -99,7 +102,6 @@ public com.commercetools.history.models.common.SuggestTokenizer getSuggestTokeni */ public SearchKeyword build() { Objects.requireNonNull(text, SearchKeyword.class + ": text is missing"); - Objects.requireNonNull(suggestTokenizer, SearchKeyword.class + ": suggestTokenizer is missing"); return new SearchKeywordImpl(text, suggestTokenizer); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordImpl.java index 06d72264283..08cdb9757d3 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordImpl.java @@ -43,7 +43,7 @@ public SearchKeywordImpl() { } /** - * + *

                                                                                                                                                                                              Text to return in the SuggestionResult.

                                                                                                                                                                                              */ public String getText() { @@ -51,7 +51,7 @@ public String getText() { } /** - * + *

                                                                                                                                                                                              If no tokenizer is defined, the text is used as a single token.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.SuggestTokenizer getSuggestTokenizer() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywords.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywords.java index 5c702f794d3..fb98344e0e9 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywords.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywords.java @@ -16,7 +16,7 @@ import jakarta.validation.constraints.NotNull; /** - * SearchKeywords + *

                                                                                                                                                                                              Search keywords are JSON objects primarily used by Search Term Suggestions, but are also considered for a full text search in the Product Projection Search API. The keys are of type Locale, and the values are an array of SearchKeyword.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -33,7 +33,7 @@ public interface SearchKeywords { /** - * + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              * @return map of the pattern property values */ @NotNull @@ -42,7 +42,7 @@ public interface SearchKeywords { public Map> values(); /** - * set pattern property + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              * @param key property name * @param value property value */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsBuilder.java index 82daa5b883a..9c0ff7d564f 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsBuilder.java @@ -24,7 +24,7 @@ public class SearchKeywordsBuilder implements Builder { private Map> values = new HashMap<>(); /** - * assign pattern properties to the builder + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              * @param values properties to be set * @return Builder */ @@ -36,7 +36,7 @@ public SearchKeywordsBuilder values( } /** - * assign a pattern property to the builder + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              * @param key property name * @param value property value * @return Builder @@ -52,7 +52,7 @@ public SearchKeywordsBuilder addValue(final String key, } /** - * values of pattern properties + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              * @return pattern properties */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsImpl.java index 370f6166bb6..f3904a7ec95 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SearchKeywordsImpl.java @@ -18,7 +18,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * SearchKeywords + *

                                                                                                                                                                                              Search keywords are JSON objects primarily used by Search Term Suggestions, but are also considered for a full text search in the Product Projection Search API. The keys are of type Locale, and the values are an array of SearchKeyword.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SearchKeywordsImpl implements SearchKeywords, ModelBase { @@ -41,7 +41,7 @@ public SearchKeywordsImpl() { } /** - * + *

                                                                                                                                                                                              Key-value pair where the keys are of type Locale and the values are an array of SearchKeyword.

                                                                                                                                                                                              */ public Map> values() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SelectionMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SelectionMode.java index e21a477e8b5..06b85761912 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SelectionMode.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SelectionMode.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * SelectionMode + *

                                                                                                                                                                                              Defines which matching items are to be discounted.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface SelectionMode extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShipmentState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShipmentState.java index 548ce6ea645..3b9676546b8 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShipmentState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShipmentState.java @@ -11,13 +11,15 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * ShipmentState + *

                                                                                                                                                                                              Indicates the shipment status of the Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface ShipmentState extends JsonEnum { ShipmentState SHIPPED = ShipmentStateEnum.SHIPPED; + ShipmentState DELIVERED = ShipmentStateEnum.DELIVERED; + ShipmentState READY = ShipmentStateEnum.READY; ShipmentState PENDING = ShipmentStateEnum.PENDING; @@ -28,6 +30,8 @@ public interface ShipmentState extends JsonEnum { ShipmentState BACKORDER = ShipmentStateEnum.BACKORDER; + ShipmentState CANCELED = ShipmentStateEnum.CANCELED; + /** * possible values of ShipmentState */ @@ -37,6 +41,11 @@ enum ShipmentStateEnum implements ShipmentState { */ SHIPPED("Shipped"), + /** + * Delivered + */ + DELIVERED("Delivered"), + /** * Ready */ @@ -60,7 +69,12 @@ enum ShipmentStateEnum implements ShipmentState { /** * Backorder */ - BACKORDER("Backorder"); + BACKORDER("Backorder"), + + /** + * Canceled + */ + CANCELED("Canceled"); private final String jsonName; private ShipmentStateEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Shipping.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Shipping.java new file mode 100644 index 00000000000..bf692619692 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Shipping.java @@ -0,0 +1,211 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * Shipping + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     Shipping shipping = Shipping.builder()
                                                                                                                                                                                              + *             .shippingKey("{shippingKey}")
                                                                                                                                                                                              + *             .shippingInfo(shippingInfoBuilder -> shippingInfoBuilder)
                                                                                                                                                                                              + *             .shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingImpl.class) +public interface Shipping { + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingKey + */ + @NotNull + @JsonProperty("shippingKey") + public String getShippingKey(); + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @return shippingInfo + */ + @NotNull + @Valid + @JsonProperty("shippingInfo") + public ShippingInfo getShippingInfo(); + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @return shippingAddress + */ + @NotNull + @Valid + @JsonProperty("shippingAddress") + public Address getShippingAddress(); + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @return shippingRateInput + */ + @Valid + @JsonProperty("shippingRateInput") + public ShippingRateInput getShippingRateInput(); + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingCustomFields + */ + @Valid + @JsonProperty("shippingCustomFields") + public CustomFields getShippingCustomFields(); + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingKey value to be set + */ + + public void setShippingKey(final String shippingKey); + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @param shippingInfo value to be set + */ + + public void setShippingInfo(final ShippingInfo shippingInfo); + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @param shippingAddress value to be set + */ + + public void setShippingAddress(final Address shippingAddress); + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @param shippingRateInput value to be set + */ + + public void setShippingRateInput(final ShippingRateInput shippingRateInput); + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingCustomFields value to be set + */ + + public void setShippingCustomFields(final CustomFields shippingCustomFields); + + /** + * factory method + * @return instance of Shipping + */ + public static Shipping of() { + return new ShippingImpl(); + } + + /** + * factory method to create a shallow copy Shipping + * @param template instance to be copied + * @return copy instance + */ + public static Shipping of(final Shipping template) { + ShippingImpl instance = new ShippingImpl(); + instance.setShippingKey(template.getShippingKey()); + instance.setShippingInfo(template.getShippingInfo()); + instance.setShippingAddress(template.getShippingAddress()); + instance.setShippingRateInput(template.getShippingRateInput()); + instance.setShippingCustomFields(template.getShippingCustomFields()); + return instance; + } + + public Shipping copyDeep(); + + /** + * factory method to create a deep copy of Shipping + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static Shipping deepCopy(@Nullable final Shipping template) { + if (template == null) { + return null; + } + ShippingImpl instance = new ShippingImpl(); + instance.setShippingKey(template.getShippingKey()); + instance.setShippingInfo( + com.commercetools.history.models.common.ShippingInfo.deepCopy(template.getShippingInfo())); + instance.setShippingAddress( + com.commercetools.history.models.common.Address.deepCopy(template.getShippingAddress())); + instance.setShippingRateInput( + com.commercetools.history.models.common.ShippingRateInput.deepCopy(template.getShippingRateInput())); + instance.setShippingCustomFields( + com.commercetools.history.models.common.CustomFields.deepCopy(template.getShippingCustomFields())); + return instance; + } + + /** + * builder factory method for Shipping + * @return builder + */ + public static ShippingBuilder builder() { + return ShippingBuilder.of(); + } + + /** + * create builder for Shipping instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingBuilder builder(final Shipping template) { + return ShippingBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShipping(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/ShippingBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingBuilder.java new file mode 100644 index 00000000000..7ee201fb765 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingBuilder.java @@ -0,0 +1,305 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     Shipping shipping = Shipping.builder()
                                                                                                                                                                                              + *             .shippingKey("{shippingKey}")
                                                                                                                                                                                              + *             .shippingInfo(shippingInfoBuilder -> shippingInfoBuilder)
                                                                                                                                                                                              + *             .shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingBuilder implements Builder { + + private String shippingKey; + + private com.commercetools.history.models.common.ShippingInfo shippingInfo; + + private com.commercetools.history.models.common.Address shippingAddress; + + @Nullable + private com.commercetools.history.models.common.ShippingRateInput shippingRateInput; + + @Nullable + private com.commercetools.history.models.common.CustomFields shippingCustomFields; + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingKey value to be set + * @return Builder + */ + + public ShippingBuilder shippingKey(final String shippingKey) { + this.shippingKey = shippingKey; + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @param builder function to build the shippingInfo value + * @return Builder + */ + + public ShippingBuilder shippingInfo( + Function builder) { + this.shippingInfo = builder.apply(com.commercetools.history.models.common.ShippingInfoBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @param builder function to build the shippingInfo value + * @return Builder + */ + + public ShippingBuilder withShippingInfo( + Function builder) { + this.shippingInfo = builder.apply(com.commercetools.history.models.common.ShippingInfoBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @param shippingInfo value to be set + * @return Builder + */ + + public ShippingBuilder shippingInfo(final com.commercetools.history.models.common.ShippingInfo shippingInfo) { + this.shippingInfo = shippingInfo; + return this; + } + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @param builder function to build the shippingAddress value + * @return Builder + */ + + public ShippingBuilder shippingAddress( + Function builder) { + this.shippingAddress = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @param builder function to build the shippingAddress value + * @return Builder + */ + + public ShippingBuilder withShippingAddress( + Function builder) { + this.shippingAddress = builder.apply(com.commercetools.history.models.common.AddressBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @param shippingAddress value to be set + * @return Builder + */ + + public ShippingBuilder shippingAddress(final com.commercetools.history.models.common.Address shippingAddress) { + this.shippingAddress = shippingAddress; + return this; + } + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @param builder function to build the shippingRateInput value + * @return Builder + */ + + public ShippingBuilder shippingRateInput( + Function builder) { + this.shippingRateInput = builder.apply(com.commercetools.history.models.common.ShippingRateInputBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @param builder function to build the shippingRateInput value + * @return Builder + */ + + public ShippingBuilder withShippingRateInput( + Function builder) { + this.shippingRateInput = builder.apply(com.commercetools.history.models.common.ShippingRateInputBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @param shippingRateInput value to be set + * @return Builder + */ + + public ShippingBuilder shippingRateInput( + @Nullable final com.commercetools.history.models.common.ShippingRateInput shippingRateInput) { + this.shippingRateInput = shippingRateInput; + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @param builder function to build the shippingCustomFields value + * @return Builder + */ + + public ShippingBuilder shippingCustomFields( + Function builder) { + this.shippingCustomFields = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @param builder function to build the shippingCustomFields value + * @return Builder + */ + + public ShippingBuilder withShippingCustomFields( + Function builder) { + this.shippingCustomFields = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @param shippingCustomFields value to be set + * @return Builder + */ + + public ShippingBuilder shippingCustomFields( + @Nullable final com.commercetools.history.models.common.CustomFields shippingCustomFields) { + this.shippingCustomFields = shippingCustomFields; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingKey + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + * @return shippingInfo + */ + + public com.commercetools.history.models.common.ShippingInfo getShippingInfo() { + return this.shippingInfo; + } + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + * @return shippingAddress + */ + + public com.commercetools.history.models.common.Address getShippingAddress() { + return this.shippingAddress; + } + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + * @return shippingRateInput + */ + + @Nullable + public com.commercetools.history.models.common.ShippingRateInput getShippingRateInput() { + return this.shippingRateInput; + } + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + * @return shippingCustomFields + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getShippingCustomFields() { + return this.shippingCustomFields; + } + + /** + * builds Shipping with checking for non-null required values + * @return Shipping + */ + public Shipping build() { + Objects.requireNonNull(shippingKey, Shipping.class + ": shippingKey is missing"); + Objects.requireNonNull(shippingInfo, Shipping.class + ": shippingInfo is missing"); + Objects.requireNonNull(shippingAddress, Shipping.class + ": shippingAddress is missing"); + return new ShippingImpl(shippingKey, shippingInfo, shippingAddress, shippingRateInput, shippingCustomFields); + } + + /** + * builds Shipping without checking for non-null required values + * @return Shipping + */ + public Shipping buildUnchecked() { + return new ShippingImpl(shippingKey, shippingInfo, shippingAddress, shippingRateInput, shippingCustomFields); + } + + /** + * factory method for an instance of ShippingBuilder + * @return builder + */ + public static ShippingBuilder of() { + return new ShippingBuilder(); + } + + /** + * create builder for Shipping instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingBuilder of(final Shipping template) { + ShippingBuilder builder = new ShippingBuilder(); + builder.shippingKey = template.getShippingKey(); + builder.shippingInfo = template.getShippingInfo(); + builder.shippingAddress = template.getShippingAddress(); + builder.shippingRateInput = template.getShippingRateInput(); + builder.shippingCustomFields = template.getShippingCustomFields(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingImpl.java new file mode 100644 index 00000000000..5111c462abf --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingImpl.java @@ -0,0 +1,171 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * Shipping + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingImpl implements Shipping, ModelBase { + + private String shippingKey; + + private com.commercetools.history.models.common.ShippingInfo shippingInfo; + + private com.commercetools.history.models.common.Address shippingAddress; + + private com.commercetools.history.models.common.ShippingRateInput shippingRateInput; + + private com.commercetools.history.models.common.CustomFields shippingCustomFields; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingImpl(@JsonProperty("shippingKey") final String shippingKey, + @JsonProperty("shippingInfo") final com.commercetools.history.models.common.ShippingInfo shippingInfo, + @JsonProperty("shippingAddress") final com.commercetools.history.models.common.Address shippingAddress, + @JsonProperty("shippingRateInput") final com.commercetools.history.models.common.ShippingRateInput shippingRateInput, + @JsonProperty("shippingCustomFields") final com.commercetools.history.models.common.CustomFields shippingCustomFields) { + this.shippingKey = shippingKey; + this.shippingInfo = shippingInfo; + this.shippingAddress = shippingAddress; + this.shippingRateInput = shippingRateInput; + this.shippingCustomFields = shippingCustomFields; + } + + /** + * create empty instance + */ + public ShippingImpl() { + } + + /** + *

                                                                                                                                                                                              User-defined unique identifier of the Shipping in a Cart with Multiple ShippingMode.

                                                                                                                                                                                              + */ + + public String getShippingKey() { + return this.shippingKey; + } + + /** + *

                                                                                                                                                                                              Automatically set when the Shipping Method is added.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ShippingInfo getShippingInfo() { + return this.shippingInfo; + } + + /** + *

                                                                                                                                                                                              Determines the shipping rates and Tax Rates of associated Line Items.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.Address getShippingAddress() { + return this.shippingAddress; + } + + /** + *

                                                                                                                                                                                              Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

                                                                                                                                                                                              + * + */ + + public com.commercetools.history.models.common.ShippingRateInput getShippingRateInput() { + return this.shippingRateInput; + } + + /** + *

                                                                                                                                                                                              Custom Fields of Shipping with Multiple ShippingMode.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getShippingCustomFields() { + return this.shippingCustomFields; + } + + public void setShippingKey(final String shippingKey) { + this.shippingKey = shippingKey; + } + + public void setShippingInfo(final com.commercetools.history.models.common.ShippingInfo shippingInfo) { + this.shippingInfo = shippingInfo; + } + + public void setShippingAddress(final com.commercetools.history.models.common.Address shippingAddress) { + this.shippingAddress = shippingAddress; + } + + public void setShippingRateInput( + final com.commercetools.history.models.common.ShippingRateInput shippingRateInput) { + this.shippingRateInput = shippingRateInput; + } + + public void setShippingCustomFields( + final com.commercetools.history.models.common.CustomFields shippingCustomFields) { + this.shippingCustomFields = shippingCustomFields; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingImpl that = (ShippingImpl) o; + + return new EqualsBuilder().append(shippingKey, that.shippingKey) + .append(shippingInfo, that.shippingInfo) + .append(shippingAddress, that.shippingAddress) + .append(shippingRateInput, that.shippingRateInput) + .append(shippingCustomFields, that.shippingCustomFields) + .append(shippingKey, that.shippingKey) + .append(shippingInfo, that.shippingInfo) + .append(shippingAddress, that.shippingAddress) + .append(shippingRateInput, that.shippingRateInput) + .append(shippingCustomFields, that.shippingCustomFields) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(shippingKey) + .append(shippingInfo) + .append(shippingAddress) + .append(shippingRateInput) + .append(shippingCustomFields) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("shippingKey", shippingKey) + .append("shippingInfo", shippingInfo) + .append("shippingAddress", shippingAddress) + .append("shippingRateInput", shippingRateInput) + .append("shippingCustomFields", shippingCustomFields) + .build(); + } + + @Override + public Shipping copyDeep() { + return Shipping.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfo.java new file mode 100644 index 00000000000..61132789e1e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfo.java @@ -0,0 +1,303 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * ShippingInfo + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingInfo shippingInfo = ShippingInfo.builder()
                                                                                                                                                                                              + *             .shippingMethodName("{shippingMethodName}")
                                                                                                                                                                                              + *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              + *             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
                                                                                                                                                                                              + *             .shippingMethodState(ShippingMethodState.DOES_NOT_MATCH_CART)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingInfoImpl.class) +public interface ShippingInfo { + + /** + *

                                                                                                                                                                                              Name of the Shipping Method.

                                                                                                                                                                                              + * @return shippingMethodName + */ + @NotNull + @JsonProperty("shippingMethodName") + public String getShippingMethodName(); + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @return price + */ + @NotNull + @Valid + @JsonProperty("price") + public CentPrecisionMoney getPrice(); + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @return shippingRate + */ + @NotNull + @Valid + @JsonProperty("shippingRate") + public ShippingRate getShippingRate(); + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @return taxedPrice + */ + @Valid + @JsonProperty("taxedPrice") + public TaxedItemPrice getTaxedPrice(); + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return taxRate + */ + @Valid + @JsonProperty("taxRate") + public TaxRate getTaxRate(); + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @return taxCategory + */ + @Valid + @JsonProperty("taxCategory") + public TaxCategoryReference getTaxCategory(); + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @return shippingMethod + */ + @Valid + @JsonProperty("shippingMethod") + public ShippingMethodReference getShippingMethod(); + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @return deliveries + */ + @Valid + @JsonProperty("deliveries") + public List getDeliveries(); + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @return discountedPrice + */ + @Valid + @JsonProperty("discountedPrice") + public DiscountedLineItemPrice getDiscountedPrice(); + + /** + *

                                                                                                                                                                                              Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

                                                                                                                                                                                              + * @return shippingMethodState + */ + @NotNull + @JsonProperty("shippingMethodState") + public ShippingMethodState getShippingMethodState(); + + /** + *

                                                                                                                                                                                              Name of the Shipping Method.

                                                                                                                                                                                              + * @param shippingMethodName value to be set + */ + + public void setShippingMethodName(final String shippingMethodName); + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @param price value to be set + */ + + public void setPrice(final CentPrecisionMoney price); + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @param shippingRate value to be set + */ + + public void setShippingRate(final ShippingRate shippingRate); + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @param taxedPrice value to be set + */ + + public void setTaxedPrice(final TaxedItemPrice taxedPrice); + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param taxRate value to be set + */ + + public void setTaxRate(final TaxRate taxRate); + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param taxCategory value to be set + */ + + public void setTaxCategory(final TaxCategoryReference taxCategory); + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @param shippingMethod value to be set + */ + + public void setShippingMethod(final ShippingMethodReference shippingMethod); + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param deliveries values to be set + */ + + @JsonIgnore + public void setDeliveries(final Delivery... deliveries); + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param deliveries values to be set + */ + + public void setDeliveries(final List deliveries); + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @param discountedPrice value to be set + */ + + public void setDiscountedPrice(final DiscountedLineItemPrice discountedPrice); + + /** + *

                                                                                                                                                                                              Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

                                                                                                                                                                                              + * @param shippingMethodState value to be set + */ + + public void setShippingMethodState(final ShippingMethodState shippingMethodState); + + /** + * factory method + * @return instance of ShippingInfo + */ + public static ShippingInfo of() { + return new ShippingInfoImpl(); + } + + /** + * factory method to create a shallow copy ShippingInfo + * @param template instance to be copied + * @return copy instance + */ + public static ShippingInfo of(final ShippingInfo template) { + ShippingInfoImpl instance = new ShippingInfoImpl(); + instance.setShippingMethodName(template.getShippingMethodName()); + instance.setPrice(template.getPrice()); + instance.setShippingRate(template.getShippingRate()); + instance.setTaxedPrice(template.getTaxedPrice()); + instance.setTaxRate(template.getTaxRate()); + instance.setTaxCategory(template.getTaxCategory()); + instance.setShippingMethod(template.getShippingMethod()); + instance.setDeliveries(template.getDeliveries()); + instance.setDiscountedPrice(template.getDiscountedPrice()); + instance.setShippingMethodState(template.getShippingMethodState()); + return instance; + } + + public ShippingInfo copyDeep(); + + /** + * factory method to create a deep copy of ShippingInfo + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingInfo deepCopy(@Nullable final ShippingInfo template) { + if (template == null) { + return null; + } + ShippingInfoImpl instance = new ShippingInfoImpl(); + instance.setShippingMethodName(template.getShippingMethodName()); + instance.setPrice(com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getPrice())); + instance.setShippingRate( + com.commercetools.history.models.common.ShippingRate.deepCopy(template.getShippingRate())); + instance.setTaxedPrice( + com.commercetools.history.models.common.TaxedItemPrice.deepCopy(template.getTaxedPrice())); + instance.setTaxRate(com.commercetools.history.models.common.TaxRate.deepCopy(template.getTaxRate())); + instance.setTaxCategory( + com.commercetools.history.models.common.TaxCategoryReference.deepCopy(template.getTaxCategory())); + instance.setShippingMethod( + com.commercetools.history.models.common.ShippingMethodReference.deepCopy(template.getShippingMethod())); + instance.setDeliveries(Optional.ofNullable(template.getDeliveries()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.Delivery::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setDiscountedPrice( + com.commercetools.history.models.common.DiscountedLineItemPrice.deepCopy(template.getDiscountedPrice())); + instance.setShippingMethodState(template.getShippingMethodState()); + return instance; + } + + /** + * builder factory method for ShippingInfo + * @return builder + */ + public static ShippingInfoBuilder builder() { + return ShippingInfoBuilder.of(); + } + + /** + * create builder for ShippingInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingInfoBuilder builder(final ShippingInfo template) { + return ShippingInfoBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingInfo(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/ShippingInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfoBuilder.java new file mode 100644 index 00000000000..72dad20f238 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfoBuilder.java @@ -0,0 +1,573 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingInfoBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingInfo shippingInfo = ShippingInfo.builder()
                                                                                                                                                                                              + *             .shippingMethodName("{shippingMethodName}")
                                                                                                                                                                                              + *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              + *             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
                                                                                                                                                                                              + *             .shippingMethodState(ShippingMethodState.DOES_NOT_MATCH_CART)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingInfoBuilder implements Builder { + + private String shippingMethodName; + + private com.commercetools.history.models.common.CentPrecisionMoney price; + + private com.commercetools.history.models.common.ShippingRate shippingRate; + + @Nullable + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + @Nullable + private com.commercetools.history.models.common.TaxRate taxRate; + + @Nullable + private com.commercetools.history.models.common.TaxCategoryReference taxCategory; + + @Nullable + private com.commercetools.history.models.common.ShippingMethodReference shippingMethod; + + @Nullable + private java.util.List deliveries; + + @Nullable + private com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice; + + private com.commercetools.history.models.common.ShippingMethodState shippingMethodState; + + /** + *

                                                                                                                                                                                              Name of the Shipping Method.

                                                                                                                                                                                              + * @param shippingMethodName value to be set + * @return Builder + */ + + public ShippingInfoBuilder shippingMethodName(final String shippingMethodName) { + this.shippingMethodName = shippingMethodName; + return this; + } + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public ShippingInfoBuilder price( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @param builder function to build the price value + * @return Builder + */ + + public ShippingInfoBuilder withPrice( + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @param price value to be set + * @return Builder + */ + + public ShippingInfoBuilder price(final com.commercetools.history.models.common.CentPrecisionMoney price) { + this.price = price; + return this; + } + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @param builder function to build the shippingRate value + * @return Builder + */ + + public ShippingInfoBuilder shippingRate( + Function builder) { + this.shippingRate = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @param builder function to build the shippingRate value + * @return Builder + */ + + public ShippingInfoBuilder withShippingRate( + Function builder) { + this.shippingRate = builder.apply(com.commercetools.history.models.common.ShippingRateBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @param shippingRate value to be set + * @return Builder + */ + + public ShippingInfoBuilder shippingRate(final com.commercetools.history.models.common.ShippingRate shippingRate) { + this.shippingRate = shippingRate; + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder + */ + + public ShippingInfoBuilder taxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @param builder function to build the taxedPrice value + * @return Builder + */ + + public ShippingInfoBuilder withTaxedPrice( + Function builder) { + this.taxedPrice = builder.apply(com.commercetools.history.models.common.TaxedItemPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @param taxedPrice value to be set + * @return Builder + */ + + public ShippingInfoBuilder taxedPrice( + @Nullable final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public ShippingInfoBuilder taxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param builder function to build the taxRate value + * @return Builder + */ + + public ShippingInfoBuilder withTaxRate( + Function builder) { + this.taxRate = builder.apply(com.commercetools.history.models.common.TaxRateBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param taxRate value to be set + * @return Builder + */ + + public ShippingInfoBuilder taxRate(@Nullable final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param builder function to build the taxCategory value + * @return Builder + */ + + public ShippingInfoBuilder taxCategory( + Function builder) { + this.taxCategory = builder.apply(com.commercetools.history.models.common.TaxCategoryReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param builder function to build the taxCategory value + * @return Builder + */ + + public ShippingInfoBuilder withTaxCategory( + Function builder) { + this.taxCategory = builder.apply(com.commercetools.history.models.common.TaxCategoryReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @param taxCategory value to be set + * @return Builder + */ + + public ShippingInfoBuilder taxCategory( + @Nullable final com.commercetools.history.models.common.TaxCategoryReference taxCategory) { + this.taxCategory = taxCategory; + return this; + } + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @param builder function to build the shippingMethod value + * @return Builder + */ + + public ShippingInfoBuilder shippingMethod( + Function builder) { + this.shippingMethod = builder.apply(com.commercetools.history.models.common.ShippingMethodReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @param builder function to build the shippingMethod value + * @return Builder + */ + + public ShippingInfoBuilder withShippingMethod( + Function builder) { + this.shippingMethod = builder + .apply(com.commercetools.history.models.common.ShippingMethodReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @param shippingMethod value to be set + * @return Builder + */ + + public ShippingInfoBuilder shippingMethod( + @Nullable final com.commercetools.history.models.common.ShippingMethodReference shippingMethod) { + this.shippingMethod = shippingMethod; + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param deliveries value to be set + * @return Builder + */ + + public ShippingInfoBuilder deliveries( + @Nullable final com.commercetools.history.models.common.Delivery... deliveries) { + this.deliveries = new ArrayList<>(Arrays.asList(deliveries)); + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param deliveries value to be set + * @return Builder + */ + + public ShippingInfoBuilder deliveries( + @Nullable final java.util.List deliveries) { + this.deliveries = deliveries; + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param deliveries value to be set + * @return Builder + */ + + public ShippingInfoBuilder plusDeliveries( + @Nullable final com.commercetools.history.models.common.Delivery... deliveries) { + if (this.deliveries == null) { + this.deliveries = new ArrayList<>(); + } + this.deliveries.addAll(Arrays.asList(deliveries)); + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param builder function to build the deliveries value + * @return Builder + */ + + public ShippingInfoBuilder plusDeliveries( + Function builder) { + if (this.deliveries == null) { + this.deliveries = new ArrayList<>(); + } + this.deliveries.add(builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param builder function to build the deliveries value + * @return Builder + */ + + public ShippingInfoBuilder withDeliveries( + Function builder) { + this.deliveries = new ArrayList<>(); + this.deliveries.add(builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param builder function to build the deliveries value + * @return Builder + */ + + public ShippingInfoBuilder addDeliveries( + Function builder) { + return plusDeliveries(builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @param builder function to build the deliveries value + * @return Builder + */ + + public ShippingInfoBuilder setDeliveries( + Function builder) { + return deliveries(builder.apply(com.commercetools.history.models.common.DeliveryBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @param builder function to build the discountedPrice value + * @return Builder + */ + + public ShippingInfoBuilder discountedPrice( + Function builder) { + this.discountedPrice = builder + .apply(com.commercetools.history.models.common.DiscountedLineItemPriceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @param builder function to build the discountedPrice value + * @return Builder + */ + + public ShippingInfoBuilder withDiscountedPrice( + Function builder) { + this.discountedPrice = builder + .apply(com.commercetools.history.models.common.DiscountedLineItemPriceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @param discountedPrice value to be set + * @return Builder + */ + + public ShippingInfoBuilder discountedPrice( + @Nullable final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice) { + this.discountedPrice = discountedPrice; + return this; + } + + /** + *

                                                                                                                                                                                              Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

                                                                                                                                                                                              + * @param shippingMethodState value to be set + * @return Builder + */ + + public ShippingInfoBuilder shippingMethodState( + final com.commercetools.history.models.common.ShippingMethodState shippingMethodState) { + this.shippingMethodState = shippingMethodState; + return this; + } + + /** + *

                                                                                                                                                                                              Name of the Shipping Method.

                                                                                                                                                                                              + * @return shippingMethodName + */ + + public String getShippingMethodName() { + return this.shippingMethodName; + } + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + * @return price + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + * @return shippingRate + */ + + public com.commercetools.history.models.common.ShippingRate getShippingRate() { + return this.shippingRate; + } + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + * @return taxedPrice + */ + + @Nullable + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; + } + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return taxRate + */ + + @Nullable + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + * @return taxCategory + */ + + @Nullable + public com.commercetools.history.models.common.TaxCategoryReference getTaxCategory() { + return this.taxCategory; + } + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + * @return shippingMethod + */ + + @Nullable + public com.commercetools.history.models.common.ShippingMethodReference getShippingMethod() { + return this.shippingMethod; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + * @return deliveries + */ + + @Nullable + public java.util.List getDeliveries() { + return this.deliveries; + } + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + * @return discountedPrice + */ + + @Nullable + public com.commercetools.history.models.common.DiscountedLineItemPrice getDiscountedPrice() { + return this.discountedPrice; + } + + /** + *

                                                                                                                                                                                              Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

                                                                                                                                                                                              + * @return shippingMethodState + */ + + public com.commercetools.history.models.common.ShippingMethodState getShippingMethodState() { + return this.shippingMethodState; + } + + /** + * builds ShippingInfo with checking for non-null required values + * @return ShippingInfo + */ + public ShippingInfo build() { + Objects.requireNonNull(shippingMethodName, ShippingInfo.class + ": shippingMethodName is missing"); + Objects.requireNonNull(price, ShippingInfo.class + ": price is missing"); + Objects.requireNonNull(shippingRate, ShippingInfo.class + ": shippingRate is missing"); + Objects.requireNonNull(shippingMethodState, ShippingInfo.class + ": shippingMethodState is missing"); + return new ShippingInfoImpl(shippingMethodName, price, shippingRate, taxedPrice, taxRate, taxCategory, + shippingMethod, deliveries, discountedPrice, shippingMethodState); + } + + /** + * builds ShippingInfo without checking for non-null required values + * @return ShippingInfo + */ + public ShippingInfo buildUnchecked() { + return new ShippingInfoImpl(shippingMethodName, price, shippingRate, taxedPrice, taxRate, taxCategory, + shippingMethod, deliveries, discountedPrice, shippingMethodState); + } + + /** + * factory method for an instance of ShippingInfoBuilder + * @return builder + */ + public static ShippingInfoBuilder of() { + return new ShippingInfoBuilder(); + } + + /** + * create builder for ShippingInfo instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingInfoBuilder of(final ShippingInfo template) { + ShippingInfoBuilder builder = new ShippingInfoBuilder(); + builder.shippingMethodName = template.getShippingMethodName(); + builder.price = template.getPrice(); + builder.shippingRate = template.getShippingRate(); + builder.taxedPrice = template.getTaxedPrice(); + builder.taxRate = template.getTaxRate(); + builder.taxCategory = template.getTaxCategory(); + builder.shippingMethod = template.getShippingMethod(); + builder.deliveries = template.getDeliveries(); + builder.discountedPrice = template.getDiscountedPrice(); + builder.shippingMethodState = template.getShippingMethodState(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfoImpl.java new file mode 100644 index 00000000000..85d1eba586a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingInfoImpl.java @@ -0,0 +1,273 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ShippingInfo + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingInfoImpl implements ShippingInfo, ModelBase { + + private String shippingMethodName; + + private com.commercetools.history.models.common.CentPrecisionMoney price; + + private com.commercetools.history.models.common.ShippingRate shippingRate; + + private com.commercetools.history.models.common.TaxedItemPrice taxedPrice; + + private com.commercetools.history.models.common.TaxRate taxRate; + + private com.commercetools.history.models.common.TaxCategoryReference taxCategory; + + private com.commercetools.history.models.common.ShippingMethodReference shippingMethod; + + private java.util.List deliveries; + + private com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice; + + private com.commercetools.history.models.common.ShippingMethodState shippingMethodState; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingInfoImpl(@JsonProperty("shippingMethodName") final String shippingMethodName, + @JsonProperty("price") final com.commercetools.history.models.common.CentPrecisionMoney price, + @JsonProperty("shippingRate") final com.commercetools.history.models.common.ShippingRate shippingRate, + @JsonProperty("taxedPrice") final com.commercetools.history.models.common.TaxedItemPrice taxedPrice, + @JsonProperty("taxRate") final com.commercetools.history.models.common.TaxRate taxRate, + @JsonProperty("taxCategory") final com.commercetools.history.models.common.TaxCategoryReference taxCategory, + @JsonProperty("shippingMethod") final com.commercetools.history.models.common.ShippingMethodReference shippingMethod, + @JsonProperty("deliveries") final java.util.List deliveries, + @JsonProperty("discountedPrice") final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice, + @JsonProperty("shippingMethodState") final com.commercetools.history.models.common.ShippingMethodState shippingMethodState) { + this.shippingMethodName = shippingMethodName; + this.price = price; + this.shippingRate = shippingRate; + this.taxedPrice = taxedPrice; + this.taxRate = taxRate; + this.taxCategory = taxCategory; + this.shippingMethod = shippingMethod; + this.deliveries = deliveries; + this.discountedPrice = discountedPrice; + this.shippingMethodState = shippingMethodState; + } + + /** + * create empty instance + */ + public ShippingInfoImpl() { + } + + /** + *

                                                                                                                                                                                              Name of the Shipping Method.

                                                                                                                                                                                              + */ + + public String getShippingMethodName() { + return this.shippingMethodName; + } + + /** + *

                                                                                                                                                                                              Determined based on the ShippingRate and its tiered prices, and either the sum of LineItem prices or the shippingRateInput field.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getPrice() { + return this.price; + } + + /** + *

                                                                                                                                                                                              Used to determine the price.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ShippingRate getShippingRate() { + return this.shippingRate; + } + + /** + *

                                                                                                                                                                                              Automatically set after the taxRate is set.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxedItemPrice getTaxedPrice() { + return this.taxedPrice; + } + + /** + *

                                                                                                                                                                                              Automatically set in the Platform TaxMode after the shipping address is set.

                                                                                                                                                                                              + *

                                                                                                                                                                                              For the External TaxMode the Tax Rate must be set explicitly with the ExternalTaxRateDraft.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxRate getTaxRate() { + return this.taxRate; + } + + /** + *

                                                                                                                                                                                              Used to select a Tax Rate when a Cart has the Platform TaxMode.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.TaxCategoryReference getTaxCategory() { + return this.taxCategory; + } + + /** + *

                                                                                                                                                                                              Not set if a custom Shipping Method is used.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ShippingMethodReference getShippingMethod() { + return this.shippingMethod; + } + + /** + *

                                                                                                                                                                                              Information on how items are delivered to customers.

                                                                                                                                                                                              + */ + + public java.util.List getDeliveries() { + return this.deliveries; + } + + /** + *

                                                                                                                                                                                              Discounted price of the Shipping Method.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.DiscountedLineItemPrice getDiscountedPrice() { + return this.discountedPrice; + } + + /** + *

                                                                                                                                                                                              Indicates whether the ShippingMethod referenced in this ShippingInfo is allowed for the Cart.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ShippingMethodState getShippingMethodState() { + return this.shippingMethodState; + } + + public void setShippingMethodName(final String shippingMethodName) { + this.shippingMethodName = shippingMethodName; + } + + public void setPrice(final com.commercetools.history.models.common.CentPrecisionMoney price) { + this.price = price; + } + + public void setShippingRate(final com.commercetools.history.models.common.ShippingRate shippingRate) { + this.shippingRate = shippingRate; + } + + public void setTaxedPrice(final com.commercetools.history.models.common.TaxedItemPrice taxedPrice) { + this.taxedPrice = taxedPrice; + } + + public void setTaxRate(final com.commercetools.history.models.common.TaxRate taxRate) { + this.taxRate = taxRate; + } + + public void setTaxCategory(final com.commercetools.history.models.common.TaxCategoryReference taxCategory) { + this.taxCategory = taxCategory; + } + + public void setShippingMethod( + final com.commercetools.history.models.common.ShippingMethodReference shippingMethod) { + this.shippingMethod = shippingMethod; + } + + public void setDeliveries(final com.commercetools.history.models.common.Delivery... deliveries) { + this.deliveries = new ArrayList<>(Arrays.asList(deliveries)); + } + + public void setDeliveries(final java.util.List deliveries) { + this.deliveries = deliveries; + } + + public void setDiscountedPrice( + final com.commercetools.history.models.common.DiscountedLineItemPrice discountedPrice) { + this.discountedPrice = discountedPrice; + } + + public void setShippingMethodState( + final com.commercetools.history.models.common.ShippingMethodState shippingMethodState) { + this.shippingMethodState = shippingMethodState; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingInfoImpl that = (ShippingInfoImpl) o; + + return new EqualsBuilder().append(shippingMethodName, that.shippingMethodName) + .append(price, that.price) + .append(shippingRate, that.shippingRate) + .append(taxedPrice, that.taxedPrice) + .append(taxRate, that.taxRate) + .append(taxCategory, that.taxCategory) + .append(shippingMethod, that.shippingMethod) + .append(deliveries, that.deliveries) + .append(discountedPrice, that.discountedPrice) + .append(shippingMethodState, that.shippingMethodState) + .append(shippingMethodName, that.shippingMethodName) + .append(price, that.price) + .append(shippingRate, that.shippingRate) + .append(taxedPrice, that.taxedPrice) + .append(taxRate, that.taxRate) + .append(taxCategory, that.taxCategory) + .append(shippingMethod, that.shippingMethod) + .append(deliveries, that.deliveries) + .append(discountedPrice, that.discountedPrice) + .append(shippingMethodState, that.shippingMethodState) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(shippingMethodName) + .append(price) + .append(shippingRate) + .append(taxedPrice) + .append(taxRate) + .append(taxCategory) + .append(shippingMethod) + .append(deliveries) + .append(discountedPrice) + .append(shippingMethodState) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) + .append("shippingMethodName", shippingMethodName) + .append("price", price) + .append("shippingRate", shippingRate) + .append("taxedPrice", taxedPrice) + .append("taxRate", taxRate) + .append("taxCategory", taxCategory) + .append("shippingMethod", shippingMethod) + .append("deliveries", deliveries) + .append("discountedPrice", discountedPrice) + .append("shippingMethodState", shippingMethodState) + .build(); + } + + @Override + public ShippingInfo copyDeep() { + return ShippingInfo.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReference.java new file mode 100644 index 00000000000..3c343eed709 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a ShippingMethod.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingMethodReference shippingMethodReference = ShippingMethodReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("shipping-method") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingMethodReferenceImpl.class) +public interface ShippingMethodReference extends Reference { + + /** + * discriminator value for ShippingMethodReference + */ + String SHIPPING_METHOD = "shipping-method"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ShippingMethod.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ShippingMethod.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of ShippingMethodReference + */ + public static ShippingMethodReference of() { + return new ShippingMethodReferenceImpl(); + } + + /** + * factory method to create a shallow copy ShippingMethodReference + * @param template instance to be copied + * @return copy instance + */ + public static ShippingMethodReference of(final ShippingMethodReference template) { + ShippingMethodReferenceImpl instance = new ShippingMethodReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public ShippingMethodReference copyDeep(); + + /** + * factory method to create a deep copy of ShippingMethodReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingMethodReference deepCopy(@Nullable final ShippingMethodReference template) { + if (template == null) { + return null; + } + ShippingMethodReferenceImpl instance = new ShippingMethodReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for ShippingMethodReference + * @return builder + */ + public static ShippingMethodReferenceBuilder builder() { + return ShippingMethodReferenceBuilder.of(); + } + + /** + * create builder for ShippingMethodReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodReferenceBuilder builder(final ShippingMethodReference template) { + return ShippingMethodReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingMethodReference(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/ShippingMethodReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceBuilder.java new file mode 100644 index 00000000000..16d9095914c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingMethodReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingMethodReference shippingMethodReference = ShippingMethodReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ShippingMethod.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ShippingMethodReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ShippingMethod.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds ShippingMethodReference with checking for non-null required values + * @return ShippingMethodReference + */ + public ShippingMethodReference build() { + Objects.requireNonNull(id, ShippingMethodReference.class + ": id is missing"); + return new ShippingMethodReferenceImpl(id); + } + + /** + * builds ShippingMethodReference without checking for non-null required values + * @return ShippingMethodReference + */ + public ShippingMethodReference buildUnchecked() { + return new ShippingMethodReferenceImpl(id); + } + + /** + * factory method for an instance of ShippingMethodReferenceBuilder + * @return builder + */ + public static ShippingMethodReferenceBuilder of() { + return new ShippingMethodReferenceBuilder(); + } + + /** + * create builder for ShippingMethodReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingMethodReferenceBuilder of(final ShippingMethodReference template) { + ShippingMethodReferenceBuilder builder = new ShippingMethodReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceImpl.java new file mode 100644 index 00000000000..0fa1e41b73d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a ShippingMethod.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingMethodReferenceImpl implements ShippingMethodReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingMethodReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("shipping-method"); + } + + /** + * create empty instance + */ + public ShippingMethodReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("shipping-method"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced ShippingMethod.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingMethodReferenceImpl that = (ShippingMethodReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public ShippingMethodReference copyDeep() { + return ShippingMethodReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodState.java new file mode 100644 index 00000000000..53c6c74f322 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingMethodState.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 the selected ShippingMethod is allowed for the Cart. For more information, see Predicates.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface ShippingMethodState extends JsonEnum { + + ShippingMethodState DOES_NOT_MATCH_CART = ShippingMethodStateEnum.DOES_NOT_MATCH_CART; + + ShippingMethodState MATCHES_CART = ShippingMethodStateEnum.MATCHES_CART; + + /** + * possible values of ShippingMethodState + */ + enum ShippingMethodStateEnum implements ShippingMethodState { + /** + * DoesNotMatchCart + */ + DOES_NOT_MATCH_CART("DoesNotMatchCart"), + + /** + * MatchesCart + */ + MATCHES_CART("MatchesCart"); + private final String jsonName; + + private ShippingMethodStateEnum(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 ShippingMethodState + * 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 ShippingMethodState findEnum(String value) { + return findEnumViaJsonName(value).orElse(new ShippingMethodState() { + @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 ShippingMethodState[] values() { + return ShippingMethodStateEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRate.java index b3b073b3ad3..57c494c4b95 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRate.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRate.java @@ -25,8 +25,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ShippingRate shippingRate = ShippingRate.builder()
                                                                                                                                                                                                *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              - *             .freeAbove(freeAboveBuilder -> freeAboveBuilder)
                                                                                                                                                                                              - *             .isMatching(true)
                                                                                                                                                                                                *             .plusTiers(tiersBuilder -> tiersBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -37,33 +35,32 @@ public interface ShippingRate { /** - * + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @return price */ @NotNull @Valid @JsonProperty("price") - public Money getPrice(); + public CentPrecisionMoney getPrice(); /** - * + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @return freeAbove */ - @NotNull @Valid @JsonProperty("freeAbove") - public Money getFreeAbove(); + public CentPrecisionMoney getFreeAbove(); /** - *

                                                                                                                                                                                              Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

                                                                                                                                                                                              + *

                                                                                                                                                                                              true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

                                                                                                                                                                                              * @return isMatching */ - @NotNull + @JsonProperty("isMatching") public Boolean getIsMatching(); /** - * + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @return tiers */ @NotNull @@ -72,28 +69,28 @@ public interface ShippingRate { public List getTiers(); /** - * set price + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @param price value to be set */ - public void setPrice(final Money price); + public void setPrice(final CentPrecisionMoney price); /** - * set freeAbove + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @param freeAbove value to be set */ - public void setFreeAbove(final Money freeAbove); + public void setFreeAbove(final CentPrecisionMoney freeAbove); /** - *

                                                                                                                                                                                              Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

                                                                                                                                                                                              + *

                                                                                                                                                                                              true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

                                                                                                                                                                                              * @param isMatching value to be set */ public void setIsMatching(final Boolean isMatching); /** - * set tiers + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param tiers values to be set */ @@ -101,7 +98,7 @@ public interface ShippingRate { public void setTiers(final ShippingRatePriceTier... tiers); /** - * set tiers + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param tiers values to be set */ @@ -142,8 +139,9 @@ public static ShippingRate deepCopy(@Nullable final ShippingRate template) { return null; } ShippingRateImpl instance = new ShippingRateImpl(); - instance.setPrice(com.commercetools.history.models.common.Money.deepCopy(template.getPrice())); - instance.setFreeAbove(com.commercetools.history.models.common.Money.deepCopy(template.getFreeAbove())); + instance.setPrice(com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getPrice())); + instance.setFreeAbove( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getFreeAbove())); instance.setIsMatching(template.getIsMatching()); instance.setTiers(Optional.ofNullable(template.getTiers()) .map(t -> t.stream() diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateBuilder.java index e29e46cf896..c46971ab0c5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,8 +17,6 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     ShippingRate shippingRate = ShippingRate.builder()
                                                                                                                                                                                                *             .price(priceBuilder -> priceBuilder)
                                                                                                                                                                                              - *             .freeAbove(freeAboveBuilder -> freeAboveBuilder)
                                                                                                                                                                                              - *             .isMatching(true)
                                                                                                                                                                                                *             .plusTiers(tiersBuilder -> tiersBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -25,97 +25,100 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ShippingRateBuilder implements Builder { - private com.commercetools.history.models.common.Money price; + private com.commercetools.history.models.common.CentPrecisionMoney price; - private com.commercetools.history.models.common.Money freeAbove; + @Nullable + private com.commercetools.history.models.common.CentPrecisionMoney freeAbove; + @Nullable private Boolean isMatching; private java.util.List tiers; /** - * set the value to the price using the builder function + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the price value * @return Builder */ public ShippingRateBuilder price( - Function builder) { - this.price = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the price using the builder function + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the price value * @return Builder */ public ShippingRateBuilder withPrice( - Function builder) { - this.price = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.price = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the price + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @param price value to be set * @return Builder */ - public ShippingRateBuilder price(final com.commercetools.history.models.common.Money price) { + public ShippingRateBuilder price(final com.commercetools.history.models.common.CentPrecisionMoney price) { this.price = price; return this; } /** - * set the value to the freeAbove using the builder function + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @param builder function to build the freeAbove value * @return Builder */ public ShippingRateBuilder freeAbove( - Function builder) { - this.freeAbove = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.freeAbove = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the freeAbove using the builder function + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @param builder function to build the freeAbove value * @return Builder */ public ShippingRateBuilder withFreeAbove( - Function builder) { - this.freeAbove = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.freeAbove = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the freeAbove + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @param freeAbove value to be set * @return Builder */ - public ShippingRateBuilder freeAbove(final com.commercetools.history.models.common.Money freeAbove) { + public ShippingRateBuilder freeAbove( + @Nullable final com.commercetools.history.models.common.CentPrecisionMoney freeAbove) { this.freeAbove = freeAbove; return this; } /** - *

                                                                                                                                                                                              Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

                                                                                                                                                                                              + *

                                                                                                                                                                                              true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

                                                                                                                                                                                              * @param isMatching value to be set * @return Builder */ - public ShippingRateBuilder isMatching(final Boolean isMatching) { + public ShippingRateBuilder isMatching(@Nullable final Boolean isMatching) { this.isMatching = isMatching; return this; } /** - * set values to the tiers + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param tiers value to be set * @return Builder */ @@ -126,7 +129,7 @@ public ShippingRateBuilder tiers(final com.commercetools.history.models.common.S } /** - * set value to the tiers + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param tiers value to be set * @return Builder */ @@ -138,7 +141,7 @@ public ShippingRateBuilder tiers( } /** - * add values to the tiers + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param tiers value to be set * @return Builder */ @@ -152,7 +155,7 @@ public ShippingRateBuilder plusTiers(final com.commercetools.history.models.comm } /** - * add the value to the tiers using the builder function + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the tiers value * @return Builder */ @@ -168,7 +171,7 @@ public ShippingRateBuilder plusTiers( } /** - * set the value to the tiers using the builder function + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the tiers value * @return Builder */ @@ -182,7 +185,7 @@ public ShippingRateBuilder withTiers( } /** - * add the value to the tiers using the builder function + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the tiers value * @return Builder */ @@ -193,7 +196,7 @@ public ShippingRateBuilder addTiers( } /** - * set the value to the tiers using the builder function + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @param builder function to build the tiers value * @return Builder */ @@ -204,34 +207,36 @@ public ShippingRateBuilder setTiers( } /** - * value of price} + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              * @return price */ - public com.commercetools.history.models.common.Money getPrice() { + public com.commercetools.history.models.common.CentPrecisionMoney getPrice() { return this.price; } /** - * value of freeAbove} + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              * @return freeAbove */ - public com.commercetools.history.models.common.Money getFreeAbove() { + @Nullable + public com.commercetools.history.models.common.CentPrecisionMoney getFreeAbove() { return this.freeAbove; } /** - *

                                                                                                                                                                                              Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

                                                                                                                                                                                              + *

                                                                                                                                                                                              true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

                                                                                                                                                                                              * @return isMatching */ + @Nullable public Boolean getIsMatching() { return this.isMatching; } /** - * value of tiers} + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              * @return tiers */ @@ -245,8 +250,6 @@ public java.util.List tiers) { this.price = price; @@ -51,23 +51,23 @@ public ShippingRateImpl() { } /** - * + *

                                                                                                                                                                                              Currency amount of the ShippingRate.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getPrice() { + public com.commercetools.history.models.common.CentPrecisionMoney getPrice() { return this.price; } /** - * + *

                                                                                                                                                                                              Free shipping is applied if the sum of the (Custom) Line Item Prices reaches the specified value.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getFreeAbove() { + public com.commercetools.history.models.common.CentPrecisionMoney getFreeAbove() { return this.freeAbove; } /** - *

                                                                                                                                                                                              Only appears in response to requests for ShippingMethods by Cart or location to mark this shipping rate as one that matches the Cart or location.

                                                                                                                                                                                              + *

                                                                                                                                                                                              true if the ShippingRate matches given Cart or Location. Only appears in response to requests for Get ShippingMethods for a Cart or Get ShippingMethods for a Location.

                                                                                                                                                                                              */ public Boolean getIsMatching() { @@ -75,18 +75,18 @@ public Boolean getIsMatching() { } /** - * + *

                                                                                                                                                                                              Price tiers for the ShippingRate.

                                                                                                                                                                                              */ public java.util.List getTiers() { return this.tiers; } - public void setPrice(final com.commercetools.history.models.common.Money price) { + public void setPrice(final com.commercetools.history.models.common.CentPrecisionMoney price) { this.price = price; } - public void setFreeAbove(final com.commercetools.history.models.common.Money freeAbove) { + public void setFreeAbove(final com.commercetools.history.models.common.CentPrecisionMoney freeAbove) { this.freeAbove = freeAbove; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInput.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInput.java new file mode 100644 index 00000000000..e893af9e213 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInput.java @@ -0,0 +1,124 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * ShippingRateInput + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingRateInput shippingRateInput = ShippingRateInput.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShippingRateInputImpl.class) +public interface ShippingRateInput { + + /** + * + * @return type + */ + @NotNull + @JsonProperty("type") + public String getType(); + + /** + * set type + * @param type value to be set + */ + + public void setType(final String type); + + /** + * factory method + * @return instance of ShippingRateInput + */ + public static ShippingRateInput of() { + return new ShippingRateInputImpl(); + } + + /** + * factory method to create a shallow copy ShippingRateInput + * @param template instance to be copied + * @return copy instance + */ + public static ShippingRateInput of(final ShippingRateInput template) { + ShippingRateInputImpl instance = new ShippingRateInputImpl(); + instance.setType(template.getType()); + return instance; + } + + public ShippingRateInput copyDeep(); + + /** + * factory method to create a deep copy of ShippingRateInput + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShippingRateInput deepCopy(@Nullable final ShippingRateInput template) { + if (template == null) { + return null; + } + ShippingRateInputImpl instance = new ShippingRateInputImpl(); + instance.setType(template.getType()); + return instance; + } + + /** + * builder factory method for ShippingRateInput + * @return builder + */ + public static ShippingRateInputBuilder builder() { + return ShippingRateInputBuilder.of(); + } + + /** + * create builder for ShippingRateInput instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingRateInputBuilder builder(final ShippingRateInput template) { + return ShippingRateInputBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShippingRateInput(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/ShippingRateInputBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInputBuilder.java new file mode 100644 index 00000000000..6484591049b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInputBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShippingRateInputBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShippingRateInput shippingRateInput = ShippingRateInput.builder()
                                                                                                                                                                                              + *             .type("{type}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingRateInputBuilder implements Builder { + + private String type; + + /** + * set the value to the type + * @param type value to be set + * @return Builder + */ + + public ShippingRateInputBuilder type(final String type) { + this.type = type; + return this; + } + + /** + * value of type} + * @return type + */ + + public String getType() { + return this.type; + } + + /** + * builds ShippingRateInput with checking for non-null required values + * @return ShippingRateInput + */ + public ShippingRateInput build() { + Objects.requireNonNull(type, ShippingRateInput.class + ": type is missing"); + return new ShippingRateInputImpl(type); + } + + /** + * builds ShippingRateInput without checking for non-null required values + * @return ShippingRateInput + */ + public ShippingRateInput buildUnchecked() { + return new ShippingRateInputImpl(type); + } + + /** + * factory method for an instance of ShippingRateInputBuilder + * @return builder + */ + public static ShippingRateInputBuilder of() { + return new ShippingRateInputBuilder(); + } + + /** + * create builder for ShippingRateInput instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShippingRateInputBuilder of(final ShippingRateInput template) { + ShippingRateInputBuilder builder = new ShippingRateInputBuilder(); + builder.type = template.getType(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInputImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInputImpl.java new file mode 100644 index 00000000000..dd8493f59b7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShippingRateInputImpl.java @@ -0,0 +1,80 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * ShippingRateInput + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShippingRateInputImpl implements ShippingRateInput, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + ShippingRateInputImpl(@JsonProperty("type") final String type) { + this.type = type; + } + + /** + * create empty instance + */ + public ShippingRateInputImpl() { + } + + /** + * + */ + + public String getType() { + return this.type; + } + + public void setType(final String type) { + this.type = type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShippingRateInputImpl that = (ShippingRateInputImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + + @Override + public ShippingRateInput copyDeep() { + return ShippingRateInput.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItem.java new file mode 100644 index 00000000000..7e8fcfd6fb2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItem.java @@ -0,0 +1,351 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              ShoppingListLineItems are Line Items that contain references to ProductVariants in a Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              In addition to standard Reference Expansion, a ShoppingListLineItem offers expansion on productSlug and variant, defined with the query parameter expand.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShoppingListLineItem shoppingListLineItem = ShoppingListLineItem.builder()
                                                                                                                                                                                              + *             .addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              + *             .productId("{productId}")
                                                                                                                                                                                              + *             .productType(productTypeBuilder -> productTypeBuilder)
                                                                                                                                                                                              + *             .published(true)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ShoppingListLineItemImpl.class) +public interface ShoppingListLineItem { + + /** + *

                                                                                                                                                                                              Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

                                                                                                                                                                                              + * @return addedAt + */ + @NotNull + @JsonProperty("addedAt") + public ZonedDateTime getAddedAt(); + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + + /** + *

                                                                                                                                                                                              If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

                                                                                                                                                                                              + * @return deactivatedAt + */ + + @JsonProperty("deactivatedAt") + public ZonedDateTime getDeactivatedAt(); + + /** + *

                                                                                                                                                                                              Unique identifier of the ShoppingListLineItem.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @return name + */ + @NotNull + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

                                                                                                                                                                                              Unique identifier of a Product.

                                                                                                                                                                                              + * @return productId + */ + @NotNull + @JsonProperty("productId") + public String getProductId(); + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @return productType + */ + @NotNull + @Valid + @JsonProperty("productType") + public ProductTypeReference getProductType(); + + /** + *

                                                                                                                                                                                              Whether the related Product is published or not.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's published status changes.

                                                                                                                                                                                              + * @return published + */ + @NotNull + @JsonProperty("published") + public Boolean getPublished(); + + /** + *

                                                                                                                                                                                              Number of Products in the ShoppingListLineItem.

                                                                                                                                                                                              + * @return quantity + */ + @NotNull + @JsonProperty("quantity") + public Long getQuantity(); + + /** + *

                                                                                                                                                                                              id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

                                                                                                                                                                                              + * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @return variant + */ + @Valid + @JsonProperty("variant") + public ProductVariant getVariant(); + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @return productSlug + */ + @Valid + @JsonProperty("productSlug") + public LocalizedString getProductSlug(); + + /** + *

                                                                                                                                                                                              Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

                                                                                                                                                                                              + * @param addedAt value to be set + */ + + public void setAddedAt(final ZonedDateTime addedAt); + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + + /** + *

                                                                                                                                                                                              If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

                                                                                                                                                                                              + * @param deactivatedAt value to be set + */ + + public void setDeactivatedAt(final ZonedDateTime deactivatedAt); + + /** + *

                                                                                                                                                                                              Unique identifier of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + *

                                                                                                                                                                                              User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + *

                                                                                                                                                                                              Unique identifier of a Product.

                                                                                                                                                                                              + * @param productId value to be set + */ + + public void setProductId(final String productId); + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @param productType value to be set + */ + + public void setProductType(final ProductTypeReference productType); + + /** + *

                                                                                                                                                                                              Whether the related Product is published or not.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's published status changes.

                                                                                                                                                                                              + * @param published value to be set + */ + + public void setPublished(final Boolean published); + + /** + *

                                                                                                                                                                                              Number of Products in the ShoppingListLineItem.

                                                                                                                                                                                              + * @param quantity value to be set + */ + + public void setQuantity(final Long quantity); + + /** + *

                                                                                                                                                                                              id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

                                                                                                                                                                                              + * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param variant value to be set + */ + + public void setVariant(final ProductVariant variant); + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param productSlug value to be set + */ + + public void setProductSlug(final LocalizedString productSlug); + + /** + * factory method + * @return instance of ShoppingListLineItem + */ + public static ShoppingListLineItem of() { + return new ShoppingListLineItemImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListLineItem + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListLineItem of(final ShoppingListLineItem template) { + ShoppingListLineItemImpl instance = new ShoppingListLineItemImpl(); + instance.setAddedAt(template.getAddedAt()); + instance.setCustom(template.getCustom()); + instance.setDeactivatedAt(template.getDeactivatedAt()); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setProductId(template.getProductId()); + instance.setProductType(template.getProductType()); + instance.setPublished(template.getPublished()); + instance.setQuantity(template.getQuantity()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(template.getVariant()); + instance.setProductSlug(template.getProductSlug()); + return instance; + } + + public ShoppingListLineItem copyDeep(); + + /** + * factory method to create a deep copy of ShoppingListLineItem + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListLineItem deepCopy(@Nullable final ShoppingListLineItem template) { + if (template == null) { + return null; + } + ShoppingListLineItemImpl instance = new ShoppingListLineItemImpl(); + instance.setAddedAt(template.getAddedAt()); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); + instance.setDeactivatedAt(template.getDeactivatedAt()); + instance.setId(template.getId()); + instance.setKey(template.getKey()); + instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); + instance.setProductId(template.getProductId()); + instance.setProductType( + com.commercetools.history.models.common.ProductTypeReference.deepCopy(template.getProductType())); + instance.setPublished(template.getPublished()); + instance.setQuantity(template.getQuantity()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(com.commercetools.history.models.common.ProductVariant.deepCopy(template.getVariant())); + instance.setProductSlug( + com.commercetools.history.models.common.LocalizedString.deepCopy(template.getProductSlug())); + return instance; + } + + /** + * builder factory method for ShoppingListLineItem + * @return builder + */ + public static ShoppingListLineItemBuilder builder() { + return ShoppingListLineItemBuilder.of(); + } + + /** + * create builder for ShoppingListLineItem instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemBuilder builder(final ShoppingListLineItem template) { + return ShoppingListLineItemBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withShoppingListLineItem(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/ShoppingListLineItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItemBuilder.java new file mode 100644 index 00000000000..f0eb6c64984 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItemBuilder.java @@ -0,0 +1,528 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ShoppingListLineItemBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     ShoppingListLineItem shoppingListLineItem = ShoppingListLineItem.builder()
                                                                                                                                                                                              + *             .addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              + *             .productId("{productId}")
                                                                                                                                                                                              + *             .productType(productTypeBuilder -> productTypeBuilder)
                                                                                                                                                                                              + *             .published(true)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemBuilder implements Builder { + + private java.time.ZonedDateTime addedAt; + + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + + @Nullable + private java.time.ZonedDateTime deactivatedAt; + + private String id; + + @Nullable + private String key; + + private com.commercetools.history.models.common.LocalizedString name; + + private String productId; + + private com.commercetools.history.models.common.ProductTypeReference productType; + + private Boolean published; + + private Long quantity; + + @Nullable + private Long variantId; + + @Nullable + private com.commercetools.history.models.common.ProductVariant variant; + + @Nullable + private com.commercetools.history.models.common.LocalizedString productSlug; + + /** + *

                                                                                                                                                                                              Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

                                                                                                                                                                                              + * @param addedAt value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder addedAt(final java.time.ZonedDateTime addedAt) { + this.addedAt = addedAt; + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ShoppingListLineItemBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public ShoppingListLineItemBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder custom( + @Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + + /** + *

                                                                                                                                                                                              If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

                                                                                                                                                                                              + * @param deactivatedAt value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder deactivatedAt(@Nullable final java.time.ZonedDateTime deactivatedAt) { + this.deactivatedAt = deactivatedAt; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the ShoppingListLineItem.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @param builder function to build the name value + * @return Builder + */ + + public ShoppingListLineItemBuilder name( + Function builder) { + this.name = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @param builder function to build the name value + * @return Builder + */ + + public ShoppingListLineItemBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @param name value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder name(final com.commercetools.history.models.common.LocalizedString name) { + this.name = name; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of a Product.

                                                                                                                                                                                              + * @param productId value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder productId(final String productId) { + this.productId = productId; + return this; + } + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @param builder function to build the productType value + * @return Builder + */ + + public ShoppingListLineItemBuilder productType( + Function builder) { + this.productType = builder.apply(com.commercetools.history.models.common.ProductTypeReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @param builder function to build the productType value + * @return Builder + */ + + public ShoppingListLineItemBuilder withProductType( + Function builder) { + this.productType = builder.apply(com.commercetools.history.models.common.ProductTypeReferenceBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @param productType value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder productType( + final com.commercetools.history.models.common.ProductTypeReference productType) { + this.productType = productType; + return this; + } + + /** + *

                                                                                                                                                                                              Whether the related Product is published or not.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's published status changes.

                                                                                                                                                                                              + * @param published value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder published(final Boolean published) { + this.published = published; + return this; + } + + /** + *

                                                                                                                                                                                              Number of Products in the ShoppingListLineItem.

                                                                                                                                                                                              + * @param quantity value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder quantity(final Long quantity) { + this.quantity = quantity; + return this; + } + + /** + *

                                                                                                                                                                                              id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

                                                                                                                                                                                              + * @param variantId value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder variantId(@Nullable final Long variantId) { + this.variantId = variantId; + return this; + } + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param builder function to build the variant value + * @return Builder + */ + + public ShoppingListLineItemBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.history.models.common.ProductVariantBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param builder function to build the variant value + * @return Builder + */ + + public ShoppingListLineItemBuilder withVariant( + Function builder) { + this.variant = builder.apply(com.commercetools.history.models.common.ProductVariantBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param variant value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder variant( + @Nullable final com.commercetools.history.models.common.ProductVariant variant) { + this.variant = variant; + return this; + } + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param builder function to build the productSlug value + * @return Builder + */ + + public ShoppingListLineItemBuilder productSlug( + Function builder) { + this.productSlug = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param builder function to build the productSlug value + * @return Builder + */ + + public ShoppingListLineItemBuilder withProductSlug( + Function builder) { + this.productSlug = builder.apply(com.commercetools.history.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @param productSlug value to be set + * @return Builder + */ + + public ShoppingListLineItemBuilder productSlug( + @Nullable final com.commercetools.history.models.common.LocalizedString productSlug) { + this.productSlug = productSlug; + return this; + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

                                                                                                                                                                                              + * @return addedAt + */ + + public java.time.ZonedDateTime getAddedAt() { + return this.addedAt; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

                                                                                                                                                                                              + * @return deactivatedAt + */ + + @Nullable + public java.time.ZonedDateTime getDeactivatedAt() { + return this.deactivatedAt; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the ShoppingListLineItem.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + * @return name + */ + + public com.commercetools.history.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

                                                                                                                                                                                              Unique identifier of a Product.

                                                                                                                                                                                              + * @return productId + */ + + public String getProductId() { + return this.productId; + } + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + * @return productType + */ + + public com.commercetools.history.models.common.ProductTypeReference getProductType() { + return this.productType; + } + + /** + *

                                                                                                                                                                                              Whether the related Product is published or not.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's published status changes.

                                                                                                                                                                                              + * @return published + */ + + public Boolean getPublished() { + return this.published; + } + + /** + *

                                                                                                                                                                                              Number of Products in the ShoppingListLineItem.

                                                                                                                                                                                              + * @return quantity + */ + + public Long getQuantity() { + return this.quantity; + } + + /** + *

                                                                                                                                                                                              id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

                                                                                                                                                                                              + * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @return variant + */ + + @Nullable + public com.commercetools.history.models.common.ProductVariant getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + * @return productSlug + */ + + @Nullable + public com.commercetools.history.models.common.LocalizedString getProductSlug() { + return this.productSlug; + } + + /** + * builds ShoppingListLineItem with checking for non-null required values + * @return ShoppingListLineItem + */ + public ShoppingListLineItem build() { + Objects.requireNonNull(addedAt, ShoppingListLineItem.class + ": addedAt is missing"); + Objects.requireNonNull(id, ShoppingListLineItem.class + ": id is missing"); + Objects.requireNonNull(name, ShoppingListLineItem.class + ": name is missing"); + Objects.requireNonNull(productId, ShoppingListLineItem.class + ": productId is missing"); + Objects.requireNonNull(productType, ShoppingListLineItem.class + ": productType is missing"); + Objects.requireNonNull(published, ShoppingListLineItem.class + ": published is missing"); + Objects.requireNonNull(quantity, ShoppingListLineItem.class + ": quantity is missing"); + return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType, + published, quantity, variantId, variant, productSlug); + } + + /** + * builds ShoppingListLineItem without checking for non-null required values + * @return ShoppingListLineItem + */ + public ShoppingListLineItem buildUnchecked() { + return new ShoppingListLineItemImpl(addedAt, custom, deactivatedAt, id, key, name, productId, productType, + published, quantity, variantId, variant, productSlug); + } + + /** + * factory method for an instance of ShoppingListLineItemBuilder + * @return builder + */ + public static ShoppingListLineItemBuilder of() { + return new ShoppingListLineItemBuilder(); + } + + /** + * create builder for ShoppingListLineItem instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListLineItemBuilder of(final ShoppingListLineItem template) { + ShoppingListLineItemBuilder builder = new ShoppingListLineItemBuilder(); + builder.addedAt = template.getAddedAt(); + builder.custom = template.getCustom(); + builder.deactivatedAt = template.getDeactivatedAt(); + builder.id = template.getId(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.productId = template.getProductId(); + builder.productType = template.getProductType(); + builder.published = template.getPublished(); + builder.quantity = template.getQuantity(); + builder.variantId = template.getVariantId(); + builder.variant = template.getVariant(); + builder.productSlug = template.getProductSlug(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItemImpl.java new file mode 100644 index 00000000000..c2fcfa7b8a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/ShoppingListLineItemImpl.java @@ -0,0 +1,328 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              ShoppingListLineItems are Line Items that contain references to ProductVariants in a Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              In addition to standard Reference Expansion, a ShoppingListLineItem offers expansion on productSlug and variant, defined with the query parameter expand.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListLineItemImpl implements ShoppingListLineItem, ModelBase { + + private java.time.ZonedDateTime addedAt; + + private com.commercetools.history.models.common.CustomFields custom; + + private java.time.ZonedDateTime deactivatedAt; + + private String id; + + private String key; + + private com.commercetools.history.models.common.LocalizedString name; + + private String productId; + + private com.commercetools.history.models.common.ProductTypeReference productType; + + private Boolean published; + + private Long quantity; + + private Long variantId; + + private com.commercetools.history.models.common.ProductVariant variant; + + private com.commercetools.history.models.common.LocalizedString productSlug; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListLineItemImpl(@JsonProperty("addedAt") final java.time.ZonedDateTime addedAt, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, + @JsonProperty("deactivatedAt") final java.time.ZonedDateTime deactivatedAt, + @JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, + @JsonProperty("productId") final String productId, + @JsonProperty("productType") final com.commercetools.history.models.common.ProductTypeReference productType, + @JsonProperty("published") final Boolean published, @JsonProperty("quantity") final Long quantity, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("variant") final com.commercetools.history.models.common.ProductVariant variant, + @JsonProperty("productSlug") final com.commercetools.history.models.common.LocalizedString productSlug) { + this.addedAt = addedAt; + this.custom = custom; + this.deactivatedAt = deactivatedAt; + this.id = id; + this.key = key; + this.name = name; + this.productId = productId; + this.productType = productType; + this.published = published; + this.quantity = quantity; + this.variantId = variantId; + this.variant = variant; + this.productSlug = productSlug; + } + + /** + * create empty instance + */ + public ShoppingListLineItemImpl() { + } + + /** + *

                                                                                                                                                                                              Date and time (UTC) the ShoppingListLineItem was added to the ShoppingList.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getAddedAt() { + return this.addedAt; + } + + /** + *

                                                                                                                                                                                              Custom Fields of the ShoppingListLineItem.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + + /** + *

                                                                                                                                                                                              If the Product or Product Variant is deleted, deactivatedAt is the date and time (UTC) of deletion.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product Variant cannot be ordered anymore.

                                                                                                                                                                                              + */ + + public java.time.ZonedDateTime getDeactivatedAt() { + return this.deactivatedAt; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the ShoppingListLineItem.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + /** + *

                                                                                                                                                                                              User-defined identifier of the ShoppingListLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the Product.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's name changes.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

                                                                                                                                                                                              Unique identifier of a Product.

                                                                                                                                                                                              + */ + + public String getProductId() { + return this.productId; + } + + /** + *

                                                                                                                                                                                              The Product Type defining the Attributes of the Product.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductTypeReference getProductType() { + return this.productType; + } + + /** + *

                                                                                                                                                                                              Whether the related Product is published or not.

                                                                                                                                                                                              + *

                                                                                                                                                                                              This data is updated in an eventual consistent manner when the Product's published status changes.

                                                                                                                                                                                              + */ + + public Boolean getPublished() { + return this.published; + } + + /** + *

                                                                                                                                                                                              Number of Products in the ShoppingListLineItem.

                                                                                                                                                                                              + */ + + public Long getQuantity() { + return this.quantity; + } + + /** + *

                                                                                                                                                                                              id of the ProductVariant the ShoppingListLineItem refers to. If not set, the ShoppingListLineItem refers to the Master Variant.

                                                                                                                                                                                              + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

                                                                                                                                                                                              Data of the ProductVariant. This data includes all the Product Attributes and Variant Attributes to ensure the full Attribute context of the Product Variant.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].variant. You cannot expand only a single element of the array.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ProductVariant getVariant() { + return this.variant; + } + + /** + *

                                                                                                                                                                                              Slug of the current ProductData.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Returned when expanded using expand=lineItems[*].productSlug. You cannot expand only a single element of the array.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.LocalizedString getProductSlug() { + return this.productSlug; + } + + public void setAddedAt(final java.time.ZonedDateTime addedAt) { + this.addedAt = addedAt; + } + + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + + public void setDeactivatedAt(final java.time.ZonedDateTime deactivatedAt) { + this.deactivatedAt = deactivatedAt; + } + + public void setId(final String id) { + this.id = id; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final com.commercetools.history.models.common.LocalizedString name) { + this.name = name; + } + + public void setProductId(final String productId) { + this.productId = productId; + } + + public void setProductType(final com.commercetools.history.models.common.ProductTypeReference productType) { + this.productType = productType; + } + + public void setPublished(final Boolean published) { + this.published = published; + } + + public void setQuantity(final Long quantity) { + this.quantity = quantity; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setVariant(final com.commercetools.history.models.common.ProductVariant variant) { + this.variant = variant; + } + + public void setProductSlug(final com.commercetools.history.models.common.LocalizedString productSlug) { + this.productSlug = productSlug; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListLineItemImpl that = (ShoppingListLineItemImpl) o; + + return new EqualsBuilder().append(addedAt, that.addedAt) + .append(custom, that.custom) + .append(deactivatedAt, that.deactivatedAt) + .append(id, that.id) + .append(key, that.key) + .append(name, that.name) + .append(productId, that.productId) + .append(productType, that.productType) + .append(published, that.published) + .append(quantity, that.quantity) + .append(variantId, that.variantId) + .append(variant, that.variant) + .append(productSlug, that.productSlug) + .append(addedAt, that.addedAt) + .append(custom, that.custom) + .append(deactivatedAt, that.deactivatedAt) + .append(id, that.id) + .append(key, that.key) + .append(name, that.name) + .append(productId, that.productId) + .append(productType, that.productType) + .append(published, that.published) + .append(quantity, that.quantity) + .append(variantId, that.variantId) + .append(variant, that.variant) + .append(productSlug, that.productSlug) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(addedAt) + .append(custom) + .append(deactivatedAt) + .append(id) + .append(key) + .append(name) + .append(productId) + .append(productType) + .append(published) + .append(quantity) + .append(variantId) + .append(variant) + .append(productSlug) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("addedAt", addedAt) + .append("custom", custom) + .append("deactivatedAt", deactivatedAt) + .append("id", id) + .append("key", key) + .append("name", name) + .append("productId", productId) + .append("productType", productType) + .append("published", published) + .append("quantity", quantity) + .append("variantId", variantId) + .append("variant", variant) + .append("productSlug", productSlug) + .build(); + } + + @Override + public ShoppingListLineItem copyDeep() { + return ShoppingListLineItem.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StackingMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StackingMode.java index a5b84c863cc..4ea2cd00158 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StackingMode.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StackingMode.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * StackingMode + *

                                                                                                                                                                                              Describes how the Cart Discount interacts with other Discounts.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface StackingMode extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StagedQuoteState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StagedQuoteState.java index 37f7b2bcfd3..3dfc4ec4c5c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StagedQuoteState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StagedQuoteState.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * StagedQuoteState + *

                                                                                                                                                                                              Predefined states tracking the status of the Staged Quote.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface StagedQuoteState extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReference.java new file mode 100644 index 00000000000..ecdcf40090a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a State.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     StateReference stateReference = StateReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("state") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = StateReferenceImpl.class) +public interface StateReference extends Reference { + + /** + * discriminator value for StateReference + */ + String STATE = "state"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced State.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced State.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of StateReference + */ + public static StateReference of() { + return new StateReferenceImpl(); + } + + /** + * factory method to create a shallow copy StateReference + * @param template instance to be copied + * @return copy instance + */ + public static StateReference of(final StateReference template) { + StateReferenceImpl instance = new StateReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public StateReference copyDeep(); + + /** + * factory method to create a deep copy of StateReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static StateReference deepCopy(@Nullable final StateReference template) { + if (template == null) { + return null; + } + StateReferenceImpl instance = new StateReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for StateReference + * @return builder + */ + public static StateReferenceBuilder builder() { + return StateReferenceBuilder.of(); + } + + /** + * create builder for StateReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StateReferenceBuilder builder(final StateReference template) { + return StateReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withStateReference(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/StateReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReferenceBuilder.java new file mode 100644 index 00000000000..f7c5ad51ba1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * StateReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     StateReference stateReference = StateReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StateReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced State.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public StateReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced State.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds StateReference with checking for non-null required values + * @return StateReference + */ + public StateReference build() { + Objects.requireNonNull(id, StateReference.class + ": id is missing"); + return new StateReferenceImpl(id); + } + + /** + * builds StateReference without checking for non-null required values + * @return StateReference + */ + public StateReference buildUnchecked() { + return new StateReferenceImpl(id); + } + + /** + * factory method for an instance of StateReferenceBuilder + * @return builder + */ + public static StateReferenceBuilder of() { + return new StateReferenceBuilder(); + } + + /** + * create builder for StateReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StateReferenceBuilder of(final StateReference template) { + StateReferenceBuilder builder = new StateReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReferenceImpl.java new file mode 100644 index 00000000000..c54ff4b4aa6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StateReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a State.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StateReferenceImpl implements StateReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + StateReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("state"); + } + + /** + * create empty instance + */ + public StateReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("state"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced State.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + StateReferenceImpl that = (StateReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public StateReference copyDeep() { + return StateReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReference.java new file mode 100644 index 00000000000..756217a885f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              KeyReference to a Store.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     StoreKeyReference storeKeyReference = StoreKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("store") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = StoreKeyReferenceImpl.class) +public interface StoreKeyReference extends KeyReference { + + /** + * discriminator value for StoreKeyReference + */ + String STORE = "store"; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced Store.

                                                                                                                                                                                              + * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced Store.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of StoreKeyReference + */ + public static StoreKeyReference of() { + return new StoreKeyReferenceImpl(); + } + + /** + * factory method to create a shallow copy StoreKeyReference + * @param template instance to be copied + * @return copy instance + */ + public static StoreKeyReference of(final StoreKeyReference template) { + StoreKeyReferenceImpl instance = new StoreKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + public StoreKeyReference copyDeep(); + + /** + * factory method to create a deep copy of StoreKeyReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static StoreKeyReference deepCopy(@Nullable final StoreKeyReference template) { + if (template == null) { + return null; + } + StoreKeyReferenceImpl instance = new StoreKeyReferenceImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for StoreKeyReference + * @return builder + */ + public static StoreKeyReferenceBuilder builder() { + return StoreKeyReferenceBuilder.of(); + } + + /** + * create builder for StoreKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StoreKeyReferenceBuilder builder(final StoreKeyReference template) { + return StoreKeyReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withStoreKeyReference(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/StoreKeyReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReferenceBuilder.java new file mode 100644 index 00000000000..1ee9de718c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * StoreKeyReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     StoreKeyReference storeKeyReference = StoreKeyReference.builder()
                                                                                                                                                                                              + *             .key("{key}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StoreKeyReferenceBuilder implements Builder { + + private String key; + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced Store.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public StoreKeyReferenceBuilder key(final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced Store.

                                                                                                                                                                                              + * @return key + */ + + public String getKey() { + return this.key; + } + + /** + * builds StoreKeyReference with checking for non-null required values + * @return StoreKeyReference + */ + public StoreKeyReference build() { + Objects.requireNonNull(key, StoreKeyReference.class + ": key is missing"); + return new StoreKeyReferenceImpl(key); + } + + /** + * builds StoreKeyReference without checking for non-null required values + * @return StoreKeyReference + */ + public StoreKeyReference buildUnchecked() { + return new StoreKeyReferenceImpl(key); + } + + /** + * factory method for an instance of StoreKeyReferenceBuilder + * @return builder + */ + public static StoreKeyReferenceBuilder of() { + return new StoreKeyReferenceBuilder(); + } + + /** + * create builder for StoreKeyReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static StoreKeyReferenceBuilder of(final StoreKeyReference template) { + StoreKeyReferenceBuilder builder = new StoreKeyReferenceBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReferenceImpl.java new file mode 100644 index 00000000000..e2c786d4f21 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/StoreKeyReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              KeyReference to a Store.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class StoreKeyReferenceImpl implements StoreKeyReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + StoreKeyReferenceImpl(@JsonProperty("key") final String key) { + this.key = key; + this.typeId = ReferenceTypeId.findEnum("store"); + } + + /** + * create empty instance + */ + public StoreKeyReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("store"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique and immutable key of the referenced Store.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + StoreKeyReferenceImpl that = (StoreKeyReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(key, that.key) + .append(typeId, that.typeId) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("key", key) + .build(); + } + + @Override + public StoreKeyReference copyDeep() { + return StoreKeyReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRate.java index 9f67c7e228b..00cd42f791c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRate.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRate.java @@ -15,7 +15,7 @@ import jakarta.validation.constraints.NotNull; /** - * SubRate + *

                                                                                                                                                                                              It is used to calculate the taxPortions field in a Cart or Order.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -23,7 +23,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SubRate subRate = SubRate.builder()
                                                                                                                                                                                                *             .name("{name}")
                                                                                                                                                                                              - *             .amount(1)
                                                                                                                                                                                              + *             .amount(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -33,7 +33,7 @@ public interface SubRate { /** - * + *

                                                                                                                                                                                              Name of the SubRate.

                                                                                                                                                                                              * @return name */ @NotNull @@ -46,10 +46,10 @@ public interface SubRate { */ @NotNull @JsonProperty("amount") - public Integer getAmount(); + public Double getAmount(); /** - * set name + *

                                                                                                                                                                                              Name of the SubRate.

                                                                                                                                                                                              * @param name value to be set */ @@ -60,7 +60,7 @@ public interface SubRate { * @param amount value to be set */ - public void setAmount(final Integer amount); + public void setAmount(final Double amount); /** * factory method diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateBuilder.java index d934fbfd9b8..380bb5cc617 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateBuilder.java @@ -14,7 +14,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SubRate subRate = SubRate.builder()
                                                                                                                                                                                                *             .name("{name}")
                                                                                                                                                                                              - *             .amount(1)
                                                                                                                                                                                              + *             .amount(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -24,10 +24,10 @@ public class SubRateBuilder implements Builder { private String name; - private Integer amount; + private Double amount; /** - * set the value to the name + *

                                                                                                                                                                                              Name of the SubRate.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -43,13 +43,13 @@ public SubRateBuilder name(final String name) { * @return Builder */ - public SubRateBuilder amount(final Integer amount) { + public SubRateBuilder amount(final Double amount) { this.amount = amount; return this; } /** - * value of name} + *

                                                                                                                                                                                              Name of the SubRate.

                                                                                                                                                                                              * @return name */ @@ -62,7 +62,7 @@ public String getName() { * @return amount */ - public Integer getAmount() { + public Double getAmount() { return this.amount; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateImpl.java index f0efe35b3c8..e9957a1054c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SubRateImpl.java @@ -17,20 +17,20 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * SubRate + *

                                                                                                                                                                                              It is used to calculate the taxPortions field in a Cart or Order.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SubRateImpl implements SubRate, ModelBase { private String name; - private Integer amount; + private Double amount; /** * create instance with all properties */ @JsonCreator - SubRateImpl(@JsonProperty("name") final String name, @JsonProperty("amount") final Integer amount) { + SubRateImpl(@JsonProperty("name") final String name, @JsonProperty("amount") final Double amount) { this.name = name; this.amount = amount; } @@ -42,7 +42,7 @@ public SubRateImpl() { } /** - * + *

                                                                                                                                                                                              Name of the SubRate.

                                                                                                                                                                                              */ public String getName() { @@ -53,7 +53,7 @@ public String getName() { * */ - public Integer getAmount() { + public Double getAmount() { return this.amount; } @@ -61,7 +61,7 @@ public void setName(final String name) { this.name = name; } - public void setAmount(final Integer amount) { + public void setAmount(final Double amount) { this.amount = amount; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfo.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfo.java index 0de0b0d8cb0..b924a021390 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfo.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfo.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; @@ -16,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * SyncInfo + *

                                                                                                                                                                                              Contains synchronization activity information of the Order (like export or import).

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -24,8 +25,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SyncInfo syncInfo = SyncInfo.builder()
                                                                                                                                                                                                *             .channel(channelBuilder -> channelBuilder)
                                                                                                                                                                                              - *             .externalId("{externalId}")
                                                                                                                                                                                              - *             .syncedAt("{syncedAt}")
                                                                                                                                                                                              + *             .syncedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -35,50 +35,50 @@ public interface SyncInfo { /** - * + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @return channel */ @NotNull @Valid @JsonProperty("channel") - public Reference getChannel(); + public ChannelReference getChannel(); /** - *

                                                                                                                                                                                              Can be used to reference an external order instance, file etc.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of an external order instance, file, or other resource.

                                                                                                                                                                                              * @return externalId */ - @NotNull + @JsonProperty("externalId") public String getExternalId(); /** - * + *

                                                                                                                                                                                              Date and time (UTC) the information was synced.

                                                                                                                                                                                              * @return syncedAt */ @NotNull @JsonProperty("syncedAt") - public String getSyncedAt(); + public ZonedDateTime getSyncedAt(); /** - * set channel + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @param channel value to be set */ - public void setChannel(final Reference channel); + public void setChannel(final ChannelReference channel); /** - *

                                                                                                                                                                                              Can be used to reference an external order instance, file etc.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of an external order instance, file, or other resource.

                                                                                                                                                                                              * @param externalId value to be set */ public void setExternalId(final String externalId); /** - * set syncedAt + *

                                                                                                                                                                                              Date and time (UTC) the information was synced.

                                                                                                                                                                                              * @param syncedAt value to be set */ - public void setSyncedAt(final String syncedAt); + public void setSyncedAt(final ZonedDateTime syncedAt); /** * factory method @@ -114,7 +114,7 @@ public static SyncInfo deepCopy(@Nullable final SyncInfo template) { return null; } SyncInfoImpl instance = new SyncInfoImpl(); - instance.setChannel(com.commercetools.history.models.common.Reference.deepCopy(template.getChannel())); + instance.setChannel(com.commercetools.history.models.common.ChannelReference.deepCopy(template.getChannel())); instance.setExternalId(template.getExternalId()); instance.setSyncedAt(template.getSyncedAt()); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoBuilder.java index 78a949e3141..269d6c37e38 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,8 +17,7 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     SyncInfo syncInfo = SyncInfo.builder()
                                                                                                                                                                                                *             .channel(channelBuilder -> channelBuilder)
                                                                                                                                                                                              - *             .externalId("{externalId}")
                                                                                                                                                                                              - *             .syncedAt("{syncedAt}")
                                                                                                                                                                                              + *             .syncedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              * @@ -24,93 +25,95 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SyncInfoBuilder implements Builder { - private com.commercetools.history.models.common.Reference channel; + private com.commercetools.history.models.common.ChannelReference channel; + @Nullable private String externalId; - private String syncedAt; + private java.time.ZonedDateTime syncedAt; /** - * set the value to the channel using the builder function + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @param builder function to build the channel value * @return Builder */ public SyncInfoBuilder channel( - Function builder) { - this.channel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()).build(); return this; } /** - * set the value to the channel using the builder function + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @param builder function to build the channel value * @return Builder */ public SyncInfoBuilder withChannel( - Function builder) { - this.channel = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + Function builder) { + this.channel = builder.apply(com.commercetools.history.models.common.ChannelReferenceBuilder.of()); return this; } /** - * set the value to the channel + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @param channel value to be set * @return Builder */ - public SyncInfoBuilder channel(final com.commercetools.history.models.common.Reference channel) { + public SyncInfoBuilder channel(final com.commercetools.history.models.common.ChannelReference channel) { this.channel = channel; return this; } /** - *

                                                                                                                                                                                              Can be used to reference an external order instance, file etc.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of an external order instance, file, or other resource.

                                                                                                                                                                                              * @param externalId value to be set * @return Builder */ - public SyncInfoBuilder externalId(final String externalId) { + public SyncInfoBuilder externalId(@Nullable final String externalId) { this.externalId = externalId; return this; } /** - * set the value to the syncedAt + *

                                                                                                                                                                                              Date and time (UTC) the information was synced.

                                                                                                                                                                                              * @param syncedAt value to be set * @return Builder */ - public SyncInfoBuilder syncedAt(final String syncedAt) { + public SyncInfoBuilder syncedAt(final java.time.ZonedDateTime syncedAt) { this.syncedAt = syncedAt; return this; } /** - * value of channel} + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              * @return channel */ - public com.commercetools.history.models.common.Reference getChannel() { + public com.commercetools.history.models.common.ChannelReference getChannel() { return this.channel; } /** - *

                                                                                                                                                                                              Can be used to reference an external order instance, file etc.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of an external order instance, file, or other resource.

                                                                                                                                                                                              * @return externalId */ + @Nullable public String getExternalId() { return this.externalId; } /** - * value of syncedAt} + *

                                                                                                                                                                                              Date and time (UTC) the information was synced.

                                                                                                                                                                                              * @return syncedAt */ - public String getSyncedAt() { + public java.time.ZonedDateTime getSyncedAt() { return this.syncedAt; } @@ -120,7 +123,6 @@ public String getSyncedAt() { */ public SyncInfo build() { Objects.requireNonNull(channel, SyncInfo.class + ": channel is missing"); - Objects.requireNonNull(externalId, SyncInfo.class + ": externalId is missing"); Objects.requireNonNull(syncedAt, SyncInfo.class + ": syncedAt is missing"); return new SyncInfoImpl(channel, externalId, syncedAt); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoImpl.java index e99be6d940a..71b65762d16 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/SyncInfoImpl.java @@ -17,23 +17,24 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * SyncInfo + *

                                                                                                                                                                                              Contains synchronization activity information of the Order (like export or import).

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SyncInfoImpl implements SyncInfo, ModelBase { - private com.commercetools.history.models.common.Reference channel; + private com.commercetools.history.models.common.ChannelReference channel; private String externalId; - private String syncedAt; + private java.time.ZonedDateTime syncedAt; /** * create instance with all properties */ @JsonCreator - SyncInfoImpl(@JsonProperty("channel") final com.commercetools.history.models.common.Reference channel, - @JsonProperty("externalId") final String externalId, @JsonProperty("syncedAt") final String syncedAt) { + SyncInfoImpl(@JsonProperty("channel") final com.commercetools.history.models.common.ChannelReference channel, + @JsonProperty("externalId") final String externalId, + @JsonProperty("syncedAt") final java.time.ZonedDateTime syncedAt) { this.channel = channel; this.externalId = externalId; this.syncedAt = syncedAt; @@ -46,15 +47,15 @@ public SyncInfoImpl() { } /** - * + *

                                                                                                                                                                                              Connection to a synchronization destination.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Reference getChannel() { + public com.commercetools.history.models.common.ChannelReference getChannel() { return this.channel; } /** - *

                                                                                                                                                                                              Can be used to reference an external order instance, file etc.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier of an external order instance, file, or other resource.

                                                                                                                                                                                              */ public String getExternalId() { @@ -62,14 +63,14 @@ public String getExternalId() { } /** - * + *

                                                                                                                                                                                              Date and time (UTC) the information was synced.

                                                                                                                                                                                              */ - public String getSyncedAt() { + public java.time.ZonedDateTime getSyncedAt() { return this.syncedAt; } - public void setChannel(final com.commercetools.history.models.common.Reference channel) { + public void setChannel(final com.commercetools.history.models.common.ChannelReference channel) { this.channel = channel; } @@ -77,7 +78,7 @@ public void setExternalId(final String externalId) { this.externalId = externalId; } - public void setSyncedAt(final String syncedAt) { + public void setSyncedAt(final java.time.ZonedDateTime syncedAt) { this.syncedAt = syncedAt; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCalculationMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCalculationMode.java index f70884b36f0..340cd80e236 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCalculationMode.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCalculationMode.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * TaxCalculationMode + *

                                                                                                                                                                                              Determines in which Tax calculation mode taxed prices are calculated.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface TaxCalculationMode extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReference.java new file mode 100644 index 00000000000..4f6bfcf0e4b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a TaxCategory.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TaxCategoryReference taxCategoryReference = TaxCategoryReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("tax-category") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TaxCategoryReferenceImpl.class) +public interface TaxCategoryReference extends Reference { + + /** + * discriminator value for TaxCategoryReference + */ + String TAX_CATEGORY = "tax-category"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced TaxCategory.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced TaxCategory.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of TaxCategoryReference + */ + public static TaxCategoryReference of() { + return new TaxCategoryReferenceImpl(); + } + + /** + * factory method to create a shallow copy TaxCategoryReference + * @param template instance to be copied + * @return copy instance + */ + public static TaxCategoryReference of(final TaxCategoryReference template) { + TaxCategoryReferenceImpl instance = new TaxCategoryReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public TaxCategoryReference copyDeep(); + + /** + * factory method to create a deep copy of TaxCategoryReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TaxCategoryReference deepCopy(@Nullable final TaxCategoryReference template) { + if (template == null) { + return null; + } + TaxCategoryReferenceImpl instance = new TaxCategoryReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for TaxCategoryReference + * @return builder + */ + public static TaxCategoryReferenceBuilder builder() { + return TaxCategoryReferenceBuilder.of(); + } + + /** + * create builder for TaxCategoryReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TaxCategoryReferenceBuilder builder(final TaxCategoryReference template) { + return TaxCategoryReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTaxCategoryReference(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/TaxCategoryReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceBuilder.java new file mode 100644 index 00000000000..9747c67d516 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TaxCategoryReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TaxCategoryReference taxCategoryReference = TaxCategoryReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TaxCategoryReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced TaxCategory.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public TaxCategoryReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced TaxCategory.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds TaxCategoryReference with checking for non-null required values + * @return TaxCategoryReference + */ + public TaxCategoryReference build() { + Objects.requireNonNull(id, TaxCategoryReference.class + ": id is missing"); + return new TaxCategoryReferenceImpl(id); + } + + /** + * builds TaxCategoryReference without checking for non-null required values + * @return TaxCategoryReference + */ + public TaxCategoryReference buildUnchecked() { + return new TaxCategoryReferenceImpl(id); + } + + /** + * factory method for an instance of TaxCategoryReferenceBuilder + * @return builder + */ + public static TaxCategoryReferenceBuilder of() { + return new TaxCategoryReferenceBuilder(); + } + + /** + * create builder for TaxCategoryReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TaxCategoryReferenceBuilder of(final TaxCategoryReference template) { + TaxCategoryReferenceBuilder builder = new TaxCategoryReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceImpl.java new file mode 100644 index 00000000000..9fd428b2f9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a TaxCategory.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TaxCategoryReferenceImpl implements TaxCategoryReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + TaxCategoryReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("tax-category"); + } + + /** + * create empty instance + */ + public TaxCategoryReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("tax-category"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced TaxCategory.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TaxCategoryReferenceImpl that = (TaxCategoryReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public TaxCategoryReference copyDeep() { + return TaxCategoryReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxMode.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxMode.java index 6daf0e0db33..7a75e1dc050 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxMode.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxMode.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * TaxMode + *

                                                                                                                                                                                              Indicates how taxes are set on the Cart.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface TaxMode extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortion.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortion.java new file mode 100644 index 00000000000..91b2e499863 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortion.java @@ -0,0 +1,161 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              The tax portions are calculated from the TaxRates. If a Tax Rate has SubRates, they are used and can be identified by name. Tax portions from Line Items with the same rate and name are accumulated to the same tax portion.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TaxPortion taxPortion = TaxPortion.builder()
                                                                                                                                                                                              + *             .rate(0.3)
                                                                                                                                                                                              + *             .amount(amountBuilder -> amountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TaxPortionImpl.class) +public interface TaxPortion { + + /** + *

                                                                                                                                                                                              Name of the tax portion.

                                                                                                                                                                                              + * @return name + */ + + @JsonProperty("name") + public String getName(); + + /** + *

                                                                                                                                                                                              A number in the range 0-1.

                                                                                                                                                                                              + * @return rate + */ + @NotNull + @JsonProperty("rate") + public Double getRate(); + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @return amount + */ + @NotNull + @Valid + @JsonProperty("amount") + public CentPrecisionMoney getAmount(); + + /** + *

                                                                                                                                                                                              Name of the tax portion.

                                                                                                                                                                                              + * @param name value to be set + */ + + public void setName(final String name); + + /** + *

                                                                                                                                                                                              A number in the range 0-1.

                                                                                                                                                                                              + * @param rate value to be set + */ + + public void setRate(final Double rate); + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @param amount value to be set + */ + + public void setAmount(final CentPrecisionMoney amount); + + /** + * factory method + * @return instance of TaxPortion + */ + public static TaxPortion of() { + return new TaxPortionImpl(); + } + + /** + * factory method to create a shallow copy TaxPortion + * @param template instance to be copied + * @return copy instance + */ + public static TaxPortion of(final TaxPortion template) { + TaxPortionImpl instance = new TaxPortionImpl(); + instance.setName(template.getName()); + instance.setRate(template.getRate()); + instance.setAmount(template.getAmount()); + return instance; + } + + public TaxPortion copyDeep(); + + /** + * factory method to create a deep copy of TaxPortion + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TaxPortion deepCopy(@Nullable final TaxPortion template) { + if (template == null) { + return null; + } + TaxPortionImpl instance = new TaxPortionImpl(); + instance.setName(template.getName()); + instance.setRate(template.getRate()); + instance.setAmount(com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getAmount())); + return instance; + } + + /** + * builder factory method for TaxPortion + * @return builder + */ + public static TaxPortionBuilder builder() { + return TaxPortionBuilder.of(); + } + + /** + * create builder for TaxPortion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TaxPortionBuilder builder(final TaxPortion template) { + return TaxPortionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTaxPortion(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/TaxPortionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortionBuilder.java new file mode 100644 index 00000000000..54d2533193e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortionBuilder.java @@ -0,0 +1,159 @@ + +package com.commercetools.history.models.common; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TaxPortionBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TaxPortion taxPortion = TaxPortion.builder()
                                                                                                                                                                                              + *             .rate(0.3)
                                                                                                                                                                                              + *             .amount(amountBuilder -> amountBuilder)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TaxPortionBuilder implements Builder { + + @Nullable + private String name; + + private Double rate; + + private com.commercetools.history.models.common.CentPrecisionMoney amount; + + /** + *

                                                                                                                                                                                              Name of the tax portion.

                                                                                                                                                                                              + * @param name value to be set + * @return Builder + */ + + public TaxPortionBuilder name(@Nullable final String name) { + this.name = name; + return this; + } + + /** + *

                                                                                                                                                                                              A number in the range 0-1.

                                                                                                                                                                                              + * @param rate value to be set + * @return Builder + */ + + public TaxPortionBuilder rate(final Double rate) { + this.rate = rate; + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @param builder function to build the amount value + * @return Builder + */ + + public TaxPortionBuilder amount( + Function builder) { + this.amount = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @param builder function to build the amount value + * @return Builder + */ + + public TaxPortionBuilder withAmount( + Function builder) { + this.amount = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @param amount value to be set + * @return Builder + */ + + public TaxPortionBuilder amount(final com.commercetools.history.models.common.CentPrecisionMoney amount) { + this.amount = amount; + return this; + } + + /** + *

                                                                                                                                                                                              Name of the tax portion.

                                                                                                                                                                                              + * @return name + */ + + @Nullable + public String getName() { + return this.name; + } + + /** + *

                                                                                                                                                                                              A number in the range 0-1.

                                                                                                                                                                                              + * @return rate + */ + + public Double getRate() { + return this.rate; + } + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + * @return amount + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getAmount() { + return this.amount; + } + + /** + * builds TaxPortion with checking for non-null required values + * @return TaxPortion + */ + public TaxPortion build() { + Objects.requireNonNull(rate, TaxPortion.class + ": rate is missing"); + Objects.requireNonNull(amount, TaxPortion.class + ": amount is missing"); + return new TaxPortionImpl(name, rate, amount); + } + + /** + * builds TaxPortion without checking for non-null required values + * @return TaxPortion + */ + public TaxPortion buildUnchecked() { + return new TaxPortionImpl(name, rate, amount); + } + + /** + * factory method for an instance of TaxPortionBuilder + * @return builder + */ + public static TaxPortionBuilder of() { + return new TaxPortionBuilder(); + } + + /** + * create builder for TaxPortion instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TaxPortionBuilder of(final TaxPortion template) { + TaxPortionBuilder builder = new TaxPortionBuilder(); + builder.name = template.getName(); + builder.rate = template.getRate(); + builder.amount = template.getAmount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortionImpl.java new file mode 100644 index 00000000000..a1b6bf04dce --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxPortionImpl.java @@ -0,0 +1,120 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              The tax portions are calculated from the TaxRates. If a Tax Rate has SubRates, they are used and can be identified by name. Tax portions from Line Items with the same rate and name are accumulated to the same tax portion.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TaxPortionImpl implements TaxPortion, ModelBase { + + private String name; + + private Double rate; + + private com.commercetools.history.models.common.CentPrecisionMoney amount; + + /** + * create instance with all properties + */ + @JsonCreator + TaxPortionImpl(@JsonProperty("name") final String name, @JsonProperty("rate") final Double rate, + @JsonProperty("amount") final com.commercetools.history.models.common.CentPrecisionMoney amount) { + this.name = name; + this.rate = rate; + this.amount = amount; + } + + /** + * create empty instance + */ + public TaxPortionImpl() { + } + + /** + *

                                                                                                                                                                                              Name of the tax portion.

                                                                                                                                                                                              + */ + + public String getName() { + return this.name; + } + + /** + *

                                                                                                                                                                                              A number in the range 0-1.

                                                                                                                                                                                              + */ + + public Double getRate() { + return this.rate; + } + + /** + *

                                                                                                                                                                                              Money value of the tax portion.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getAmount() { + return this.amount; + } + + public void setName(final String name) { + this.name = name; + } + + public void setRate(final Double rate) { + this.rate = rate; + } + + public void setAmount(final com.commercetools.history.models.common.CentPrecisionMoney amount) { + this.amount = amount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TaxPortionImpl that = (TaxPortionImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(rate, that.rate) + .append(amount, that.amount) + .append(name, that.name) + .append(rate, that.rate) + .append(amount, that.amount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name).append(rate).append(amount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("rate", rate) + .append("amount", amount) + .build(); + } + + @Override + public TaxPortion copyDeep() { + return TaxPortion.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRate.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRate.java index 96739a0adda..a46dd1a8f0d 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRate.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRate.java @@ -17,20 +17,17 @@ import jakarta.validation.constraints.NotNull; /** - *

                                                                                                                                                                                              Shape of the value for addTaxRate and removeTaxRate actions

                                                                                                                                                                                              + * TaxRate * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TaxRate taxRate = TaxRate.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                                *             .name("{name}")
                                                                                                                                                                                              - *             .amount(1)
                                                                                                                                                                                              + *             .amount(0.3)
                                                                                                                                                                                                *             .includedInPrice(true)
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                              - *             .plusSubRates(subRatesBuilder -> subRatesBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -40,15 +37,23 @@ public interface TaxRate { /** - *

                                                                                                                                                                                              The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

                                                                                                                                                                                              * @return id */ - @NotNull + @JsonProperty("id") public String getId(); /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Name of the TaxRate.

                                                                                                                                                                                              * @return name */ @NotNull @@ -56,15 +61,15 @@ public interface TaxRate { public String getName(); /** - *

                                                                                                                                                                                              Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tax rate. If subrates are used, the amount is the sum of all rates in subRates.

                                                                                                                                                                                              * @return amount */ @NotNull @JsonProperty("amount") - public Integer getAmount(); + public Double getAmount(); /** - * + *

                                                                                                                                                                                              If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

                                                                                                                                                                                              * @return includedInPrice */ @NotNull @@ -72,7 +77,7 @@ public interface TaxRate { public Boolean getIncludedInPrice(); /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

                                                                                                                                                                                              * @return country */ @NotNull @@ -80,66 +85,72 @@ public interface TaxRate { public String getCountry(); /** - *

                                                                                                                                                                                              The state in the country

                                                                                                                                                                                              + *

                                                                                                                                                                                              State within the country, such as Texas in the United States.

                                                                                                                                                                                              * @return state */ - @NotNull + @JsonProperty("state") public String getState(); /** - * + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @return subRates */ - @NotNull @Valid @JsonProperty("subRates") public List getSubRates(); /** - *

                                                                                                                                                                                              The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set name + *

                                                                                                                                                                                              User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Name of the TaxRate.

                                                                                                                                                                                              * @param name value to be set */ public void setName(final String name); /** - *

                                                                                                                                                                                              Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tax rate. If subrates are used, the amount is the sum of all rates in subRates.

                                                                                                                                                                                              * @param amount value to be set */ - public void setAmount(final Integer amount); + public void setAmount(final Double amount); /** - * set includedInPrice + *

                                                                                                                                                                                              If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

                                                                                                                                                                                              * @param includedInPrice value to be set */ public void setIncludedInPrice(final Boolean includedInPrice); /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

                                                                                                                                                                                              * @param country value to be set */ public void setCountry(final String country); /** - *

                                                                                                                                                                                              The state in the country

                                                                                                                                                                                              + *

                                                                                                                                                                                              State within the country, such as Texas in the United States.

                                                                                                                                                                                              * @param state value to be set */ public void setState(final String state); /** - * set subRates + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param subRates values to be set */ @@ -147,7 +158,7 @@ public interface TaxRate { public void setSubRates(final SubRate... subRates); /** - * set subRates + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param subRates values to be set */ @@ -169,6 +180,7 @@ public static TaxRate of() { public static TaxRate of(final TaxRate template) { TaxRateImpl instance = new TaxRateImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(template.getName()); instance.setAmount(template.getAmount()); instance.setIncludedInPrice(template.getIncludedInPrice()); @@ -192,6 +204,7 @@ public static TaxRate deepCopy(@Nullable final TaxRate template) { } TaxRateImpl instance = new TaxRateImpl(); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(template.getName()); instance.setAmount(template.getAmount()); instance.setIncludedInPrice(template.getIncludedInPrice()); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateBuilder.java index 0ed918f990a..42c57d1c58c 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,13 +16,10 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TaxRate taxRate = TaxRate.builder()
                                                                                                                                                                                              - *             .id("{id}")
                                                                                                                                                                                                *             .name("{name}")
                                                                                                                                                                                              - *             .amount(1)
                                                                                                                                                                                              + *             .amount(0.3)
                                                                                                                                                                                                *             .includedInPrice(true)
                                                                                                                                                                                                *             .country("{country}")
                                                                                                                                                                                              - *             .state("{state}")
                                                                                                                                                                                              - *             .plusSubRates(subRatesBuilder -> subRatesBuilder)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -28,33 +27,50 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxRateBuilder implements Builder { + @Nullable private String id; + @Nullable + private String key; + private String name; - private Integer amount; + private Double amount; private Boolean includedInPrice; private String country; + @Nullable private String state; + @Nullable private java.util.List subRates; /** - *

                                                                                                                                                                                              The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ - public TaxRateBuilder id(final String id) { + public TaxRateBuilder id(@Nullable final String id) { this.id = id; return this; } /** - * set the value to the name + *

                                                                                                                                                                                              User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public TaxRateBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Name of the TaxRate.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -65,18 +81,18 @@ public TaxRateBuilder name(final String name) { } /** - *

                                                                                                                                                                                              Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tax rate. If subrates are used, the amount is the sum of all rates in subRates.

                                                                                                                                                                                              * @param amount value to be set * @return Builder */ - public TaxRateBuilder amount(final Integer amount) { + public TaxRateBuilder amount(final Double amount) { this.amount = amount; return this; } /** - * set the value to the includedInPrice + *

                                                                                                                                                                                              If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

                                                                                                                                                                                              * @param includedInPrice value to be set * @return Builder */ @@ -87,7 +103,7 @@ public TaxRateBuilder includedInPrice(final Boolean includedInPrice) { } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

                                                                                                                                                                                              * @param country value to be set * @return Builder */ @@ -98,45 +114,46 @@ public TaxRateBuilder country(final String country) { } /** - *

                                                                                                                                                                                              The state in the country

                                                                                                                                                                                              + *

                                                                                                                                                                                              State within the country, such as Texas in the United States.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ - public TaxRateBuilder state(final String state) { + public TaxRateBuilder state(@Nullable final String state) { this.state = state; return this; } /** - * set values to the subRates + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param subRates value to be set * @return Builder */ - public TaxRateBuilder subRates(final com.commercetools.history.models.common.SubRate... subRates) { + public TaxRateBuilder subRates(@Nullable final com.commercetools.history.models.common.SubRate... subRates) { this.subRates = new ArrayList<>(Arrays.asList(subRates)); return this; } /** - * set value to the subRates + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param subRates value to be set * @return Builder */ - public TaxRateBuilder subRates(final java.util.List subRates) { + public TaxRateBuilder subRates( + @Nullable final java.util.List subRates) { this.subRates = subRates; return this; } /** - * add values to the subRates + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param subRates value to be set * @return Builder */ - public TaxRateBuilder plusSubRates(final com.commercetools.history.models.common.SubRate... subRates) { + public TaxRateBuilder plusSubRates(@Nullable final com.commercetools.history.models.common.SubRate... subRates) { if (this.subRates == null) { this.subRates = new ArrayList<>(); } @@ -145,7 +162,7 @@ public TaxRateBuilder plusSubRates(final com.commercetools.history.models.common } /** - * add the value to the subRates using the builder function + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param builder function to build the subRates value * @return Builder */ @@ -160,7 +177,7 @@ public TaxRateBuilder plusSubRates( } /** - * set the value to the subRates using the builder function + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param builder function to build the subRates value * @return Builder */ @@ -173,7 +190,7 @@ public TaxRateBuilder withSubRates( } /** - * add the value to the subRates using the builder function + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param builder function to build the subRates value * @return Builder */ @@ -184,7 +201,7 @@ public TaxRateBuilder addSubRates( } /** - * set the value to the subRates using the builder function + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @param builder function to build the subRates value * @return Builder */ @@ -195,16 +212,27 @@ public TaxRateBuilder setSubRates( } /** - *

                                                                                                                                                                                              The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

                                                                                                                                                                                              * @return id */ + @Nullable public String getId() { return this.id; } /** - * value of name} + *

                                                                                                                                                                                              User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the TaxRate.

                                                                                                                                                                                              * @return name */ @@ -213,16 +241,16 @@ public String getName() { } /** - *

                                                                                                                                                                                              Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tax rate. If subrates are used, the amount is the sum of all rates in subRates.

                                                                                                                                                                                              * @return amount */ - public Integer getAmount() { + public Double getAmount() { return this.amount; } /** - * value of includedInPrice} + *

                                                                                                                                                                                              If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

                                                                                                                                                                                              * @return includedInPrice */ @@ -231,7 +259,7 @@ public Boolean getIncludedInPrice() { } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

                                                                                                                                                                                              * @return country */ @@ -240,19 +268,21 @@ public String getCountry() { } /** - *

                                                                                                                                                                                              The state in the country

                                                                                                                                                                                              + *

                                                                                                                                                                                              State within the country, such as Texas in the United States.

                                                                                                                                                                                              * @return state */ + @Nullable public String getState() { return this.state; } /** - * value of subRates} + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              * @return subRates */ + @Nullable public java.util.List getSubRates() { return this.subRates; } @@ -262,14 +292,11 @@ public java.util.List getSubRat * @return TaxRate */ public TaxRate build() { - Objects.requireNonNull(id, TaxRate.class + ": id is missing"); Objects.requireNonNull(name, TaxRate.class + ": name is missing"); Objects.requireNonNull(amount, TaxRate.class + ": amount is missing"); Objects.requireNonNull(includedInPrice, TaxRate.class + ": includedInPrice is missing"); Objects.requireNonNull(country, TaxRate.class + ": country is missing"); - Objects.requireNonNull(state, TaxRate.class + ": state is missing"); - Objects.requireNonNull(subRates, TaxRate.class + ": subRates is missing"); - return new TaxRateImpl(id, name, amount, includedInPrice, country, state, subRates); + return new TaxRateImpl(id, key, name, amount, includedInPrice, country, state, subRates); } /** @@ -277,7 +304,7 @@ public TaxRate build() { * @return TaxRate */ public TaxRate buildUnchecked() { - return new TaxRateImpl(id, name, amount, includedInPrice, country, state, subRates); + return new TaxRateImpl(id, key, name, amount, includedInPrice, country, state, subRates); } /** @@ -296,6 +323,7 @@ public static TaxRateBuilder of() { public static TaxRateBuilder of(final TaxRate template) { TaxRateBuilder builder = new TaxRateBuilder(); builder.id = template.getId(); + builder.key = template.getKey(); builder.name = template.getName(); builder.amount = template.getAmount(); builder.includedInPrice = template.getIncludedInPrice(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateImpl.java index 713eca3cad3..23fecccfd50 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxRateImpl.java @@ -17,16 +17,18 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - *

                                                                                                                                                                                              Shape of the value for addTaxRate and removeTaxRate actions

                                                                                                                                                                                              + * TaxRate */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxRateImpl implements TaxRate, ModelBase { private String id; + private String key; + private String name; - private Integer amount; + private Double amount; private Boolean includedInPrice; @@ -40,12 +42,13 @@ public class TaxRateImpl implements TaxRate, ModelBase { * create instance with all properties */ @JsonCreator - TaxRateImpl(@JsonProperty("id") final String id, @JsonProperty("name") final String name, - @JsonProperty("amount") final Integer amount, + TaxRateImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key, + @JsonProperty("name") final String name, @JsonProperty("amount") final Double amount, @JsonProperty("includedInPrice") final Boolean includedInPrice, @JsonProperty("country") final String country, @JsonProperty("state") final String state, @JsonProperty("subRates") final java.util.List subRates) { this.id = id; + this.key = key; this.name = name; this.amount = amount; this.includedInPrice = includedInPrice; @@ -61,7 +64,7 @@ public TaxRateImpl() { } /** - *

                                                                                                                                                                                              The ID is always set if the tax rate is part of a TaxCategory. The external tax rates in a Cart do not contain an id.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Present if the TaxRate is part of a TaxCategory. Absent for external TaxRates in LineItem, CustomLineItem, and ShippingInfo.

                                                                                                                                                                                              */ public String getId() { @@ -69,7 +72,15 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined unique identifier of the TaxRate. Present when set using TaxRateDraft. Not available for external TaxRates created using ExternalTaxRateDraft.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the TaxRate.

                                                                                                                                                                                              */ public String getName() { @@ -77,15 +88,15 @@ public String getName() { } /** - *

                                                                                                                                                                                              Percentage in the range of [0..1]. The sum of the amounts of all subRates, if there are any.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Tax rate. If subrates are used, the amount is the sum of all rates in subRates.

                                                                                                                                                                                              */ - public Integer getAmount() { + public Double getAmount() { return this.amount; } /** - * + *

                                                                                                                                                                                              If true, tax is included in Embedded Prices or Standalone Prices, and the taxedPrice is present on LineItems. In this case, the totalNet price on TaxedPrice includes the TaxRate.

                                                                                                                                                                                              */ public Boolean getIncludedInPrice() { @@ -93,7 +104,7 @@ public Boolean getIncludedInPrice() { } /** - *

                                                                                                                                                                                              Two-digit country code as per ISO 3166-1 alpha-2.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Country in which the tax rate is applied in ISO 3166-1 alpha-2 format.

                                                                                                                                                                                              */ public String getCountry() { @@ -101,7 +112,7 @@ public String getCountry() { } /** - *

                                                                                                                                                                                              The state in the country

                                                                                                                                                                                              + *

                                                                                                                                                                                              State within the country, such as Texas in the United States.

                                                                                                                                                                                              */ public String getState() { @@ -109,7 +120,7 @@ public String getState() { } /** - * + *

                                                                                                                                                                                              Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate amount. These subrates are used to calculate the taxPortions field of a Cart or Order and the taxedPrice field of LineItems, CustomLineItems, and ShippingInfos.

                                                                                                                                                                                              */ public java.util.List getSubRates() { @@ -120,11 +131,15 @@ public void setId(final String id) { this.id = id; } + public void setKey(final String key) { + this.key = key; + } + public void setName(final String name) { this.name = name; } - public void setAmount(final Integer amount) { + public void setAmount(final Double amount) { this.amount = amount; } @@ -159,6 +174,7 @@ public boolean equals(Object o) { TaxRateImpl that = (TaxRateImpl) o; return new EqualsBuilder().append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(amount, that.amount) .append(includedInPrice, that.includedInPrice) @@ -166,6 +182,7 @@ public boolean equals(Object o) { .append(state, that.state) .append(subRates, that.subRates) .append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(amount, that.amount) .append(includedInPrice, that.includedInPrice) @@ -178,6 +195,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return new HashCodeBuilder(17, 37).append(id) + .append(key) .append(name) .append(amount) .append(includedInPrice) @@ -190,6 +208,7 @@ public int hashCode() { @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("key", key) .append("name", name) .append("amount", amount) .append("includedInPrice", includedInPrice) diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPrice.java index 23d4be52511..58e97d62314 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPrice.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPrice.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -25,6 +26,7 @@ * TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder() * .totalNet(totalNetBuilder -> totalNetBuilder) * .totalGross(totalGrossBuilder -> totalGrossBuilder) + * .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder) * .build() *
                                                                                                                                                                                              * @@ -34,36 +36,78 @@ public interface TaxedItemPrice { /** - * + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return totalNet */ @NotNull @Valid @JsonProperty("totalNet") - public Money getTotalNet(); + public CentPrecisionMoney getTotalNet(); /** - * + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return totalGross */ @NotNull @Valid @JsonProperty("totalGross") - public Money getTotalGross(); + public CentPrecisionMoney getTotalGross(); /** - * set totalNet + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @return taxPortions + */ + @NotNull + @Valid + @JsonProperty("taxPortions") + public List getTaxPortions(); + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @return totalTax + */ + @Valid + @JsonProperty("totalTax") + public CentPrecisionMoney getTotalTax(); + + /** + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param totalNet value to be set */ - public void setTotalNet(final Money totalNet); + public void setTotalNet(final CentPrecisionMoney totalNet); /** - * set totalGross + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param totalGross value to be set */ - public void setTotalGross(final Money totalGross); + public void setTotalGross(final CentPrecisionMoney totalGross); + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions values to be set + */ + + @JsonIgnore + public void setTaxPortions(final TaxPortion... taxPortions); + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions values to be set + */ + + public void setTaxPortions(final List taxPortions); + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param totalTax value to be set + */ + + public void setTotalTax(final CentPrecisionMoney totalTax); /** * factory method @@ -82,6 +126,8 @@ public static TaxedItemPrice of(final TaxedItemPrice template) { TaxedItemPriceImpl instance = new TaxedItemPriceImpl(); instance.setTotalNet(template.getTotalNet()); instance.setTotalGross(template.getTotalGross()); + instance.setTaxPortions(template.getTaxPortions()); + instance.setTotalTax(template.getTotalTax()); return instance; } @@ -98,8 +144,17 @@ public static TaxedItemPrice deepCopy(@Nullable final TaxedItemPrice template) { return null; } TaxedItemPriceImpl instance = new TaxedItemPriceImpl(); - instance.setTotalNet(com.commercetools.history.models.common.Money.deepCopy(template.getTotalNet())); - instance.setTotalGross(com.commercetools.history.models.common.Money.deepCopy(template.getTotalGross())); + instance.setTotalNet( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalNet())); + instance.setTotalGross( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalGross())); + instance.setTaxPortions(Optional.ofNullable(template.getTaxPortions()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.TaxPortion::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTotalTax( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalTax())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceBuilder.java index 603fc4c24f9..9d0c56eacf4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -16,6 +18,7 @@ * TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder() * .totalNet(totalNetBuilder -> totalNetBuilder) * .totalGross(totalGrossBuilder -> totalGrossBuilder) + * .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder) * .build() *
                                                                                                                                                                                              * @@ -23,98 +26,255 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxedItemPriceBuilder implements Builder { - private com.commercetools.history.models.common.Money totalNet; + private com.commercetools.history.models.common.CentPrecisionMoney totalNet; + + private com.commercetools.history.models.common.CentPrecisionMoney totalGross; + + private java.util.List taxPortions; - private com.commercetools.history.models.common.Money totalGross; + @Nullable + private com.commercetools.history.models.common.CentPrecisionMoney totalTax; /** - * set the value to the totalNet using the builder function + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the totalNet value * @return Builder */ public TaxedItemPriceBuilder totalNet( - Function builder) { - this.totalNet = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.totalNet = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the totalNet using the builder function + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the totalNet value * @return Builder */ public TaxedItemPriceBuilder withTotalNet( - Function builder) { - this.totalNet = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.totalNet = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the totalNet + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param totalNet value to be set * @return Builder */ - public TaxedItemPriceBuilder totalNet(final com.commercetools.history.models.common.Money totalNet) { + public TaxedItemPriceBuilder totalNet(final com.commercetools.history.models.common.CentPrecisionMoney totalNet) { this.totalNet = totalNet; return this; } /** - * set the value to the totalGross using the builder function + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the totalGross value * @return Builder */ public TaxedItemPriceBuilder totalGross( - Function builder) { - this.totalGross = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.totalGross = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the totalGross using the builder function + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param builder function to build the totalGross value * @return Builder */ public TaxedItemPriceBuilder withTotalGross( - Function builder) { - this.totalGross = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.totalGross = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the totalGross + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @param totalGross value to be set * @return Builder */ - public TaxedItemPriceBuilder totalGross(final com.commercetools.history.models.common.Money totalGross) { + public TaxedItemPriceBuilder totalGross( + final com.commercetools.history.models.common.CentPrecisionMoney totalGross) { this.totalGross = totalGross; return this; } /** - * value of totalNet} + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedItemPriceBuilder taxPortions(final com.commercetools.history.models.common.TaxPortion... taxPortions) { + this.taxPortions = new ArrayList<>(Arrays.asList(taxPortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedItemPriceBuilder taxPortions( + final java.util.List taxPortions) { + this.taxPortions = taxPortions; + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedItemPriceBuilder plusTaxPortions( + final com.commercetools.history.models.common.TaxPortion... taxPortions) { + if (this.taxPortions == null) { + this.taxPortions = new ArrayList<>(); + } + this.taxPortions.addAll(Arrays.asList(taxPortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedItemPriceBuilder plusTaxPortions( + Function builder) { + if (this.taxPortions == null) { + this.taxPortions = new ArrayList<>(); + } + this.taxPortions.add(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedItemPriceBuilder withTaxPortions( + Function builder) { + this.taxPortions = new ArrayList<>(); + this.taxPortions.add(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedItemPriceBuilder addTaxPortions( + Function builder) { + return plusTaxPortions(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedItemPriceBuilder setTaxPortions( + Function builder) { + return taxPortions(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param builder function to build the totalTax value + * @return Builder + */ + + public TaxedItemPriceBuilder totalTax( + Function builder) { + this.totalTax = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param builder function to build the totalTax value + * @return Builder + */ + + public TaxedItemPriceBuilder withTotalTax( + Function builder) { + this.totalTax = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param totalTax value to be set + * @return Builder + */ + + public TaxedItemPriceBuilder totalTax( + @Nullable final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { + this.totalTax = totalTax; + return this; + } + + /** + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return totalNet */ - public com.commercetools.history.models.common.Money getTotalNet() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalNet() { return this.totalNet; } /** - * value of totalGross} + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              * @return totalGross */ - public com.commercetools.history.models.common.Money getTotalGross() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalGross() { return this.totalGross; } + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @return taxPortions + */ + + public java.util.List getTaxPortions() { + return this.taxPortions; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @return totalTax + */ + + @Nullable + public com.commercetools.history.models.common.CentPrecisionMoney getTotalTax() { + return this.totalTax; + } + /** * builds TaxedItemPrice with checking for non-null required values * @return TaxedItemPrice @@ -122,7 +282,8 @@ public com.commercetools.history.models.common.Money getTotalGross() { public TaxedItemPrice build() { Objects.requireNonNull(totalNet, TaxedItemPrice.class + ": totalNet is missing"); Objects.requireNonNull(totalGross, TaxedItemPrice.class + ": totalGross is missing"); - return new TaxedItemPriceImpl(totalNet, totalGross); + Objects.requireNonNull(taxPortions, TaxedItemPrice.class + ": taxPortions is missing"); + return new TaxedItemPriceImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -130,7 +291,7 @@ public TaxedItemPrice build() { * @return TaxedItemPrice */ public TaxedItemPrice buildUnchecked() { - return new TaxedItemPriceImpl(totalNet, totalGross); + return new TaxedItemPriceImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -150,6 +311,8 @@ public static TaxedItemPriceBuilder of(final TaxedItemPrice template) { TaxedItemPriceBuilder builder = new TaxedItemPriceBuilder(); builder.totalNet = template.getTotalNet(); builder.totalGross = template.getTotalGross(); + builder.taxPortions = template.getTaxPortions(); + builder.totalTax = template.getTotalTax(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceImpl.java index 5d679848e85..a6155e7fbdd 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedItemPriceImpl.java @@ -22,18 +22,27 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxedItemPriceImpl implements TaxedItemPrice, ModelBase { - private com.commercetools.history.models.common.Money totalNet; + private com.commercetools.history.models.common.CentPrecisionMoney totalNet; - private com.commercetools.history.models.common.Money totalGross; + private com.commercetools.history.models.common.CentPrecisionMoney totalGross; + + private java.util.List taxPortions; + + private com.commercetools.history.models.common.CentPrecisionMoney totalTax; /** * create instance with all properties */ @JsonCreator - TaxedItemPriceImpl(@JsonProperty("totalNet") final com.commercetools.history.models.common.Money totalNet, - @JsonProperty("totalGross") final com.commercetools.history.models.common.Money totalGross) { + TaxedItemPriceImpl( + @JsonProperty("totalNet") final com.commercetools.history.models.common.CentPrecisionMoney totalNet, + @JsonProperty("totalGross") final com.commercetools.history.models.common.CentPrecisionMoney totalGross, + @JsonProperty("taxPortions") final java.util.List taxPortions, + @JsonProperty("totalTax") final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { this.totalNet = totalNet; this.totalGross = totalGross; + this.taxPortions = taxPortions; + this.totalTax = totalTax; } /** @@ -43,29 +52,58 @@ public TaxedItemPriceImpl() { } /** - * + *

                                                                                                                                                                                              Total net amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getTotalNet() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalNet() { return this.totalNet; } /** - * + *

                                                                                                                                                                                              Total gross amount of the Line Item or Custom Line Item.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getTotalGross() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalGross() { return this.totalGross; } - public void setTotalNet(final com.commercetools.history.models.common.Money totalNet) { + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + */ + + public java.util.List getTaxPortions() { + return this.taxPortions; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Line Item or Custom Line Item. Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getTotalTax() { + return this.totalTax; + } + + public void setTotalNet(final com.commercetools.history.models.common.CentPrecisionMoney totalNet) { this.totalNet = totalNet; } - public void setTotalGross(final com.commercetools.history.models.common.Money totalGross) { + public void setTotalGross(final com.commercetools.history.models.common.CentPrecisionMoney totalGross) { this.totalGross = totalGross; } + public void setTaxPortions(final com.commercetools.history.models.common.TaxPortion... taxPortions) { + this.taxPortions = new ArrayList<>(Arrays.asList(taxPortions)); + } + + public void setTaxPortions(final java.util.List taxPortions) { + this.taxPortions = taxPortions; + } + + public void setTotalTax(final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { + this.totalTax = totalTax; + } + @Override public boolean equals(Object o) { if (this == o) @@ -78,20 +116,30 @@ public boolean equals(Object o) { return new EqualsBuilder().append(totalNet, that.totalNet) .append(totalGross, that.totalGross) + .append(taxPortions, that.taxPortions) + .append(totalTax, that.totalTax) .append(totalNet, that.totalNet) .append(totalGross, that.totalGross) + .append(taxPortions, that.taxPortions) + .append(totalTax, that.totalTax) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(totalNet).append(totalGross).toHashCode(); + return new HashCodeBuilder(17, 37).append(totalNet) + .append(totalGross) + .append(taxPortions) + .append(totalTax) + .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("totalNet", totalNet) .append("totalGross", totalGross) + .append("taxPortions", taxPortions) + .append("totalTax", totalTax) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPrice.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPrice.java index 1e6379be7cd..712e3716b1b 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPrice.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPrice.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -25,6 +26,7 @@ * TaxedPrice taxedPrice = TaxedPrice.builder() * .totalNet(totalNetBuilder -> totalNetBuilder) * .totalGross(totalGrossBuilder -> totalGrossBuilder) + * .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder) * .build() * * @@ -34,36 +36,80 @@ public interface TaxedPrice { /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @return totalNet */ @NotNull @Valid @JsonProperty("totalNet") - public Money getTotalNet(); + public CentPrecisionMoney getTotalNet(); /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @return totalGross */ @NotNull @Valid @JsonProperty("totalGross") - public Money getTotalGross(); + public CentPrecisionMoney getTotalGross(); /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @return taxPortions + */ + @NotNull + @Valid + @JsonProperty("taxPortions") + public List getTaxPortions(); + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @return totalTax + */ + @Valid + @JsonProperty("totalTax") + public CentPrecisionMoney getTotalTax(); + + /** + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @param totalNet value to be set */ - public void setTotalNet(final Money totalNet); + public void setTotalNet(final CentPrecisionMoney totalNet); /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @param totalGross value to be set */ - public void setTotalGross(final Money totalGross); + public void setTotalGross(final CentPrecisionMoney totalGross); + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions values to be set + */ + + @JsonIgnore + public void setTaxPortions(final TaxPortion... taxPortions); + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions values to be set + */ + + public void setTaxPortions(final List taxPortions); + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param totalTax value to be set + */ + + public void setTotalTax(final CentPrecisionMoney totalTax); /** * factory method @@ -82,6 +128,8 @@ public static TaxedPrice of(final TaxedPrice template) { TaxedPriceImpl instance = new TaxedPriceImpl(); instance.setTotalNet(template.getTotalNet()); instance.setTotalGross(template.getTotalGross()); + instance.setTaxPortions(template.getTaxPortions()); + instance.setTotalTax(template.getTotalTax()); return instance; } @@ -98,8 +146,17 @@ public static TaxedPrice deepCopy(@Nullable final TaxedPrice template) { return null; } TaxedPriceImpl instance = new TaxedPriceImpl(); - instance.setTotalNet(com.commercetools.history.models.common.Money.deepCopy(template.getTotalNet())); - instance.setTotalGross(com.commercetools.history.models.common.Money.deepCopy(template.getTotalGross())); + instance.setTotalNet( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalNet())); + instance.setTotalGross( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalGross())); + instance.setTaxPortions(Optional.ofNullable(template.getTaxPortions()) + .map(t -> t.stream() + .map(com.commercetools.history.models.common.TaxPortion::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setTotalTax( + com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getTotalTax())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceBuilder.java index 721027ea8a8..3526637e79a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -16,6 +18,7 @@ * TaxedPrice taxedPrice = TaxedPrice.builder() * .totalNet(totalNetBuilder -> totalNetBuilder) * .totalGross(totalGrossBuilder -> totalGrossBuilder) + * .plusTaxPortions(taxPortionsBuilder -> taxPortionsBuilder) * .build() * * @@ -23,98 +26,257 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxedPriceBuilder implements Builder { - private com.commercetools.history.models.common.Money totalNet; + private com.commercetools.history.models.common.CentPrecisionMoney totalNet; + + private com.commercetools.history.models.common.CentPrecisionMoney totalGross; + + private java.util.List taxPortions; - private com.commercetools.history.models.common.Money totalGross; + @Nullable + private com.commercetools.history.models.common.CentPrecisionMoney totalTax; /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the totalNet value * @return Builder */ public TaxedPriceBuilder totalNet( - Function builder) { - this.totalNet = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.totalNet = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the totalNet value * @return Builder */ public TaxedPriceBuilder withTotalNet( - Function builder) { - this.totalNet = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.totalNet = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @param totalNet value to be set * @return Builder */ - public TaxedPriceBuilder totalNet(final com.commercetools.history.models.common.Money totalNet) { + public TaxedPriceBuilder totalNet(final com.commercetools.history.models.common.CentPrecisionMoney totalNet) { this.totalNet = totalNet; return this; } /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the totalGross value * @return Builder */ public TaxedPriceBuilder totalGross( - Function builder) { - this.totalGross = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.totalGross = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @param builder function to build the totalGross value * @return Builder */ public TaxedPriceBuilder withTotalGross( - Function builder) { - this.totalGross = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.totalGross = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @param totalGross value to be set * @return Builder */ - public TaxedPriceBuilder totalGross(final com.commercetools.history.models.common.Money totalGross) { + public TaxedPriceBuilder totalGross(final com.commercetools.history.models.common.CentPrecisionMoney totalGross) { this.totalGross = totalGross; return this; } /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedPriceBuilder taxPortions(final com.commercetools.history.models.common.TaxPortion... taxPortions) { + this.taxPortions = new ArrayList<>(Arrays.asList(taxPortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedPriceBuilder taxPortions( + final java.util.List taxPortions) { + this.taxPortions = taxPortions; + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param taxPortions value to be set + * @return Builder + */ + + public TaxedPriceBuilder plusTaxPortions(final com.commercetools.history.models.common.TaxPortion... taxPortions) { + if (this.taxPortions == null) { + this.taxPortions = new ArrayList<>(); + } + this.taxPortions.addAll(Arrays.asList(taxPortions)); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedPriceBuilder plusTaxPortions( + Function builder) { + if (this.taxPortions == null) { + this.taxPortions = new ArrayList<>(); + } + this.taxPortions.add(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedPriceBuilder withTaxPortions( + Function builder) { + this.taxPortions = new ArrayList<>(); + this.taxPortions.add(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of()).build()); + return this; + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedPriceBuilder addTaxPortions( + Function builder) { + return plusTaxPortions(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @param builder function to build the taxPortions value + * @return Builder + */ + + public TaxedPriceBuilder setTaxPortions( + Function builder) { + return taxPortions(builder.apply(com.commercetools.history.models.common.TaxPortionBuilder.of())); + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param builder function to build the totalTax value + * @return Builder + */ + + public TaxedPriceBuilder totalTax( + Function builder) { + this.totalTax = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param builder function to build the totalTax value + * @return Builder + */ + + public TaxedPriceBuilder withTotalTax( + Function builder) { + this.totalTax = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @param totalTax value to be set + * @return Builder + */ + + public TaxedPriceBuilder totalTax( + @Nullable final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { + this.totalTax = totalTax; + return this; + } + + /** + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              * @return totalNet */ - public com.commercetools.history.models.common.Money getTotalNet() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalNet() { return this.totalNet; } /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              * @return totalGross */ - public com.commercetools.history.models.common.Money getTotalGross() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalGross() { return this.totalGross; } + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + * @return taxPortions + */ + + public java.util.List getTaxPortions() { + return this.taxPortions; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + * @return totalTax + */ + + @Nullable + public com.commercetools.history.models.common.CentPrecisionMoney getTotalTax() { + return this.totalTax; + } + /** * builds TaxedPrice with checking for non-null required values * @return TaxedPrice @@ -122,7 +284,8 @@ public com.commercetools.history.models.common.Money getTotalGross() { public TaxedPrice build() { Objects.requireNonNull(totalNet, TaxedPrice.class + ": totalNet is missing"); Objects.requireNonNull(totalGross, TaxedPrice.class + ": totalGross is missing"); - return new TaxedPriceImpl(totalNet, totalGross); + Objects.requireNonNull(taxPortions, TaxedPrice.class + ": taxPortions is missing"); + return new TaxedPriceImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -130,7 +293,7 @@ public TaxedPrice build() { * @return TaxedPrice */ public TaxedPrice buildUnchecked() { - return new TaxedPriceImpl(totalNet, totalGross); + return new TaxedPriceImpl(totalNet, totalGross, taxPortions, totalTax); } /** @@ -150,6 +313,8 @@ public static TaxedPriceBuilder of(final TaxedPrice template) { TaxedPriceBuilder builder = new TaxedPriceBuilder(); builder.totalNet = template.getTotalNet(); builder.totalGross = template.getTotalGross(); + builder.taxPortions = template.getTaxPortions(); + builder.totalTax = template.getTotalTax(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceImpl.java index 5efbabe7345..69b97d21848 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TaxedPriceImpl.java @@ -22,18 +22,26 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TaxedPriceImpl implements TaxedPrice, ModelBase { - private com.commercetools.history.models.common.Money totalNet; + private com.commercetools.history.models.common.CentPrecisionMoney totalNet; - private com.commercetools.history.models.common.Money totalGross; + private com.commercetools.history.models.common.CentPrecisionMoney totalGross; + + private java.util.List taxPortions; + + private com.commercetools.history.models.common.CentPrecisionMoney totalTax; /** * create instance with all properties */ @JsonCreator - TaxedPriceImpl(@JsonProperty("totalNet") final com.commercetools.history.models.common.Money totalNet, - @JsonProperty("totalGross") final com.commercetools.history.models.common.Money totalGross) { + TaxedPriceImpl(@JsonProperty("totalNet") final com.commercetools.history.models.common.CentPrecisionMoney totalNet, + @JsonProperty("totalGross") final com.commercetools.history.models.common.CentPrecisionMoney totalGross, + @JsonProperty("taxPortions") final java.util.List taxPortions, + @JsonProperty("totalTax") final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { this.totalNet = totalNet; this.totalGross = totalGross; + this.taxPortions = taxPortions; + this.totalTax = totalTax; } /** @@ -43,29 +51,59 @@ public TaxedPriceImpl() { } /** - *

                                                                                                                                                                                              Total net price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total net price of the Cart or Order.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getTotalNet() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalNet() { return this.totalNet; } /** - *

                                                                                                                                                                                              Total gross price of the Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Total gross price of the Cart or Order.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getTotalGross() { + public com.commercetools.history.models.common.CentPrecisionMoney getTotalGross() { return this.totalGross; } - public void setTotalNet(final com.commercetools.history.models.common.Money totalNet) { + /** + *

                                                                                                                                                                                              Taxable portions added to the total net price.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Calculated from the TaxRates.

                                                                                                                                                                                              + */ + + public java.util.List getTaxPortions() { + return this.taxPortions; + } + + /** + *

                                                                                                                                                                                              Total tax applicable for the Cart or Order.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Automatically calculated as the difference between the totalGross and totalNet values.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CentPrecisionMoney getTotalTax() { + return this.totalTax; + } + + public void setTotalNet(final com.commercetools.history.models.common.CentPrecisionMoney totalNet) { this.totalNet = totalNet; } - public void setTotalGross(final com.commercetools.history.models.common.Money totalGross) { + public void setTotalGross(final com.commercetools.history.models.common.CentPrecisionMoney totalGross) { this.totalGross = totalGross; } + public void setTaxPortions(final com.commercetools.history.models.common.TaxPortion... taxPortions) { + this.taxPortions = new ArrayList<>(Arrays.asList(taxPortions)); + } + + public void setTaxPortions(final java.util.List taxPortions) { + this.taxPortions = taxPortions; + } + + public void setTotalTax(final com.commercetools.history.models.common.CentPrecisionMoney totalTax) { + this.totalTax = totalTax; + } + @Override public boolean equals(Object o) { if (this == o) @@ -78,20 +116,30 @@ public boolean equals(Object o) { return new EqualsBuilder().append(totalNet, that.totalNet) .append(totalGross, that.totalGross) + .append(taxPortions, that.taxPortions) + .append(totalTax, that.totalTax) .append(totalNet, that.totalNet) .append(totalGross, that.totalGross) + .append(taxPortions, that.taxPortions) + .append(totalTax, that.totalTax) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(totalNet).append(totalGross).toHashCode(); + return new HashCodeBuilder(17, 37).append(totalNet) + .append(totalGross) + .append(taxPortions) + .append(totalTax) + .toHashCode(); } @Override public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("totalNet", totalNet) .append("totalGross", totalGross) + .append("taxPortions", taxPortions) + .append("totalTax", totalTax) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextInputHint.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextInputHint.java index 51a92b36df6..a2d46f0fb95 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextInputHint.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextInputHint.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * TextInputHint + *

                                                                                                                                                                                              A text input hint is a string with one of the following values:

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface TextInputHint extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItem.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItem.java index f7ad163f9d8..abc41e2e5b4 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItem.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItem.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; @@ -16,19 +17,17 @@ import jakarta.validation.constraints.NotNull; /** - * TextLineItem + *

                                                                                                                                                                                              TextLineItems are Line Items that use text values instead of references to Products.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TextLineItem textLineItem = TextLineItem.builder()
                                                                                                                                                                                              - *             .addedAt("{addedAt}")
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                              - *             .description(descriptionBuilder -> descriptionBuilder)
                                                                                                                                                                                              + *             .addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                                *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -38,33 +37,31 @@ public interface TextLineItem { /** - * + *

                                                                                                                                                                                              Date and time (UTC) the TextLineItem was added to the ShoppingList.

                                                                                                                                                                                              * @return addedAt */ @NotNull @JsonProperty("addedAt") - public String getAddedAt(); + public ZonedDateTime getAddedAt(); /** - * + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @return custom */ - @NotNull @Valid @JsonProperty("custom") public CustomFields getCustom(); /** - * + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @return description */ - @NotNull @Valid @JsonProperty("description") public LocalizedString getDescription(); /** - * + *

                                                                                                                                                                                              Unique identifier of the TextLineItem.

                                                                                                                                                                                              * @return id */ @NotNull @@ -72,7 +69,15 @@ public interface TextLineItem { public String getId(); /** - * + *

                                                                                                                                                                                              User-defined identifier of the TextLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @return name */ @NotNull @@ -81,54 +86,61 @@ public interface TextLineItem { public LocalizedString getName(); /** - * + *

                                                                                                                                                                                              Number of entries in the TextLineItem.

                                                                                                                                                                                              * @return quantity */ @NotNull @JsonProperty("quantity") - public Integer getQuantity(); + public Long getQuantity(); /** - * set addedAt + *

                                                                                                                                                                                              Date and time (UTC) the TextLineItem was added to the ShoppingList.

                                                                                                                                                                                              * @param addedAt value to be set */ - public void setAddedAt(final String addedAt); + public void setAddedAt(final ZonedDateTime addedAt); /** - * set custom + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @param custom value to be set */ public void setCustom(final CustomFields custom); /** - * set description + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @param description value to be set */ public void setDescription(final LocalizedString description); /** - * set id + *

                                                                                                                                                                                              Unique identifier of the TextLineItem.

                                                                                                                                                                                              * @param id value to be set */ public void setId(final String id); /** - * set name + *

                                                                                                                                                                                              User-defined identifier of the TextLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @param name value to be set */ public void setName(final LocalizedString name); /** - * set quantity + *

                                                                                                                                                                                              Number of entries in the TextLineItem.

                                                                                                                                                                                              * @param quantity value to be set */ - public void setQuantity(final Integer quantity); + public void setQuantity(final Long quantity); /** * factory method @@ -149,6 +161,7 @@ public static TextLineItem of(final TextLineItem template) { instance.setCustom(template.getCustom()); instance.setDescription(template.getDescription()); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(template.getName()); instance.setQuantity(template.getQuantity()); return instance; @@ -172,6 +185,7 @@ public static TextLineItem deepCopy(@Nullable final TextLineItem template) { instance.setDescription( com.commercetools.history.models.common.LocalizedString.deepCopy(template.getDescription())); instance.setId(template.getId()); + instance.setKey(template.getKey()); instance.setName(com.commercetools.history.models.common.LocalizedString.deepCopy(template.getName())); instance.setQuantity(template.getQuantity()); return instance; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemBuilder.java index 2be1dabcb7f..009ec4a7d53 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -14,12 +16,10 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TextLineItem textLineItem = TextLineItem.builder()
                                                                                                                                                                                              - *             .addedAt("{addedAt}")
                                                                                                                                                                                              - *             .custom(customBuilder -> customBuilder)
                                                                                                                                                                                              - *             .description(descriptionBuilder -> descriptionBuilder)
                                                                                                                                                                                              + *             .addedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                                *             .name(nameBuilder -> nameBuilder)
                                                                                                                                                                                              - *             .quantity(1)
                                                                                                                                                                                              + *             .quantity(0.3)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -27,31 +27,36 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TextLineItemBuilder implements Builder { - private String addedAt; + private java.time.ZonedDateTime addedAt; + @Nullable private com.commercetools.history.models.common.CustomFields custom; + @Nullable private com.commercetools.history.models.common.LocalizedString description; private String id; + @Nullable + private String key; + private com.commercetools.history.models.common.LocalizedString name; - private Integer quantity; + private Long quantity; /** - * set the value to the addedAt + *

                                                                                                                                                                                              Date and time (UTC) the TextLineItem was added to the ShoppingList.

                                                                                                                                                                                              * @param addedAt value to be set * @return Builder */ - public TextLineItemBuilder addedAt(final String addedAt) { + public TextLineItemBuilder addedAt(final java.time.ZonedDateTime addedAt) { this.addedAt = addedAt; return this; } /** - * set the value to the custom using the builder function + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -63,7 +68,7 @@ public TextLineItemBuilder custom( } /** - * set the value to the custom using the builder function + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the custom value * @return Builder */ @@ -75,18 +80,18 @@ public TextLineItemBuilder withCustom( } /** - * set the value to the custom + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @param custom value to be set * @return Builder */ - public TextLineItemBuilder custom(final com.commercetools.history.models.common.CustomFields custom) { + public TextLineItemBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { this.custom = custom; return this; } /** - * set the value to the description using the builder function + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the description value * @return Builder */ @@ -98,7 +103,7 @@ public TextLineItemBuilder description( } /** - * set the value to the description using the builder function + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the description value * @return Builder */ @@ -110,18 +115,19 @@ public TextLineItemBuilder withDescription( } /** - * set the value to the description + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @param description value to be set * @return Builder */ - public TextLineItemBuilder description(final com.commercetools.history.models.common.LocalizedString description) { + public TextLineItemBuilder description( + @Nullable final com.commercetools.history.models.common.LocalizedString description) { this.description = description; return this; } /** - * set the value to the id + *

                                                                                                                                                                                              Unique identifier of the TextLineItem.

                                                                                                                                                                                              * @param id value to be set * @return Builder */ @@ -132,7 +138,18 @@ public TextLineItemBuilder id(final String id) { } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              User-defined identifier of the TextLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @param key value to be set + * @return Builder + */ + + public TextLineItemBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -144,7 +161,7 @@ public TextLineItemBuilder name( } /** - * set the value to the name using the builder function + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @param builder function to build the name value * @return Builder */ @@ -156,7 +173,7 @@ public TextLineItemBuilder withName( } /** - * set the value to the name + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @param name value to be set * @return Builder */ @@ -167,45 +184,47 @@ public TextLineItemBuilder name(final com.commercetools.history.models.common.Lo } /** - * set the value to the quantity + *

                                                                                                                                                                                              Number of entries in the TextLineItem.

                                                                                                                                                                                              * @param quantity value to be set * @return Builder */ - public TextLineItemBuilder quantity(final Integer quantity) { + public TextLineItemBuilder quantity(final Long quantity) { this.quantity = quantity; return this; } /** - * value of addedAt} + *

                                                                                                                                                                                              Date and time (UTC) the TextLineItem was added to the ShoppingList.

                                                                                                                                                                                              * @return addedAt */ - public String getAddedAt() { + public java.time.ZonedDateTime getAddedAt() { return this.addedAt; } /** - * value of custom} + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              * @return custom */ + @Nullable public com.commercetools.history.models.common.CustomFields getCustom() { return this.custom; } /** - * value of description} + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              * @return description */ + @Nullable public com.commercetools.history.models.common.LocalizedString getDescription() { return this.description; } /** - * value of id} + *

                                                                                                                                                                                              Unique identifier of the TextLineItem.

                                                                                                                                                                                              * @return id */ @@ -214,7 +233,17 @@ public String getId() { } /** - * value of name} + *

                                                                                                                                                                                              User-defined identifier of the TextLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              * @return name */ @@ -223,11 +252,11 @@ public com.commercetools.history.models.common.LocalizedString getName() { } /** - * value of quantity} + *

                                                                                                                                                                                              Number of entries in the TextLineItem.

                                                                                                                                                                                              * @return quantity */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } @@ -237,12 +266,10 @@ public Integer getQuantity() { */ public TextLineItem build() { Objects.requireNonNull(addedAt, TextLineItem.class + ": addedAt is missing"); - Objects.requireNonNull(custom, TextLineItem.class + ": custom is missing"); - Objects.requireNonNull(description, TextLineItem.class + ": description is missing"); Objects.requireNonNull(id, TextLineItem.class + ": id is missing"); Objects.requireNonNull(name, TextLineItem.class + ": name is missing"); Objects.requireNonNull(quantity, TextLineItem.class + ": quantity is missing"); - return new TextLineItemImpl(addedAt, custom, description, id, name, quantity); + return new TextLineItemImpl(addedAt, custom, description, id, key, name, quantity); } /** @@ -250,7 +277,7 @@ public TextLineItem build() { * @return TextLineItem */ public TextLineItem buildUnchecked() { - return new TextLineItemImpl(addedAt, custom, description, id, name, quantity); + return new TextLineItemImpl(addedAt, custom, description, id, key, name, quantity); } /** @@ -272,6 +299,7 @@ public static TextLineItemBuilder of(final TextLineItem template) { builder.custom = template.getCustom(); builder.description = template.getDescription(); builder.id = template.getId(); + builder.key = template.getKey(); builder.name = template.getName(); builder.quantity = template.getQuantity(); return builder; diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemImpl.java index da4c0d033b9..d77f6b42d96 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TextLineItemImpl.java @@ -17,12 +17,12 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * TextLineItem + *

                                                                                                                                                                                              TextLineItems are Line Items that use text values instead of references to Products.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TextLineItemImpl implements TextLineItem, ModelBase { - private String addedAt; + private java.time.ZonedDateTime addedAt; private com.commercetools.history.models.common.CustomFields custom; @@ -30,24 +30,27 @@ public class TextLineItemImpl implements TextLineItem, ModelBase { private String id; + private String key; + private com.commercetools.history.models.common.LocalizedString name; - private Integer quantity; + private Long quantity; /** * create instance with all properties */ @JsonCreator - TextLineItemImpl(@JsonProperty("addedAt") final String addedAt, + TextLineItemImpl(@JsonProperty("addedAt") final java.time.ZonedDateTime addedAt, @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom, @JsonProperty("description") final com.commercetools.history.models.common.LocalizedString description, - @JsonProperty("id") final String id, + @JsonProperty("id") final String id, @JsonProperty("key") final String key, @JsonProperty("name") final com.commercetools.history.models.common.LocalizedString name, - @JsonProperty("quantity") final Integer quantity) { + @JsonProperty("quantity") final Long quantity) { this.addedAt = addedAt; this.custom = custom; this.description = description; this.id = id; + this.key = key; this.name = name; this.quantity = quantity; } @@ -59,15 +62,15 @@ public TextLineItemImpl() { } /** - * + *

                                                                                                                                                                                              Date and time (UTC) the TextLineItem was added to the ShoppingList.

                                                                                                                                                                                              */ - public String getAddedAt() { + public java.time.ZonedDateTime getAddedAt() { return this.addedAt; } /** - * + *

                                                                                                                                                                                              Custom Fields of the TextLineItem.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.CustomFields getCustom() { @@ -75,7 +78,7 @@ public com.commercetools.history.models.common.CustomFields getCustom() { } /** - * + *

                                                                                                                                                                                              Description of the TextLineItem.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getDescription() { @@ -83,7 +86,7 @@ public com.commercetools.history.models.common.LocalizedString getDescription() } /** - * + *

                                                                                                                                                                                              Unique identifier of the TextLineItem.

                                                                                                                                                                                              */ public String getId() { @@ -91,7 +94,15 @@ public String getId() { } /** - * + *

                                                                                                                                                                                              User-defined identifier of the TextLineItem. It is unique per ShoppingList.

                                                                                                                                                                                              + */ + + public String getKey() { + return this.key; + } + + /** + *

                                                                                                                                                                                              Name of the TextLineItem.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.LocalizedString getName() { @@ -99,14 +110,14 @@ public com.commercetools.history.models.common.LocalizedString getName() { } /** - * + *

                                                                                                                                                                                              Number of entries in the TextLineItem.

                                                                                                                                                                                              */ - public Integer getQuantity() { + public Long getQuantity() { return this.quantity; } - public void setAddedAt(final String addedAt) { + public void setAddedAt(final java.time.ZonedDateTime addedAt) { this.addedAt = addedAt; } @@ -122,11 +133,15 @@ public void setId(final String id) { this.id = id; } + public void setKey(final String key) { + this.key = key; + } + public void setName(final com.commercetools.history.models.common.LocalizedString name) { this.name = name; } - public void setQuantity(final Integer quantity) { + public void setQuantity(final Long quantity) { this.quantity = quantity; } @@ -144,12 +159,14 @@ public boolean equals(Object o) { .append(custom, that.custom) .append(description, that.description) .append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(quantity, that.quantity) .append(addedAt, that.addedAt) .append(custom, that.custom) .append(description, that.description) .append(id, that.id) + .append(key, that.key) .append(name, that.name) .append(quantity, that.quantity) .isEquals(); @@ -161,6 +178,7 @@ public int hashCode() { .append(custom) .append(description) .append(id) + .append(key) .append(name) .append(quantity) .toHashCode(); @@ -172,6 +190,7 @@ public String toString() { .append("custom", custom) .append("description", description) .append("id", id) + .append("key", key) .append("name", name) .append("quantity", quantity) .build(); diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingData.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingData.java index aa3ecc396f1..5f4d4f63f24 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingData.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingData.java @@ -12,21 +12,14 @@ import io.vrap.rmf.base.client.utils.Generated; -import jakarta.validation.constraints.NotNull; - /** - * TrackingData + *

                                                                                                                                                                                              Information that helps track a Parcel.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TrackingData trackingData = TrackingData.builder()
                                                                                                                                                                                              - *             .trackingId("{trackingId}")
                                                                                                                                                                                              - *             .carrier("{carrier}")
                                                                                                                                                                                              - *             .provider("{provider}")
                                                                                                                                                                                              - *             .providerTransaction("{providerTransaction}")
                                                                                                                                                                                              - *             .isReturn(true)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -36,75 +29,81 @@ public interface TrackingData { /** - *

                                                                                                                                                                                              The ID to track one parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier to track the Parcel.

                                                                                                                                                                                              * @return trackingId */ - @NotNull + @JsonProperty("trackingId") public String getTrackingId(); /** - *

                                                                                                                                                                                              The carrier that delivers the parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the carrier that delivers the Parcel.

                                                                                                                                                                                              * @return carrier */ - @NotNull + @JsonProperty("carrier") public String getCarrier(); /** - * + *

                                                                                                                                                                                              Name of the provider that serves as facade to several carriers.

                                                                                                                                                                                              * @return provider */ - @NotNull + @JsonProperty("provider") public String getProvider(); /** - * + *

                                                                                                                                                                                              Transaction identifier with the provider.

                                                                                                                                                                                              * @return providerTransaction */ - @NotNull + @JsonProperty("providerTransaction") public String getProviderTransaction(); /** - *

                                                                                                                                                                                              Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • If true, the Parcel is being returned.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • If false, the Parcel is being delivered to the customer.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @return isReturn */ - @NotNull + @JsonProperty("isReturn") public Boolean getIsReturn(); /** - *

                                                                                                                                                                                              The ID to track one parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier to track the Parcel.

                                                                                                                                                                                              * @param trackingId value to be set */ public void setTrackingId(final String trackingId); /** - *

                                                                                                                                                                                              The carrier that delivers the parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the carrier that delivers the Parcel.

                                                                                                                                                                                              * @param carrier value to be set */ public void setCarrier(final String carrier); /** - * set provider + *

                                                                                                                                                                                              Name of the provider that serves as facade to several carriers.

                                                                                                                                                                                              * @param provider value to be set */ public void setProvider(final String provider); /** - * set providerTransaction + *

                                                                                                                                                                                              Transaction identifier with the provider.

                                                                                                                                                                                              * @param providerTransaction value to be set */ public void setProviderTransaction(final String providerTransaction); /** - *

                                                                                                                                                                                              Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • If true, the Parcel is being returned.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • If false, the Parcel is being delivered to the customer.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @param isReturn value to be set */ diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataBuilder.java index d8851ed08b5..e682f3a0a09 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataBuilder.java @@ -3,6 +3,8 @@ import java.util.*; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -13,11 +15,6 @@ *
                                                                                                                                                                                              *
                                                                                                                                                                                              
                                                                                                                                                                                                *     TrackingData trackingData = TrackingData.builder()
                                                                                                                                                                                              - *             .trackingId("{trackingId}")
                                                                                                                                                                                              - *             .carrier("{carrier}")
                                                                                                                                                                                              - *             .provider("{provider}")
                                                                                                                                                                                              - *             .providerTransaction("{providerTransaction}")
                                                                                                                                                                                              - *             .isReturn(true)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              *
                                                                                                                                                                                              @@ -25,112 +22,128 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TrackingDataBuilder implements Builder { + @Nullable private String trackingId; + @Nullable private String carrier; + @Nullable private String provider; + @Nullable private String providerTransaction; + @Nullable private Boolean isReturn; /** - *

                                                                                                                                                                                              The ID to track one parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier to track the Parcel.

                                                                                                                                                                                              * @param trackingId value to be set * @return Builder */ - public TrackingDataBuilder trackingId(final String trackingId) { + public TrackingDataBuilder trackingId(@Nullable final String trackingId) { this.trackingId = trackingId; return this; } /** - *

                                                                                                                                                                                              The carrier that delivers the parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the carrier that delivers the Parcel.

                                                                                                                                                                                              * @param carrier value to be set * @return Builder */ - public TrackingDataBuilder carrier(final String carrier) { + public TrackingDataBuilder carrier(@Nullable final String carrier) { this.carrier = carrier; return this; } /** - * set the value to the provider + *

                                                                                                                                                                                              Name of the provider that serves as facade to several carriers.

                                                                                                                                                                                              * @param provider value to be set * @return Builder */ - public TrackingDataBuilder provider(final String provider) { + public TrackingDataBuilder provider(@Nullable final String provider) { this.provider = provider; return this; } /** - * set the value to the providerTransaction + *

                                                                                                                                                                                              Transaction identifier with the provider.

                                                                                                                                                                                              * @param providerTransaction value to be set * @return Builder */ - public TrackingDataBuilder providerTransaction(final String providerTransaction) { + public TrackingDataBuilder providerTransaction(@Nullable final String providerTransaction) { this.providerTransaction = providerTransaction; return this; } /** - *

                                                                                                                                                                                              Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • If true, the Parcel is being returned.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • If false, the Parcel is being delivered to the customer.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @param isReturn value to be set * @return Builder */ - public TrackingDataBuilder isReturn(final Boolean isReturn) { + public TrackingDataBuilder isReturn(@Nullable final Boolean isReturn) { this.isReturn = isReturn; return this; } /** - *

                                                                                                                                                                                              The ID to track one parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier to track the Parcel.

                                                                                                                                                                                              * @return trackingId */ + @Nullable public String getTrackingId() { return this.trackingId; } /** - *

                                                                                                                                                                                              The carrier that delivers the parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the carrier that delivers the Parcel.

                                                                                                                                                                                              * @return carrier */ + @Nullable public String getCarrier() { return this.carrier; } /** - * value of provider} + *

                                                                                                                                                                                              Name of the provider that serves as facade to several carriers.

                                                                                                                                                                                              * @return provider */ + @Nullable public String getProvider() { return this.provider; } /** - * value of providerTransaction} + *

                                                                                                                                                                                              Transaction identifier with the provider.

                                                                                                                                                                                              * @return providerTransaction */ + @Nullable public String getProviderTransaction() { return this.providerTransaction; } /** - *

                                                                                                                                                                                              Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • If true, the Parcel is being returned.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • If false, the Parcel is being delivered to the customer.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              * @return isReturn */ + @Nullable public Boolean getIsReturn() { return this.isReturn; } @@ -140,11 +153,6 @@ public Boolean getIsReturn() { * @return TrackingData */ public TrackingData build() { - Objects.requireNonNull(trackingId, TrackingData.class + ": trackingId is missing"); - Objects.requireNonNull(carrier, TrackingData.class + ": carrier is missing"); - Objects.requireNonNull(provider, TrackingData.class + ": provider is missing"); - Objects.requireNonNull(providerTransaction, TrackingData.class + ": providerTransaction is missing"); - Objects.requireNonNull(isReturn, TrackingData.class + ": isReturn is missing"); return new TrackingDataImpl(trackingId, carrier, provider, providerTransaction, isReturn); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataImpl.java index 1841f8fcf70..d39032c72f5 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TrackingDataImpl.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * TrackingData + *

                                                                                                                                                                                              Information that helps track a Parcel.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TrackingDataImpl implements TrackingData, ModelBase { @@ -54,7 +54,7 @@ public TrackingDataImpl() { } /** - *

                                                                                                                                                                                              The ID to track one parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier to track the Parcel.

                                                                                                                                                                                              */ public String getTrackingId() { @@ -62,7 +62,7 @@ public String getTrackingId() { } /** - *

                                                                                                                                                                                              The carrier that delivers the parcel.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Name of the carrier that delivers the Parcel.

                                                                                                                                                                                              */ public String getCarrier() { @@ -70,7 +70,7 @@ public String getCarrier() { } /** - * + *

                                                                                                                                                                                              Name of the provider that serves as facade to several carriers.

                                                                                                                                                                                              */ public String getProvider() { @@ -78,7 +78,7 @@ public String getProvider() { } /** - * + *

                                                                                                                                                                                              Transaction identifier with the provider.

                                                                                                                                                                                              */ public String getProviderTransaction() { @@ -86,7 +86,10 @@ public String getProviderTransaction() { } /** - *

                                                                                                                                                                                              Flag to distinguish if the parcel is on the way to the customer (false) or on the way back (true).

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • If true, the Parcel is being returned.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • If false, the Parcel is being delivered to the customer.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              */ public Boolean getIsReturn() { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Transaction.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Transaction.java index 978d23e4bb9..1c1a98b6209 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Transaction.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/Transaction.java @@ -2,6 +2,7 @@ package com.commercetools.history.models.common; import java.time.*; +import java.time.ZonedDateTime; import java.util.*; import java.util.function.Function; @@ -16,7 +17,7 @@ import jakarta.validation.constraints.NotNull; /** - * Transaction + *

                                                                                                                                                                                              Represents a financial transaction typically created as a result of a notification from the payment service.

                                                                                                                                                                                              * *
                                                                                                                                                                                              * Example to create an instance using the builder pattern @@ -24,10 +25,8 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Transaction transaction = Transaction.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .timestamp("{timestamp}")
                                                                                                                                                                                                *             .type(TransactionType.AUTHORIZATION)
                                                                                                                                                                                                *             .amount(amountBuilder -> amountBuilder)
                                                                                                                                                                                              - *             .interactionId("{interactionId}")
                                                                                                                                                                                                *             .state(TransactionState.INITIAL)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -46,15 +45,15 @@ public interface Transaction { public String getId(); /** - *

                                                                                                                                                                                              Time at which the transaction took place.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Date and time (UTC) the Transaction took place.

                                                                                                                                                                                              * @return timestamp */ - @NotNull + @JsonProperty("timestamp") - public String getTimestamp(); + public ZonedDateTime getTimestamp(); /** - * + *

                                                                                                                                                                                              Type of the Transaction. For example, Authorization.

                                                                                                                                                                                              * @return type */ @NotNull @@ -62,30 +61,38 @@ public interface Transaction { public TransactionType getType(); /** - * + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @return amount */ @NotNull @Valid @JsonProperty("amount") - public Money getAmount(); + public CentPrecisionMoney getAmount(); /** - *

                                                                                                                                                                                              Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

                                                                                                                                                                                              * @return interactionId */ - @NotNull + @JsonProperty("interactionId") public String getInteractionId(); /** - * + *

                                                                                                                                                                                              State of the Transaction.

                                                                                                                                                                                              * @return state */ @NotNull @JsonProperty("state") public TransactionState getState(); + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @return custom + */ + @Valid + @JsonProperty("custom") + public CustomFields getCustom(); + /** *

                                                                                                                                                                                              Unique identifier of the Transaction.

                                                                                                                                                                                              * @param id value to be set @@ -94,40 +101,47 @@ public interface Transaction { public void setId(final String id); /** - *

                                                                                                                                                                                              Time at which the transaction took place.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Date and time (UTC) the Transaction took place.

                                                                                                                                                                                              * @param timestamp value to be set */ - public void setTimestamp(final String timestamp); + public void setTimestamp(final ZonedDateTime timestamp); /** - * set type + *

                                                                                                                                                                                              Type of the Transaction. For example, Authorization.

                                                                                                                                                                                              * @param type value to be set */ public void setType(final TransactionType type); /** - * set amount + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @param amount value to be set */ - public void setAmount(final Money amount); + public void setAmount(final CentPrecisionMoney amount); /** - *

                                                                                                                                                                                              Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

                                                                                                                                                                                              * @param interactionId value to be set */ public void setInteractionId(final String interactionId); /** - * set state + *

                                                                                                                                                                                              State of the Transaction.

                                                                                                                                                                                              * @param state value to be set */ public void setState(final TransactionState state); + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @param custom value to be set + */ + + public void setCustom(final CustomFields custom); + /** * factory method * @return instance of Transaction @@ -149,6 +163,7 @@ public static Transaction of(final Transaction template) { instance.setAmount(template.getAmount()); instance.setInteractionId(template.getInteractionId()); instance.setState(template.getState()); + instance.setCustom(template.getCustom()); return instance; } @@ -168,9 +183,10 @@ public static Transaction deepCopy(@Nullable final Transaction template) { instance.setId(template.getId()); instance.setTimestamp(template.getTimestamp()); instance.setType(template.getType()); - instance.setAmount(com.commercetools.history.models.common.Money.deepCopy(template.getAmount())); + instance.setAmount(com.commercetools.history.models.common.CentPrecisionMoney.deepCopy(template.getAmount())); instance.setInteractionId(template.getInteractionId()); instance.setState(template.getState()); + instance.setCustom(com.commercetools.history.models.common.CustomFields.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionBuilder.java index 4fa75b60459..a55794c0580 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionBuilder.java @@ -4,6 +4,8 @@ import java.util.*; import java.util.function.Function; +import javax.annotation.Nullable; + import io.vrap.rmf.base.client.Builder; import io.vrap.rmf.base.client.utils.Generated; @@ -15,10 +17,8 @@ *
                                                                                                                                                                                              
                                                                                                                                                                                                *     Transaction transaction = Transaction.builder()
                                                                                                                                                                                                *             .id("{id}")
                                                                                                                                                                                              - *             .timestamp("{timestamp}")
                                                                                                                                                                                                *             .type(TransactionType.AUTHORIZATION)
                                                                                                                                                                                                *             .amount(amountBuilder -> amountBuilder)
                                                                                                                                                                                              - *             .interactionId("{interactionId}")
                                                                                                                                                                                                *             .state(TransactionState.INITIAL)
                                                                                                                                                                                                *             .build()
                                                                                                                                                                                                * 
                                                                                                                                                                                              @@ -29,16 +29,21 @@ public class TransactionBuilder implements Builder { private String id; - private String timestamp; + @Nullable + private java.time.ZonedDateTime timestamp; private com.commercetools.history.models.common.TransactionType type; - private com.commercetools.history.models.common.Money amount; + private com.commercetools.history.models.common.CentPrecisionMoney amount; + @Nullable private String interactionId; private com.commercetools.history.models.common.TransactionState state; + @Nullable + private com.commercetools.history.models.common.CustomFields custom; + /** *

                                                                                                                                                                                              Unique identifier of the Transaction.

                                                                                                                                                                                              * @param id value to be set @@ -51,18 +56,18 @@ public TransactionBuilder id(final String id) { } /** - *

                                                                                                                                                                                              Time at which the transaction took place.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Date and time (UTC) the Transaction took place.

                                                                                                                                                                                              * @param timestamp value to be set * @return Builder */ - public TransactionBuilder timestamp(final String timestamp) { + public TransactionBuilder timestamp(@Nullable final java.time.ZonedDateTime timestamp) { this.timestamp = timestamp; return this; } /** - * set the value to the type + *

                                                                                                                                                                                              Type of the Transaction. For example, Authorization.

                                                                                                                                                                                              * @param type value to be set * @return Builder */ @@ -73,53 +78,53 @@ public TransactionBuilder type(final com.commercetools.history.models.common.Tra } /** - * set the value to the amount using the builder function + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @param builder function to build the amount value * @return Builder */ public TransactionBuilder amount( - Function builder) { - this.amount = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()).build(); + Function builder) { + this.amount = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()).build(); return this; } /** - * set the value to the amount using the builder function + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @param builder function to build the amount value * @return Builder */ public TransactionBuilder withAmount( - Function builder) { - this.amount = builder.apply(com.commercetools.history.models.common.MoneyBuilder.of()); + Function builder) { + this.amount = builder.apply(com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of()); return this; } /** - * set the value to the amount + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @param amount value to be set * @return Builder */ - public TransactionBuilder amount(final com.commercetools.history.models.common.Money amount) { + public TransactionBuilder amount(final com.commercetools.history.models.common.CentPrecisionMoney amount) { this.amount = amount; return this; } /** - *

                                                                                                                                                                                              Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

                                                                                                                                                                                              * @param interactionId value to be set * @return Builder */ - public TransactionBuilder interactionId(final String interactionId) { + public TransactionBuilder interactionId(@Nullable final String interactionId) { this.interactionId = interactionId; return this; } /** - * set the value to the state + *

                                                                                                                                                                                              State of the Transaction.

                                                                                                                                                                                              * @param state value to be set * @return Builder */ @@ -129,6 +134,41 @@ public TransactionBuilder state(final com.commercetools.history.models.common.Tr return this; } + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public TransactionBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()).build(); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @param builder function to build the custom value + * @return Builder + */ + + public TransactionBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.history.models.common.CustomFieldsBuilder.of()); + return this; + } + + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @param custom value to be set + * @return Builder + */ + + public TransactionBuilder custom(@Nullable final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + return this; + } + /** *

                                                                                                                                                                                              Unique identifier of the Transaction.

                                                                                                                                                                                              * @return id @@ -139,16 +179,17 @@ public String getId() { } /** - *

                                                                                                                                                                                              Time at which the transaction took place.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Date and time (UTC) the Transaction took place.

                                                                                                                                                                                              * @return timestamp */ - public String getTimestamp() { + @Nullable + public java.time.ZonedDateTime getTimestamp() { return this.timestamp; } /** - * value of type} + *

                                                                                                                                                                                              Type of the Transaction. For example, Authorization.

                                                                                                                                                                                              * @return type */ @@ -157,25 +198,26 @@ public com.commercetools.history.models.common.TransactionType getType() { } /** - * value of amount} + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              * @return amount */ - public com.commercetools.history.models.common.Money getAmount() { + public com.commercetools.history.models.common.CentPrecisionMoney getAmount() { return this.amount; } /** - *

                                                                                                                                                                                              Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

                                                                                                                                                                                              * @return interactionId */ + @Nullable public String getInteractionId() { return this.interactionId; } /** - * value of state} + *

                                                                                                                                                                                              State of the Transaction.

                                                                                                                                                                                              * @return state */ @@ -183,18 +225,26 @@ public com.commercetools.history.models.common.TransactionState getState() { return this.state; } + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + * @return custom + */ + + @Nullable + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + /** * builds Transaction with checking for non-null required values * @return Transaction */ public Transaction build() { Objects.requireNonNull(id, Transaction.class + ": id is missing"); - Objects.requireNonNull(timestamp, Transaction.class + ": timestamp is missing"); Objects.requireNonNull(type, Transaction.class + ": type is missing"); Objects.requireNonNull(amount, Transaction.class + ": amount is missing"); - Objects.requireNonNull(interactionId, Transaction.class + ": interactionId is missing"); Objects.requireNonNull(state, Transaction.class + ": state is missing"); - return new TransactionImpl(id, timestamp, type, amount, interactionId, state); + return new TransactionImpl(id, timestamp, type, amount, interactionId, state, custom); } /** @@ -202,7 +252,7 @@ public Transaction build() { * @return Transaction */ public Transaction buildUnchecked() { - return new TransactionImpl(id, timestamp, type, amount, interactionId, state); + return new TransactionImpl(id, timestamp, type, amount, interactionId, state, custom); } /** @@ -226,6 +276,7 @@ public static TransactionBuilder of(final Transaction template) { builder.amount = template.getAmount(); builder.interactionId = template.getInteractionId(); builder.state = template.getState(); + builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionImpl.java index fdd3b0614ac..cc9e4c6676a 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionImpl.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionImpl.java @@ -17,38 +17,43 @@ import org.apache.commons.lang3.builder.ToStringStyle; /** - * Transaction + *

                                                                                                                                                                                              Represents a financial transaction typically created as a result of a notification from the payment service.

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class TransactionImpl implements Transaction, ModelBase { private String id; - private String timestamp; + private java.time.ZonedDateTime timestamp; private com.commercetools.history.models.common.TransactionType type; - private com.commercetools.history.models.common.Money amount; + private com.commercetools.history.models.common.CentPrecisionMoney amount; private String interactionId; private com.commercetools.history.models.common.TransactionState state; + private com.commercetools.history.models.common.CustomFields custom; + /** * create instance with all properties */ @JsonCreator - TransactionImpl(@JsonProperty("id") final String id, @JsonProperty("timestamp") final String timestamp, + TransactionImpl(@JsonProperty("id") final String id, + @JsonProperty("timestamp") final java.time.ZonedDateTime timestamp, @JsonProperty("type") final com.commercetools.history.models.common.TransactionType type, - @JsonProperty("amount") final com.commercetools.history.models.common.Money amount, + @JsonProperty("amount") final com.commercetools.history.models.common.CentPrecisionMoney amount, @JsonProperty("interactionId") final String interactionId, - @JsonProperty("state") final com.commercetools.history.models.common.TransactionState state) { + @JsonProperty("state") final com.commercetools.history.models.common.TransactionState state, + @JsonProperty("custom") final com.commercetools.history.models.common.CustomFields custom) { this.id = id; this.timestamp = timestamp; this.type = type; this.amount = amount; this.interactionId = interactionId; this.state = state; + this.custom = custom; } /** @@ -66,15 +71,15 @@ public String getId() { } /** - *

                                                                                                                                                                                              Time at which the transaction took place.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Date and time (UTC) the Transaction took place.

                                                                                                                                                                                              */ - public String getTimestamp() { + public java.time.ZonedDateTime getTimestamp() { return this.timestamp; } /** - * + *

                                                                                                                                                                                              Type of the Transaction. For example, Authorization.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.TransactionType getType() { @@ -82,15 +87,15 @@ public com.commercetools.history.models.common.TransactionType getType() { } /** - * + *

                                                                                                                                                                                              Money value of the Transaction.

                                                                                                                                                                                              */ - public com.commercetools.history.models.common.Money getAmount() { + public com.commercetools.history.models.common.CentPrecisionMoney getAmount() { return this.amount; } /** - *

                                                                                                                                                                                              Identifier used by the interface that manages the transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction should be findable with this ID.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

                                                                                                                                                                                              */ public String getInteractionId() { @@ -98,18 +103,26 @@ public String getInteractionId() { } /** - * + *

                                                                                                                                                                                              State of the Transaction.

                                                                                                                                                                                              */ public com.commercetools.history.models.common.TransactionState getState() { return this.state; } + /** + *

                                                                                                                                                                                              Custom Fields defined for the Transaction.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.CustomFields getCustom() { + return this.custom; + } + public void setId(final String id) { this.id = id; } - public void setTimestamp(final String timestamp) { + public void setTimestamp(final java.time.ZonedDateTime timestamp) { this.timestamp = timestamp; } @@ -117,7 +130,7 @@ public void setType(final com.commercetools.history.models.common.TransactionTyp this.type = type; } - public void setAmount(final com.commercetools.history.models.common.Money amount) { + public void setAmount(final com.commercetools.history.models.common.CentPrecisionMoney amount) { this.amount = amount; } @@ -129,6 +142,10 @@ public void setState(final com.commercetools.history.models.common.TransactionSt this.state = state; } + public void setCustom(final com.commercetools.history.models.common.CustomFields custom) { + this.custom = custom; + } + @Override public boolean equals(Object o) { if (this == o) @@ -145,12 +162,14 @@ public boolean equals(Object o) { .append(amount, that.amount) .append(interactionId, that.interactionId) .append(state, that.state) + .append(custom, that.custom) .append(id, that.id) .append(timestamp, that.timestamp) .append(type, that.type) .append(amount, that.amount) .append(interactionId, that.interactionId) .append(state, that.state) + .append(custom, that.custom) .isEquals(); } @@ -162,6 +181,7 @@ public int hashCode() { .append(amount) .append(interactionId) .append(state) + .append(custom) .toHashCode(); } @@ -173,6 +193,7 @@ public String toString() { .append("amount", amount) .append("interactionId", interactionId) .append("state", state) + .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionState.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionState.java index dc545d8509d..18496df54d1 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionState.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TransactionState.java @@ -11,7 +11,7 @@ import io.vrap.rmf.base.client.utils.Generated; /** - * TransactionState + *

                                                                                                                                                                                              Transactions can be in one of the following States:

                                                                                                                                                                                              */ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public interface TransactionState extends JsonEnum { diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReference.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReference.java new file mode 100644 index 00000000000..0a7c2f12980 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReference.java @@ -0,0 +1,130 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Reference to a Type.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TypeReference typeReference = TypeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@io.vrap.rmf.base.client.utils.json.SubType("type") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = TypeReferenceImpl.class) +public interface TypeReference extends Reference { + + /** + * discriminator value for TypeReference + */ + String TYPE = "type"; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Type.

                                                                                                                                                                                              + * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Type.

                                                                                                                                                                                              + * @param id value to be set + */ + + public void setId(final String id); + + /** + * factory method + * @return instance of TypeReference + */ + public static TypeReference of() { + return new TypeReferenceImpl(); + } + + /** + * factory method to create a shallow copy TypeReference + * @param template instance to be copied + * @return copy instance + */ + public static TypeReference of(final TypeReference template) { + TypeReferenceImpl instance = new TypeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + public TypeReference copyDeep(); + + /** + * factory method to create a deep copy of TypeReference + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TypeReference deepCopy(@Nullable final TypeReference template) { + if (template == null) { + return null; + } + TypeReferenceImpl instance = new TypeReferenceImpl(); + instance.setId(template.getId()); + return instance; + } + + /** + * builder factory method for TypeReference + * @return builder + */ + public static TypeReferenceBuilder builder() { + return TypeReferenceBuilder.of(); + } + + /** + * create builder for TypeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TypeReferenceBuilder builder(final TypeReference template) { + return TypeReferenceBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTypeReference(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/TypeReferenceBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReferenceBuilder.java new file mode 100644 index 00000000000..7c05fbeb0e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReferenceBuilder.java @@ -0,0 +1,82 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TypeReferenceBuilder + *
                                                                                                                                                                                              + * Example to create an instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TypeReference typeReference = TypeReference.builder()
                                                                                                                                                                                              + *             .id("{id}")
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TypeReferenceBuilder implements Builder { + + private String id; + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Type.

                                                                                                                                                                                              + * @param id value to be set + * @return Builder + */ + + public TypeReferenceBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Type.

                                                                                                                                                                                              + * @return id + */ + + public String getId() { + return this.id; + } + + /** + * builds TypeReference with checking for non-null required values + * @return TypeReference + */ + public TypeReference build() { + Objects.requireNonNull(id, TypeReference.class + ": id is missing"); + return new TypeReferenceImpl(id); + } + + /** + * builds TypeReference without checking for non-null required values + * @return TypeReference + */ + public TypeReference buildUnchecked() { + return new TypeReferenceImpl(id); + } + + /** + * factory method for an instance of TypeReferenceBuilder + * @return builder + */ + public static TypeReferenceBuilder of() { + return new TypeReferenceBuilder(); + } + + /** + * create builder for TypeReference instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static TypeReferenceBuilder of(final TypeReference template) { + TypeReferenceBuilder builder = new TypeReferenceBuilder(); + builder.id = template.getId(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReferenceImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReferenceImpl.java new file mode 100644 index 00000000000..f34ab9005a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeReferenceImpl.java @@ -0,0 +1,98 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Reference to a Type.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TypeReferenceImpl implements TypeReference, ModelBase { + + private com.commercetools.history.models.common.ReferenceTypeId typeId; + + private String id; + + /** + * create instance with all properties + */ + @JsonCreator + TypeReferenceImpl(@JsonProperty("id") final String id) { + this.id = id; + this.typeId = ReferenceTypeId.findEnum("type"); + } + + /** + * create empty instance + */ + public TypeReferenceImpl() { + this.typeId = ReferenceTypeId.findEnum("type"); + } + + /** + *

                                                                                                                                                                                              Type of referenced resource.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.ReferenceTypeId getTypeId() { + return this.typeId; + } + + /** + *

                                                                                                                                                                                              Unique identifier of the referenced Type.

                                                                                                                                                                                              + */ + + public String getId() { + return this.id; + } + + public void setId(final String id) { + this.id = id; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TypeReferenceImpl that = (TypeReferenceImpl) o; + + return new EqualsBuilder().append(typeId, that.typeId) + .append(id, that.id) + .append(typeId, that.typeId) + .append(id, that.id) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) + .append("id", id) + .build(); + } + + @Override + public TypeReference copyDeep() { + return TypeReference.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeTextInputHint.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeTextInputHint.java new file mode 100644 index 00000000000..c4dab7813c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypeTextInputHint.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; + +/** + *

                                                                                                                                                                                              Provides a visual representation type for this field. It is only relevant for string-based field types like CustomFieldStringType and CustomFieldLocalizedStringType. Following values are supported:

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface TypeTextInputHint extends JsonEnum { + + TypeTextInputHint SINGLE_LINE = TypeTextInputHintEnum.SINGLE_LINE; + + TypeTextInputHint MULTI_LINE = TypeTextInputHintEnum.MULTI_LINE; + + /** + * possible values of TypeTextInputHint + */ + enum TypeTextInputHintEnum implements TypeTextInputHint { + /** + * SingleLine + */ + SINGLE_LINE("SingleLine"), + + /** + * MultiLine + */ + MULTI_LINE("MultiLine"); + private final String jsonName; + + private TypeTextInputHintEnum(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 TypeTextInputHint + * 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 TypeTextInputHint findEnum(String value) { + return findEnumViaJsonName(value).orElse(new TypeTextInputHint() { + @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 TypeTextInputHint[] values() { + return TypeTextInputHintEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoney.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoney.java new file mode 100644 index 00000000000..4e14c67b0be --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoney.java @@ -0,0 +1,121 @@ + +package com.commercetools.history.models.common; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

                                                                                                                                                                                              Base polymorphic read-only money type that stores currency in cent precision or high precision, that is in sub-cents.

                                                                                                                                                                                              + * + *
                                                                                                                                                                                              + * Example to create a subtype instance using the builder pattern + *
                                                                                                                                                                                              + *
                                                                                                                                                                                              
                                                                                                                                                                                              + *     TypedMoney typedMoney = TypedMoney.centPrecisionBuilder()
                                                                                                                                                                                              + *             centAmount(0.3)
                                                                                                                                                                                              + *             currencyCode("{currencyCode}")
                                                                                                                                                                                              + *             fractionDigits(0.3)
                                                                                                                                                                                              + *             .build()
                                                                                                                                                                                              + * 
                                                                                                                                                                                              + *
                                                                                                                                                                                              + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = TypedMoneyImpl.class, visible = true) +@JsonDeserialize(as = TypedMoneyImpl.class) +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface TypedMoney extends Money { + + /** + *

                                                                                                                                                                                              Type of money used.

                                                                                                                                                                                              + * @return type + */ + @NotNull + @JsonProperty("type") + public MoneyType getType(); + + /** + *

                                                                                                                                                                                              Number of digits after the decimal separator.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For CentPrecisionMoney, it is equal to the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For HighPrecisionMoney, it is greater than the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @return fractionDigits + */ + @NotNull + @JsonProperty("fractionDigits") + public Integer getFractionDigits(); + + /** + *

                                                                                                                                                                                              Number of digits after the decimal separator.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For CentPrecisionMoney, it is equal to the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For HighPrecisionMoney, it is greater than the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + * @param fractionDigits value to be set + */ + + public void setFractionDigits(final Integer fractionDigits); + + public TypedMoney copyDeep(); + + /** + * factory method to create a deep copy of TypedMoney + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static TypedMoney deepCopy(@Nullable final TypedMoney template) { + if (template == null) { + return null; + } + + if (!(template instanceof TypedMoneyImpl)) { + return template.copyDeep(); + } + TypedMoneyImpl instance = new TypedMoneyImpl(); + instance.setCentAmount(template.getCentAmount()); + instance.setCurrencyCode(template.getCurrencyCode()); + instance.setFractionDigits(template.getFractionDigits()); + return instance; + } + + /** + * builder for centPrecision subtype + * @return builder + */ + public static com.commercetools.history.models.common.CentPrecisionMoneyBuilder centPrecisionBuilder() { + return com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of(); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withTypedMoney(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/TypedMoneyBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoneyBuilder.java new file mode 100644 index 00000000000..2699bc272f0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoneyBuilder.java @@ -0,0 +1,26 @@ + +package com.commercetools.history.models.common; + +import java.util.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * TypedMoneyBuilder + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TypedMoneyBuilder { + + public com.commercetools.history.models.common.CentPrecisionMoneyBuilder centPrecisionBuilder() { + return com.commercetools.history.models.common.CentPrecisionMoneyBuilder.of(); + } + + /** + * factory method for an instance of TypedMoneyBuilder + * @return builder + */ + public static TypedMoneyBuilder of() { + return new TypedMoneyBuilder(); + } + +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoneyImpl.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoneyImpl.java new file mode 100644 index 00000000000..939747ce767 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/common/TypedMoneyImpl.java @@ -0,0 +1,148 @@ + +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; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

                                                                                                                                                                                              Base polymorphic read-only money type that stores currency in cent precision or high precision, that is in sub-cents.

                                                                                                                                                                                              + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class TypedMoneyImpl implements TypedMoney, ModelBase { + + private Long centAmount; + + private String currencyCode; + + private com.commercetools.history.models.common.MoneyType type; + + private Integer fractionDigits; + + /** + * create instance with all properties + */ + @JsonCreator + TypedMoneyImpl(@JsonProperty("centAmount") final Long centAmount, + @JsonProperty("currencyCode") final String currencyCode, + @JsonProperty("type") final com.commercetools.history.models.common.MoneyType type, + @JsonProperty("fractionDigits") final Integer fractionDigits) { + this.centAmount = centAmount; + this.currencyCode = currencyCode; + this.type = type; + this.fractionDigits = fractionDigits; + } + + /** + * create empty instance + */ + public TypedMoneyImpl() { + } + + /** + *

                                                                                                                                                                                              Amount in the smallest indivisible unit of a currency, such as:

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • Cents for EUR and USD, pence for GBP, or centime for CHF (5 CHF is specified as 500).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • The value in the major unit for currencies without minor units, like JPY (5 JPY is specified as 5).
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + */ + + public Long getCentAmount() { + return this.centAmount; + } + + /** + *

                                                                                                                                                                                              Currency code compliant to ISO 4217.

                                                                                                                                                                                              + */ + + public String getCurrencyCode() { + return this.currencyCode; + } + + /** + *

                                                                                                                                                                                              Type of money used.

                                                                                                                                                                                              + */ + + public com.commercetools.history.models.common.MoneyType getType() { + return this.type; + } + + /** + *

                                                                                                                                                                                              Number of digits after the decimal separator.

                                                                                                                                                                                              + *
                                                                                                                                                                                                + *
                                                                                                                                                                                              • For CentPrecisionMoney, it is equal to the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              • For HighPrecisionMoney, it is greater than the default number of fraction digits for a currency.
                                                                                                                                                                                              • + *
                                                                                                                                                                                              + */ + + public Integer getFractionDigits() { + return this.fractionDigits; + } + + public void setCentAmount(final Long centAmount) { + this.centAmount = centAmount; + } + + public void setCurrencyCode(final String currencyCode) { + this.currencyCode = currencyCode; + } + + public void setFractionDigits(final Integer fractionDigits) { + this.fractionDigits = fractionDigits; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + TypedMoneyImpl that = (TypedMoneyImpl) o; + + return new EqualsBuilder().append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .append(type, that.type) + .append(fractionDigits, that.fractionDigits) + .append(centAmount, that.centAmount) + .append(currencyCode, that.currencyCode) + .append(type, that.type) + .append(fractionDigits, that.fractionDigits) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(centAmount) + .append(currencyCode) + .append(type) + .append(fractionDigits) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("centAmount", centAmount) + .append("currencyCode", currencyCode) + .append("type", type) + .append("fractionDigits", fractionDigits) + .build(); + } + + @Override + public TypedMoney copyDeep() { + return TypedMoney.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteLabelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteLabelBuilder.java index 4c1fe503409..b2c16a93848 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteLabelBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteLabelBuilder.java @@ -46,13 +46,12 @@ public QuoteLabelBuilder key(final String key) { /** *

                                                                                                                                                                                              The Buyer who requested the Quote.

                                                                                                                                                                                              - * @param builder function to build the customer value + * @param customer value to be set * @return Builder */ - public QuoteLabelBuilder customer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public QuoteLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; return this; } @@ -62,20 +61,20 @@ public QuoteLabelBuilder customer( * @return Builder */ - public QuoteLabelBuilder withCustomer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public QuoteLabelBuilder customer( + Function> builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              The Buyer who requested the Quote.

                                                                                                                                                                                              - * @param customer value to be set + *

                                                                                                                                                                                              Staged Quote related to the Quote.

                                                                                                                                                                                              + * @param stagedQuote value to be set * @return Builder */ - public QuoteLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { - this.customer = customer; + public QuoteLabelBuilder stagedQuote(final com.commercetools.history.models.common.Reference stagedQuote) { + this.stagedQuote = stagedQuote; return this; } @@ -86,31 +85,19 @@ public QuoteLabelBuilder customer(final com.commercetools.history.models.common. */ public QuoteLabelBuilder stagedQuote( - Function builder) { + Function> builder) { this.stagedQuote = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              Staged Quote related to the Quote.

                                                                                                                                                                                              - * @param builder function to build the stagedQuote value - * @return Builder - */ - - public QuoteLabelBuilder withStagedQuote( - Function builder) { - this.stagedQuote = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Staged Quote related to the Quote.

                                                                                                                                                                                              - * @param stagedQuote value to be set + *

                                                                                                                                                                                              Quote Request related to the Quote.

                                                                                                                                                                                              + * @param quoteRequest value to be set * @return Builder */ - public QuoteLabelBuilder stagedQuote(final com.commercetools.history.models.common.Reference stagedQuote) { - this.stagedQuote = stagedQuote; + public QuoteLabelBuilder quoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) { + this.quoteRequest = quoteRequest; return this; } @@ -121,34 +108,11 @@ public QuoteLabelBuilder stagedQuote(final com.commercetools.history.models.comm */ public QuoteLabelBuilder quoteRequest( - Function builder) { + Function> builder) { this.quoteRequest = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } - /** - *

                                                                                                                                                                                              Quote Request related to the Quote.

                                                                                                                                                                                              - * @param builder function to build the quoteRequest value - * @return Builder - */ - - public QuoteLabelBuilder withQuoteRequest( - Function builder) { - this.quoteRequest = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Quote Request related to the Quote.

                                                                                                                                                                                              - * @param quoteRequest value to be set - * @return Builder - */ - - public QuoteLabelBuilder quoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) { - this.quoteRequest = quoteRequest; - return this; - } - /** *

                                                                                                                                                                                              User-defined unique identifier of the Quote.

                                                                                                                                                                                              * @return key diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteRequestLabelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteRequestLabelBuilder.java index ceca4d27c76..8e624af7154 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteRequestLabelBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/QuoteRequestLabelBuilder.java @@ -40,13 +40,12 @@ public QuoteRequestLabelBuilder key(final String key) { /** *

                                                                                                                                                                                              The Buyer who raised the Quote Request.

                                                                                                                                                                                              - * @param builder function to build the customer value + * @param customer value to be set * @return Builder */ - public QuoteRequestLabelBuilder customer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public QuoteRequestLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; return this; } @@ -56,20 +55,9 @@ public QuoteRequestLabelBuilder customer( * @return Builder */ - public QuoteRequestLabelBuilder withCustomer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              The Buyer who raised the Quote Request.

                                                                                                                                                                                              - * @param customer value to be set - * @return Builder - */ - - public QuoteRequestLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { - this.customer = customer; + public QuoteRequestLabelBuilder customer( + Function> builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/StagedQuoteLabelBuilder.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/StagedQuoteLabelBuilder.java index e1fac018049..a4bca30de74 100644 --- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/StagedQuoteLabelBuilder.java +++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/models/label/StagedQuoteLabelBuilder.java @@ -43,13 +43,12 @@ public StagedQuoteLabelBuilder key(final String key) { /** *

                                                                                                                                                                                              The Buyer who requested the Quote.

                                                                                                                                                                                              - * @param builder function to build the customer value + * @param customer value to be set * @return Builder */ - public StagedQuoteLabelBuilder customer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); + public StagedQuoteLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { + this.customer = customer; return this; } @@ -59,20 +58,20 @@ public StagedQuoteLabelBuilder customer( * @return Builder */ - public StagedQuoteLabelBuilder withCustomer( - Function builder) { - this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); + public StagedQuoteLabelBuilder customer( + Function> builder) { + this.customer = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } /** - *

                                                                                                                                                                                              The Buyer who requested the Quote.

                                                                                                                                                                                              - * @param customer value to be set + *

                                                                                                                                                                                              Quote Request related to the Staged Quote.

                                                                                                                                                                                              + * @param quoteRequest value to be set * @return Builder */ - public StagedQuoteLabelBuilder customer(final com.commercetools.history.models.common.Reference customer) { - this.customer = customer; + public StagedQuoteLabelBuilder quoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) { + this.quoteRequest = quoteRequest; return this; } @@ -83,34 +82,11 @@ public StagedQuoteLabelBuilder customer(final com.commercetools.history.models.c */ public StagedQuoteLabelBuilder quoteRequest( - Function builder) { + Function> builder) { this.quoteRequest = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()).build(); return this; } - /** - *

                                                                                                                                                                                              Quote Request related to the Staged Quote.

                                                                                                                                                                                              - * @param builder function to build the quoteRequest value - * @return Builder - */ - - public StagedQuoteLabelBuilder withQuoteRequest( - Function builder) { - this.quoteRequest = builder.apply(com.commercetools.history.models.common.ReferenceBuilder.of()); - return this; - } - - /** - *

                                                                                                                                                                                              Quote Request related to the Staged Quote.

                                                                                                                                                                                              - * @param quoteRequest value to be set - * @return Builder - */ - - public StagedQuoteLabelBuilder quoteRequest(final com.commercetools.history.models.common.Reference quoteRequest) { - this.quoteRequest = quoteRequest; - return this; - } - /** *

                                                                                                                                                                                              User-defined unique identifier of the Staged Quote.

                                                                                                                                                                                              * @return key diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddAssetChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddAssetChangeTest.java index c6c954816c0..90ac0e92ed5 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddAssetChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddAssetChangeTest.java @@ -21,7 +21,9 @@ public static Object[][] objectBuilder() { AddAssetChange.builder() .previousValue(new com.commercetools.history.models.common.AssetImpl()) }, new Object[] { "nextValue", - AddAssetChange.builder().nextValue(new com.commercetools.history.models.common.AssetImpl()) } }; + AddAssetChange.builder().nextValue(new com.commercetools.history.models.common.AssetImpl()) }, + new Object[] { "catalogData", AddAssetChange.builder().catalogData("catalogData") }, + new Object[] { "variant", AddAssetChange.builder().variant("variant") } }; } @Test @@ -45,4 +47,18 @@ public void nextValue() { value.setNextValue(new com.commercetools.history.models.common.AssetImpl()); Assertions.assertThat(value.getNextValue()).isEqualTo(new com.commercetools.history.models.common.AssetImpl()); } + + @Test + public void catalogData() { + AddAssetChange value = AddAssetChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + AddAssetChange value = AddAssetChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddEnumValueChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddEnumValueChangeTest.java index 2098a79bbd0..f2a3ce39276 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddEnumValueChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddEnumValueChangeTest.java @@ -19,8 +19,9 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", AddEnumValueChange.builder().change("change") }, new Object[] { "nextValue", AddEnumValueChange.builder() - .nextValue(new com.commercetools.history.models.change_value.EnumValueImpl()) }, - new Object[] { "fieldName", AddEnumValueChange.builder().fieldName("fieldName") } }; + .nextValue(new com.commercetools.history.models.common.CustomFieldEnumValueImpl()) }, + new Object[] { "fieldName", AddEnumValueChange.builder().fieldName("fieldName") }, + new Object[] { "attributeName", AddEnumValueChange.builder().attributeName("attributeName") } }; } @Test @@ -33,9 +34,9 @@ public void change() { @Test public void nextValue() { AddEnumValueChange value = AddEnumValueChange.of(); - value.setNextValue(new com.commercetools.history.models.change_value.EnumValueImpl()); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldEnumValueImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.change_value.EnumValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.CustomFieldEnumValueImpl()); } @Test @@ -44,4 +45,11 @@ public void fieldName() { value.setFieldName("fieldName"); Assertions.assertThat(value.getFieldName()).isEqualTo("fieldName"); } + + @Test + public void attributeName() { + AddEnumValueChange value = AddEnumValueChange.of(); + value.setAttributeName("attributeName"); + Assertions.assertThat(value.getAttributeName()).isEqualTo("attributeName"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddExternalImageChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddExternalImageChangeTest.java index fcd9dac959a..d713d9cd2aa 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddExternalImageChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddExternalImageChangeTest.java @@ -27,7 +27,8 @@ public static Object[][] objectBuilder() { AddExternalImageChange.builder() .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ImageImpl())) }, - new Object[] { "catalogData", AddExternalImageChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", AddExternalImageChange.builder().catalogData("catalogData") }, + new Object[] { "variant", AddExternalImageChange.builder().variant("variant") } }; } @Test @@ -59,4 +60,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + AddExternalImageChange value = AddExternalImageChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeTest.java index a8eb44cce24..22f4d3c9ee7 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddInterfaceInteractionChangeTest.java @@ -18,8 +18,7 @@ public void buildUnchecked(String name, AddInterfaceInteractionChangeBuilder bui public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", AddInterfaceInteractionChange.builder().change("change") }, new Object[] { "nextValue", AddInterfaceInteractionChange.builder() - .nextValue( - new com.commercetools.history.models.change_value.CustomFieldExpandedValueImpl()) } }; + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; } @Test @@ -32,8 +31,8 @@ public void change() { @Test public void nextValue() { AddInterfaceInteractionChange value = AddInterfaceInteractionChange.of(); - value.setNextValue(new com.commercetools.history.models.change_value.CustomFieldExpandedValueImpl()); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.change_value.CustomFieldExpandedValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeTest.java index 0e8ba472a4c..9b9fc1937e3 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddLocalizedEnumValueChangeTest.java @@ -18,7 +18,7 @@ public void buildUnchecked(String name, AddLocalizedEnumValueChangeBuilder build public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", AddLocalizedEnumValueChange.builder().change("change") }, new Object[] { "nextValue", AddLocalizedEnumValueChange.builder() - .nextValue(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()) }, + .nextValue(new com.commercetools.history.models.common.CustomFieldLocalizedEnumValueImpl()) }, new Object[] { "fieldName", AddLocalizedEnumValueChange.builder().fieldName("fieldName") }, new Object[] { "attributeName", AddLocalizedEnumValueChange.builder().attributeName("attributeName") } }; @@ -34,9 +34,9 @@ public void change() { @Test public void nextValue() { AddLocalizedEnumValueChange value = AddLocalizedEnumValueChange.of(); - value.setNextValue(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldLocalizedEnumValueImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.CustomFieldLocalizedEnumValueImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddPriceChangeTest.java index 3c6bca5d3fb..f26f64ca306 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddPriceChangeTest.java @@ -20,7 +20,8 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", AddPriceChange.builder().nextValue(new com.commercetools.history.models.common.PriceImpl()) }, new Object[] { "catalogData", AddPriceChange.builder().catalogData("catalogData") }, - new Object[] { "priceId", AddPriceChange.builder().priceId("priceId") } }; + new Object[] { "priceId", AddPriceChange.builder().priceId("priceId") }, + new Object[] { "variant", AddPriceChange.builder().variant("variant") } }; } @Test @@ -50,4 +51,11 @@ public void priceId() { value.setPriceId("priceId"); Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); } + + @Test + public void variant() { + AddPriceChange value = AddPriceChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShippingChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShippingChangeTest.java new file mode 100644 index 00000000000..46716789bd1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShippingChangeTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AddShippingChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AddShippingChangeBuilder builder) { + AddShippingChange addShippingChange = builder.buildUnchecked(); + Assertions.assertThat(addShippingChange).isInstanceOf(AddShippingChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", AddShippingChange.builder().change("change") }, new Object[] { + "nextValue", + AddShippingChange.builder().nextValue(new com.commercetools.history.models.common.ShippingImpl()) } }; + } + + @Test + public void change() { + AddShippingChange value = AddShippingChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void nextValue() { + AddShippingChange value = AddShippingChange.of(); + value.setNextValue(new com.commercetools.history.models.common.ShippingImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ShippingImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeTest.java index fee8b41bb2f..63b5b388ec0 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddShoppingListLineItemChangeTest.java @@ -17,11 +17,10 @@ public void buildUnchecked(String name, AddShoppingListLineItemChangeBuilder bui public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", AddShoppingListLineItemChange.builder().change("change") }, - new Object[] { "previousValue", - AddShoppingListLineItemChange.builder() - .previousValue(new com.commercetools.history.models.common.LineItemImpl()) }, + new Object[] { "previousValue", AddShoppingListLineItemChange.builder() + .previousValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()) }, new Object[] { "nextValue", AddShoppingListLineItemChange.builder() - .nextValue(new com.commercetools.history.models.common.LineItemImpl()) } }; + .nextValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()) } }; } @Test @@ -34,16 +33,16 @@ public void change() { @Test public void previousValue() { AddShoppingListLineItemChange value = AddShoppingListLineItemChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.LineItemImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.LineItemImpl()); + .isEqualTo(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); } @Test public void nextValue() { AddShoppingListLineItemChange value = AddShoppingListLineItemChange.of(); - value.setNextValue(new com.commercetools.history.models.common.LineItemImpl()); + value.setNextValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.LineItemImpl()); + .isEqualTo(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddToCategoryChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddToCategoryChangeTest.java index 2ba6c3d9314..79df504b150 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddToCategoryChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/AddToCategoryChangeTest.java @@ -27,8 +27,10 @@ public static Object[][] objectBuilder() { AddToCategoryChange.builder() .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "category", AddToCategoryChange.builder() - .category(new com.commercetools.history.models.common.ReferenceImpl()) } }; + new Object[] { "category", + AddToCategoryChange.builder() + .category(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "catalogData", AddToCategoryChange.builder().catalogData("catalogData") } }; } @Test @@ -61,4 +63,11 @@ public void category() { Assertions.assertThat(value.getCategory()) .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); } + + @Test + public void catalogData() { + AddToCategoryChange value = AddToCategoryChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeTest.java new file mode 100644 index 00000000000..e5199fc0e30 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeApprovalRuleModeChangeTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeApprovalRuleModeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeApprovalRuleModeChangeBuilder builder) { + ChangeApprovalRuleModeChange changeApprovalRuleModeChange = builder.buildUnchecked(); + Assertions.assertThat(changeApprovalRuleModeChange).isInstanceOf(ChangeApprovalRuleModeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeApprovalRuleModeChange.builder().change("change") }, + new Object[] { "previousValue", + ChangeApprovalRuleModeChange.builder() + .previousValue(com.commercetools.history.models.common.BusinessUnitApprovalRuleMode + .findEnum("Explicit")) }, + new Object[] { "nextValue", + ChangeApprovalRuleModeChange.builder() + .nextValue(com.commercetools.history.models.common.BusinessUnitApprovalRuleMode + .findEnum("Explicit")) } }; + } + + @Test + public void change() { + ChangeApprovalRuleModeChange value = ChangeApprovalRuleModeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangeApprovalRuleModeChange value = ChangeApprovalRuleModeChange.of(); + value.setPreviousValue( + com.commercetools.history.models.common.BusinessUnitApprovalRuleMode.findEnum("Explicit")); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(com.commercetools.history.models.common.BusinessUnitApprovalRuleMode.findEnum("Explicit")); + } + + @Test + public void nextValue() { + ChangeApprovalRuleModeChange value = ChangeApprovalRuleModeChange.of(); + value.setNextValue(com.commercetools.history.models.common.BusinessUnitApprovalRuleMode.findEnum("Explicit")); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(com.commercetools.history.models.common.BusinessUnitApprovalRuleMode.findEnum("Explicit")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeTest.java index d4871f1d522..444010bc1f6 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetNameChangeTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", ChangeAssetNameChange.builder() .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "asset", ChangeAssetNameChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + ChangeAssetNameChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", ChangeAssetNameChange.builder().catalogData("catalogData") }, + new Object[] { "variant", ChangeAssetNameChange.builder().variant("variant") } }; } @Test @@ -57,4 +60,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + ChangeAssetNameChange value = ChangeAssetNameChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + ChangeAssetNameChange value = ChangeAssetNameChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeTest.java index 07da6bdbdce..f039c983e42 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeAssetOrderChangeTest.java @@ -26,7 +26,9 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", ChangeAssetOrderChange.builder() .nextValue(Collections.singletonList( - new com.commercetools.history.models.common.LocalizedStringImpl())) } }; + new com.commercetools.history.models.common.LocalizedStringImpl())) }, + new Object[] { "catalogData", ChangeAssetOrderChange.builder().catalogData("catalogData") }, + new Object[] { "variant", ChangeAssetOrderChange.builder().variant("variant") } }; } @Test @@ -55,4 +57,18 @@ public void nextValue() { .isEqualTo( Collections.singletonList(new com.commercetools.history.models.common.LocalizedStringImpl())); } + + @Test + public void catalogData() { + ChangeAssetOrderChange value = ChangeAssetOrderChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + ChangeAssetOrderChange value = ChangeAssetOrderChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeTest.java index e699a4d2f26..d6fa102259a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCartDiscountsChangeTest.java @@ -23,8 +23,16 @@ public static Object[][] objectBuilder() { ChangeCartDiscountsChange.builder() .previousValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "nextValue", ChangeCartDiscountsChange.builder() - .nextValue( + new Object[] { "nextValue", + ChangeCartDiscountsChange.builder() + .nextValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "addedItems", + ChangeCartDiscountsChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "removedItems", ChangeCartDiscountsChange.builder() + .removedItems( Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; } @@ -50,4 +58,20 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); } + + @Test + public void addedItems() { + ChangeCartDiscountsChange value = ChangeCartDiscountsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void removedItems() { + ChangeCartDiscountsChange value = ChangeCartDiscountsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeTest.java new file mode 100644 index 00000000000..5e91bd5ffa1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeCustomerChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeCustomerChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeCustomerChangeBuilder builder) { + ChangeCustomerChange changeCustomerChange = builder.buildUnchecked(); + Assertions.assertThat(changeCustomerChange).isInstanceOf(ChangeCustomerChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeCustomerChange.builder().change("change") }, + new Object[] { "previousValue", + ChangeCustomerChange.builder() + .previousValue(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "nextValue", ChangeCustomerChange.builder() + .nextValue(new com.commercetools.history.models.common.ReferenceImpl()) } }; + } + + @Test + public void change() { + ChangeCustomerChange value = ChangeCustomerChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangeCustomerChange value = ChangeCustomerChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.ReferenceImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + } + + @Test + public void nextValue() { + ChangeCustomerChange value = ChangeCustomerChange.of(); + value.setNextValue(new com.commercetools.history.models.common.ReferenceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeTest.java index b053c7e21ef..e797a9b478b 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueLabelChangeTest.java @@ -20,7 +20,8 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangeEnumValueLabelChange.builder().previousValue("previousValue") }, new Object[] { "nextValue", ChangeEnumValueLabelChange.builder().nextValue("nextValue") }, new Object[] { "fieldName", ChangeEnumValueLabelChange.builder().fieldName("fieldName") }, - new Object[] { "valueKey", ChangeEnumValueLabelChange.builder().valueKey("valueKey") } }; + new Object[] { "valueKey", ChangeEnumValueLabelChange.builder().valueKey("valueKey") }, + new Object[] { "attributeName", ChangeEnumValueLabelChange.builder().attributeName("attributeName") } }; } @Test @@ -57,4 +58,11 @@ public void valueKey() { value.setValueKey("valueKey"); Assertions.assertThat(value.getValueKey()).isEqualTo("valueKey"); } + + @Test + public void attributeName() { + ChangeEnumValueLabelChange value = ChangeEnumValueLabelChange.of(); + value.setAttributeName("attributeName"); + Assertions.assertThat(value.getAttributeName()).isEqualTo("attributeName"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeTest.java index 7c376c8d176..a3c1ddae396 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeEnumValueOrderChangeTest.java @@ -22,12 +22,13 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangeEnumValueOrderChange.builder() .previousValue(Collections.singletonList( - new com.commercetools.history.models.change_value.EnumValueImpl())) }, + new com.commercetools.history.models.common.CustomFieldEnumValueImpl())) }, new Object[] { "nextValue", ChangeEnumValueOrderChange.builder() .nextValue(Collections.singletonList( - new com.commercetools.history.models.change_value.EnumValueImpl())) }, - new Object[] { "fieldName", ChangeEnumValueOrderChange.builder().fieldName("fieldName") } }; + new com.commercetools.history.models.common.CustomFieldEnumValueImpl())) }, + new Object[] { "fieldName", ChangeEnumValueOrderChange.builder().fieldName("fieldName") }, + new Object[] { "attributeName", ChangeEnumValueOrderChange.builder().attributeName("attributeName") } }; } @Test @@ -41,20 +42,20 @@ public void change() { public void previousValue() { ChangeEnumValueOrderChange value = ChangeEnumValueOrderChange.of(); value.setPreviousValue( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.CustomFieldEnumValueImpl())); Assertions.assertThat(value.getPreviousValue()) .isEqualTo( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.CustomFieldEnumValueImpl())); } @Test public void nextValue() { ChangeEnumValueOrderChange value = ChangeEnumValueOrderChange.of(); value.setNextValue( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.CustomFieldEnumValueImpl())); Assertions.assertThat(value.getNextValue()) .isEqualTo( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.CustomFieldEnumValueImpl())); } @Test @@ -63,4 +64,11 @@ public void fieldName() { value.setFieldName("fieldName"); Assertions.assertThat(value.getFieldName()).isEqualTo("fieldName"); } + + @Test + public void attributeName() { + ChangeEnumValueOrderChange value = ChangeEnumValueOrderChange.of(); + value.setAttributeName("attributeName"); + Assertions.assertThat(value.getAttributeName()).isEqualTo("attributeName"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeTest.java index 3e10eefa43e..def55a5c74f 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeGroupsChangeTest.java @@ -22,7 +22,11 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangeGroupsChange.builder().previousValue(Collections.singletonList("previousValue")) }, new Object[] { "nextValue", - ChangeGroupsChange.builder().nextValue(Collections.singletonList("nextValue")) } }; + ChangeGroupsChange.builder().nextValue(Collections.singletonList("nextValue")) }, + new Object[] { "addedItems", + ChangeGroupsChange.builder().addedItems(Collections.singletonList("addedItems")) }, + new Object[] { "removedItems", + ChangeGroupsChange.builder().removedItems(Collections.singletonList("removedItems")) } }; } @Test @@ -45,4 +49,18 @@ public void nextValue() { value.setNextValue(Collections.singletonList("nextValue")); Assertions.assertThat(value.getNextValue()).isEqualTo(Collections.singletonList("nextValue")); } + + @Test + public void addedItems() { + ChangeGroupsChange value = ChangeGroupsChange.of(); + value.setAddedItems(Collections.singletonList("addedItems")); + Assertions.assertThat(value.getAddedItems()).isEqualTo(Collections.singletonList("addedItems")); + } + + @Test + public void removedItems() { + ChangeGroupsChange value = ChangeGroupsChange.of(); + value.setRemovedItems(Collections.singletonList("removedItems")); + Assertions.assertThat(value.getRemovedItems()).isEqualTo(Collections.singletonList("removedItems")); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeTest.java new file mode 100644 index 00000000000..1370d38101c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeIncludedInStatisticsChangeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeIncludedInStatisticsChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeIncludedInStatisticsChangeBuilder builder) { + ChangeIncludedInStatisticsChange changeIncludedInStatisticsChange = builder.buildUnchecked(); + Assertions.assertThat(changeIncludedInStatisticsChange).isInstanceOf(ChangeIncludedInStatisticsChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeIncludedInStatisticsChange.builder().change("change") }, + new Object[] { "previousValue", ChangeIncludedInStatisticsChange.builder().previousValue(true) }, + new Object[] { "nextValue", ChangeIncludedInStatisticsChange.builder().nextValue(true) } }; + } + + @Test + public void change() { + ChangeIncludedInStatisticsChange value = ChangeIncludedInStatisticsChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangeIncludedInStatisticsChange value = ChangeIncludedInStatisticsChange.of(); + value.setPreviousValue(true); + Assertions.assertThat(value.getPreviousValue()).isEqualTo(true); + } + + @Test + public void nextValue() { + ChangeIncludedInStatisticsChange value = ChangeIncludedInStatisticsChange.of(); + value.setNextValue(true); + Assertions.assertThat(value.getNextValue()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeTest.java index 1d9cc702434..035795e2f3c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeInputHintChangeTest.java @@ -17,10 +17,12 @@ public void buildUnchecked(String name, ChangeInputHintChangeBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", ChangeInputHintChange.builder().change("change") }, - new Object[] { "previousValue", ChangeInputHintChange.builder() - .previousValue(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")) }, + new Object[] { "previousValue", + ChangeInputHintChange.builder() + .previousValue( + com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")) }, new Object[] { "nextValue", ChangeInputHintChange.builder() - .nextValue(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")) }, + .nextValue(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")) }, new Object[] { "fieldName", ChangeInputHintChange.builder().fieldName("fieldName") }, new Object[] { "attributeName", ChangeInputHintChange.builder().attributeName("attributeName") } }; } @@ -35,17 +37,17 @@ public void change() { @Test public void previousValue() { ChangeInputHintChange value = ChangeInputHintChange.of(); - value.setPreviousValue(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + value.setPreviousValue(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + .isEqualTo(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); } @Test public void nextValue() { ChangeInputHintChange value = ChangeInputHintChange.of(); - value.setNextValue(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + value.setNextValue(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); Assertions.assertThat(value.getNextValue()) - .isEqualTo(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + .isEqualTo(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeTest.java new file mode 100644 index 00000000000..aa4adeb59e1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLastVariantIdChangeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeLastVariantIdChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeLastVariantIdChangeBuilder builder) { + ChangeLastVariantIdChange changeLastVariantIdChange = builder.buildUnchecked(); + Assertions.assertThat(changeLastVariantIdChange).isInstanceOf(ChangeLastVariantIdChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeLastVariantIdChange.builder().change("change") }, + new Object[] { "previousValue", ChangeLastVariantIdChange.builder().previousValue(8) }, + new Object[] { "nextValue", ChangeLastVariantIdChange.builder().nextValue(7) } }; + } + + @Test + public void change() { + ChangeLastVariantIdChange value = ChangeLastVariantIdChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangeLastVariantIdChange value = ChangeLastVariantIdChange.of(); + value.setPreviousValue(8); + Assertions.assertThat(value.getPreviousValue()).isEqualTo(8); + } + + @Test + public void nextValue() { + ChangeLastVariantIdChange value = ChangeLastVariantIdChange.of(); + value.setNextValue(7); + Assertions.assertThat(value.getNextValue()).isEqualTo(7); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeTest.java new file mode 100644 index 00000000000..dad9fa853a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemNameChangeTest.java @@ -0,0 +1,59 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeLineItemNameChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeLineItemNameChangeBuilder builder) { + ChangeLineItemNameChange changeLineItemNameChange = builder.buildUnchecked(); + Assertions.assertThat(changeLineItemNameChange).isInstanceOf(ChangeLineItemNameChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeLineItemNameChange.builder().change("change") }, + new Object[] { "lineItem", ChangeLineItemNameChange.builder() + .lineItem(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()) }, + new Object[] { "previousValue", + ChangeLineItemNameChange.builder() + .previousValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "nextValue", ChangeLineItemNameChange.builder() + .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void change() { + ChangeLineItemNameChange value = ChangeLineItemNameChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void lineItem() { + ChangeLineItemNameChange value = ChangeLineItemNameChange.of(); + value.setLineItem(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()); + } + + @Test + public void previousValue() { + ChangeLineItemNameChange value = ChangeLineItemNameChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void nextValue() { + ChangeLineItemNameChange value = ChangeLineItemNameChange.of(); + value.setNextValue(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeTest.java new file mode 100644 index 00000000000..abef260d3b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLineItemPublishedChangeTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeLineItemPublishedChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeLineItemPublishedChangeBuilder builder) { + ChangeLineItemPublishedChange changeLineItemPublishedChange = builder.buildUnchecked(); + Assertions.assertThat(changeLineItemPublishedChange).isInstanceOf(ChangeLineItemPublishedChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeLineItemPublishedChange.builder().change("change") }, + new Object[] { "lineItem", ChangeLineItemPublishedChange.builder() + .lineItem(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()) }, + new Object[] { "previousValue", ChangeLineItemPublishedChange.builder().previousValue(true) }, + new Object[] { "nextValue", ChangeLineItemPublishedChange.builder().nextValue(true) } }; + } + + @Test + public void change() { + ChangeLineItemPublishedChange value = ChangeLineItemPublishedChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void lineItem() { + ChangeLineItemPublishedChange value = ChangeLineItemPublishedChange.of(); + value.setLineItem(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.history.models.change_value.ShoppingListLineItemValueImpl()); + } + + @Test + public void previousValue() { + ChangeLineItemPublishedChange value = ChangeLineItemPublishedChange.of(); + value.setPreviousValue(true); + Assertions.assertThat(value.getPreviousValue()).isEqualTo(true); + } + + @Test + public void nextValue() { + ChangeLineItemPublishedChange value = ChangeLineItemPublishedChange.of(); + value.setNextValue(true); + Assertions.assertThat(value.getNextValue()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeTest.java index 5e20c28cdc7..9894a244d8c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeLocalizedEnumValueOrderChangeTest.java @@ -24,11 +24,11 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangeLocalizedEnumValueOrderChange.builder() .previousValue(Collections.singletonList( - new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())) }, + new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())) }, new Object[] { "nextValue", ChangeLocalizedEnumValueOrderChange.builder() .nextValue(Collections.singletonList( - new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())) }, + new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())) }, new Object[] { "fieldName", ChangeLocalizedEnumValueOrderChange.builder().fieldName("fieldName") }, new Object[] { "attributeName", ChangeLocalizedEnumValueOrderChange.builder().attributeName("attributeName") } }; @@ -45,20 +45,20 @@ public void change() { public void previousValue() { ChangeLocalizedEnumValueOrderChange value = ChangeLocalizedEnumValueOrderChange.of(); value.setPreviousValue( - Collections.singletonList(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())); Assertions.assertThat(value.getPreviousValue()) .isEqualTo(Collections - .singletonList(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())); + .singletonList(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())); } @Test public void nextValue() { ChangeLocalizedEnumValueOrderChange value = ChangeLocalizedEnumValueOrderChange.of(); value.setNextValue( - Collections.singletonList(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())); Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections - .singletonList(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl())); + .singletonList(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl())); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeTest.java index 8b1da5f7c6c..f166b818116 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePlainEnumValueOrderChangeTest.java @@ -22,11 +22,11 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangePlainEnumValueOrderChange.builder() .previousValue(Collections.singletonList( - new com.commercetools.history.models.change_value.EnumValueImpl())) }, + new com.commercetools.history.models.common.AttributePlainEnumValueImpl())) }, new Object[] { "nextValue", ChangePlainEnumValueOrderChange.builder() .nextValue(Collections.singletonList( - new com.commercetools.history.models.change_value.EnumValueImpl())) }, + new com.commercetools.history.models.common.AttributePlainEnumValueImpl())) }, new Object[] { "attributeName", ChangePlainEnumValueOrderChange.builder().attributeName("attributeName") } }; } @@ -42,20 +42,20 @@ public void change() { public void previousValue() { ChangePlainEnumValueOrderChange value = ChangePlainEnumValueOrderChange.of(); value.setPreviousValue( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.AttributePlainEnumValueImpl())); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.AttributePlainEnumValueImpl())); } @Test public void nextValue() { ChangePlainEnumValueOrderChange value = ChangePlainEnumValueOrderChange.of(); value.setNextValue( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + Collections.singletonList(new com.commercetools.history.models.common.AttributePlainEnumValueImpl())); Assertions.assertThat(value.getNextValue()) - .isEqualTo( - Collections.singletonList(new com.commercetools.history.models.change_value.EnumValueImpl())); + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.AttributePlainEnumValueImpl())); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceChangeTest.java index 3be6ab6d492..f3d2a0a35b3 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceChangeTest.java @@ -24,7 +24,8 @@ public static Object[][] objectBuilder() { ChangePriceChange.builder() .nextValue(new com.commercetools.history.models.common.PriceImpl()) }, new Object[] { "catalogData", ChangePriceChange.builder().catalogData("catalogData") }, - new Object[] { "priceId", ChangePriceChange.builder().priceId("priceId") } }; + new Object[] { "priceId", ChangePriceChange.builder().priceId("priceId") }, + new Object[] { "variant", ChangePriceChange.builder().variant("variant") } }; } @Test @@ -62,4 +63,11 @@ public void priceId() { value.setPriceId("priceId"); Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); } + + @Test + public void variant() { + ChangePriceChange value = ChangePriceChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeTest.java new file mode 100644 index 00000000000..afbb2ee2f56 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangePriceRoundingModeChangeTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangePriceRoundingModeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangePriceRoundingModeChangeBuilder builder) { + ChangePriceRoundingModeChange changePriceRoundingModeChange = builder.buildUnchecked(); + Assertions.assertThat(changePriceRoundingModeChange).isInstanceOf(ChangePriceRoundingModeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangePriceRoundingModeChange.builder().change("change") }, + new Object[] { "previousValue", ChangePriceRoundingModeChange.builder() + .previousValue(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")) }, + new Object[] { "nextValue", ChangePriceRoundingModeChange.builder() + .nextValue(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")) } }; + } + + @Test + public void change() { + ChangePriceRoundingModeChange value = ChangePriceRoundingModeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangePriceRoundingModeChange value = ChangePriceRoundingModeChange.of(); + value.setPreviousValue(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")); + } + + @Test + public void nextValue() { + ChangePriceRoundingModeChange value = ChangePriceRoundingModeChange.of(); + value.setNextValue(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(com.commercetools.history.models.common.RoundingMode.findEnum("HalfEven")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeSlugChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeSlugChangeTest.java index 3d9b85997c0..20ebb22c738 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeSlugChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeSlugChangeTest.java @@ -20,8 +20,10 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", ChangeSlugChange.builder() .previousValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "nextValue", ChangeSlugChange.builder() - .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "nextValue", + ChangeSlugChange.builder() + .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "catalogData", ChangeSlugChange.builder().catalogData("catalogData") } }; } @Test @@ -46,4 +48,11 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void catalogData() { + ChangeSlugChange value = ChangeSlugChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeTest.java new file mode 100644 index 00000000000..597b620ea2d --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ChangeTopLevelUnitChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChangeTopLevelUnitChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChangeTopLevelUnitChangeBuilder builder) { + ChangeTopLevelUnitChange changeTopLevelUnitChange = builder.buildUnchecked(); + Assertions.assertThat(changeTopLevelUnitChange).isInstanceOf(ChangeTopLevelUnitChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ChangeTopLevelUnitChange.builder().change("change") }, + new Object[] { "previousValue", + ChangeTopLevelUnitChange.builder() + .previousValue(new com.commercetools.history.models.common.KeyReferenceImpl()) }, + new Object[] { "nextValue", ChangeTopLevelUnitChange.builder() + .nextValue(new com.commercetools.history.models.common.KeyReferenceImpl()) } }; + } + + @Test + public void change() { + ChangeTopLevelUnitChange value = ChangeTopLevelUnitChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ChangeTopLevelUnitChange value = ChangeTopLevelUnitChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.KeyReferenceImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + } + + @Test + public void nextValue() { + ChangeTopLevelUnitChange value = ChangeTopLevelUnitChange.of(); + value.setNextValue(new com.commercetools.history.models.common.KeyReferenceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ExcludeProductChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ExcludeProductChangeTest.java new file mode 100644 index 00000000000..c1d24eb6bd5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ExcludeProductChangeTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ExcludeProductChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ExcludeProductChangeBuilder builder) { + ExcludeProductChange excludeProductChange = builder.buildUnchecked(); + Assertions.assertThat(excludeProductChange).isInstanceOf(ExcludeProductChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ExcludeProductChange.builder().change("change") }, + new Object[] { "variantExclusion", ExcludeProductChange.builder() + .variantExclusion(new com.commercetools.history.models.common.ProductVariantExclusionImpl()) }, + new Object[] { "nextValue", ExcludeProductChange.builder() + .nextValue(new com.commercetools.history.models.common.ReferenceImpl()) } }; + } + + @Test + public void change() { + ExcludeProductChange value = ExcludeProductChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void variantExclusion() { + ExcludeProductChange value = ExcludeProductChange.of(); + value.setVariantExclusion(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + Assertions.assertThat(value.getVariantExclusion()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + } + + @Test + public void nextValue() { + ExcludeProductChange value = ExcludeProductChange.of(); + value.setNextValue(new com.commercetools.history.models.common.ReferenceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeTest.java index 280970bcf31..ab2b5f740af 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/MoveImageToPositionChangeTest.java @@ -27,7 +27,8 @@ public static Object[][] objectBuilder() { MoveImageToPositionChange.builder() .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ImageImpl())) }, - new Object[] { "catalogData", MoveImageToPositionChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", MoveImageToPositionChange.builder().catalogData("catalogData") }, + new Object[] { "variant", MoveImageToPositionChange.builder().variant("variant") } }; } @Test @@ -59,4 +60,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + MoveImageToPositionChange value = MoveImageToPositionChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveAssetChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveAssetChangeTest.java index 2514eb2c573..430ba2936d6 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveAssetChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveAssetChangeTest.java @@ -16,9 +16,12 @@ public void buildUnchecked(String name, RemoveAssetChangeBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "change", RemoveAssetChange.builder().change("change") }, new Object[] { - "previousValue", - RemoveAssetChange.builder().previousValue(new com.commercetools.history.models.common.AssetImpl()) } }; + return new Object[][] { new Object[] { "change", RemoveAssetChange.builder().change("change") }, + new Object[] { "previousValue", + RemoveAssetChange.builder() + .previousValue(new com.commercetools.history.models.common.AssetImpl()) }, + new Object[] { "catalogData", RemoveAssetChange.builder().catalogData("catalogData") }, + new Object[] { "variant", RemoveAssetChange.builder().variant("variant") } }; } @Test @@ -35,4 +38,18 @@ public void previousValue() { Assertions.assertThat(value.getPreviousValue()) .isEqualTo(new com.commercetools.history.models.common.AssetImpl()); } + + @Test + public void catalogData() { + RemoveAssetChange value = RemoveAssetChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + RemoveAssetChange value = RemoveAssetChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeTest.java index 687d67c14ff..f164830237a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveDeliveryItemsChangeTest.java @@ -18,7 +18,7 @@ public void buildUnchecked(String name, RemoveDeliveryItemsChangeBuilder builder public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", RemoveDeliveryItemsChange.builder().change("change") }, new Object[] { "previousValue", RemoveDeliveryItemsChange.builder() - .previousValue(new com.commercetools.history.models.common.DeliveryImpl()) } }; + .previousValue(new com.commercetools.history.models.change_value.DeliveryChangeValueImpl()) } }; } @Test @@ -31,8 +31,8 @@ public void change() { @Test public void previousValue() { RemoveDeliveryItemsChange value = RemoveDeliveryItemsChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.DeliveryImpl()); + value.setPreviousValue(new com.commercetools.history.models.change_value.DeliveryChangeValueImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.DeliveryImpl()); + .isEqualTo(new com.commercetools.history.models.change_value.DeliveryChangeValueImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeTest.java index 5a6e5b3a22d..a159d46206e 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveEnumValuesChangeTest.java @@ -17,9 +17,8 @@ public void buildUnchecked(String name, RemoveEnumValuesChangeBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", RemoveEnumValuesChange.builder().change("change") }, - new Object[] { "previousValue", - RemoveEnumValuesChange.builder() - .previousValue(new com.commercetools.history.models.change_value.EnumValueImpl()) }, + new Object[] { "previousValue", RemoveEnumValuesChange.builder() + .previousValue(new com.commercetools.history.models.common.AttributePlainEnumValueImpl()) }, new Object[] { "attributeName", RemoveEnumValuesChange.builder().attributeName("attributeName") } }; } @@ -33,9 +32,9 @@ public void change() { @Test public void previousValue() { RemoveEnumValuesChange value = RemoveEnumValuesChange.of(); - value.setPreviousValue(new com.commercetools.history.models.change_value.EnumValueImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.AttributePlainEnumValueImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.change_value.EnumValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.AttributePlainEnumValueImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeTest.java index decdef90db9..da2937ddb1a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveFromCategoryChangeTest.java @@ -27,8 +27,10 @@ public static Object[][] objectBuilder() { RemoveFromCategoryChange.builder() .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "category", RemoveFromCategoryChange.builder() - .category(new com.commercetools.history.models.common.ReferenceImpl()) } }; + new Object[] { "category", + RemoveFromCategoryChange.builder() + .category(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "catalogData", RemoveFromCategoryChange.builder().catalogData("catalogData") } }; } @Test @@ -61,4 +63,11 @@ public void category() { Assertions.assertThat(value.getCategory()) .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); } + + @Test + public void catalogData() { + RemoveFromCategoryChange value = RemoveFromCategoryChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveImageChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveImageChangeTest.java index faf49d62718..2b8ece0e235 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveImageChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveImageChangeTest.java @@ -27,7 +27,8 @@ public static Object[][] objectBuilder() { RemoveImageChange.builder() .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ImageImpl())) }, - new Object[] { "catalogData", RemoveImageChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", RemoveImageChange.builder().catalogData("catalogData") }, + new Object[] { "variant", RemoveImageChange.builder().variant("variant") } }; } @Test @@ -59,4 +60,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + RemoveImageChange value = RemoveImageChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeTest.java index c34ad089430..741e257a55f 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveLocalizedEnumValuesChangeTest.java @@ -18,7 +18,7 @@ public void buildUnchecked(String name, RemoveLocalizedEnumValuesChangeBuilder b public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", RemoveLocalizedEnumValuesChange.builder().change("change") }, new Object[] { "previousValue", RemoveLocalizedEnumValuesChange.builder() - .previousValue(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl()) }, + .previousValue(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()) }, new Object[] { "attributeName", RemoveLocalizedEnumValuesChange.builder().attributeName("attributeName") } }; } @@ -33,9 +33,9 @@ public void change() { @Test public void previousValue() { RemoveLocalizedEnumValuesChange value = RemoveLocalizedEnumValuesChange.of(); - value.setPreviousValue(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.change_value.LocalizedEnumValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.AttributeLocalizedEnumValueImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemovePriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemovePriceChangeTest.java index 43b2dce80f2..1496db8be2a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemovePriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemovePriceChangeTest.java @@ -24,7 +24,8 @@ public static Object[][] objectBuilder() { RemovePriceChange.builder() .nextValue(new com.commercetools.history.models.common.PriceImpl()) }, new Object[] { "catalogData", RemovePriceChange.builder().catalogData("catalogData") }, - new Object[] { "priceId", RemovePriceChange.builder().priceId("priceId") } }; + new Object[] { "priceId", RemovePriceChange.builder().priceId("priceId") }, + new Object[] { "variant", RemovePriceChange.builder().variant("variant") } }; } @Test @@ -62,4 +63,11 @@ public void priceId() { value.setPriceId("priceId"); Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); } + + @Test + public void variant() { + RemovePriceChange value = RemovePriceChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShippingChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShippingChangeTest.java new file mode 100644 index 00000000000..d90bb9d85cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShippingChangeTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RemoveShippingChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RemoveShippingChangeBuilder builder) { + RemoveShippingChange removeShippingChange = builder.buildUnchecked(); + Assertions.assertThat(removeShippingChange).isInstanceOf(RemoveShippingChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", RemoveShippingChange.builder().change("change") }, + new Object[] { "previousValue", RemoveShippingChange.builder() + .previousValue(new com.commercetools.history.models.common.ShippingImpl()) } }; + } + + @Test + public void change() { + RemoveShippingChange value = RemoveShippingChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + RemoveShippingChange value = RemoveShippingChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.ShippingImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.ShippingImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeTest.java index 57135ab049a..200139e3848 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RemoveShoppingListLineItemChangeTest.java @@ -17,11 +17,10 @@ public void buildUnchecked(String name, RemoveShoppingListLineItemChangeBuilder public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", RemoveShoppingListLineItemChange.builder().change("change") }, - new Object[] { "previousValue", - RemoveShoppingListLineItemChange.builder() - .previousValue(new com.commercetools.history.models.common.LineItemImpl()) }, + new Object[] { "previousValue", RemoveShoppingListLineItemChange.builder() + .previousValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()) }, new Object[] { "nextValue", RemoveShoppingListLineItemChange.builder() - .nextValue(new com.commercetools.history.models.common.LineItemImpl()) } }; + .nextValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()) } }; } @Test @@ -34,16 +33,16 @@ public void change() { @Test public void previousValue() { RemoveShoppingListLineItemChange value = RemoveShoppingListLineItemChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.LineItemImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.LineItemImpl()); + .isEqualTo(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); } @Test public void nextValue() { RemoveShoppingListLineItemChange value = RemoveShoppingListLineItemChange.of(); - value.setNextValue(new com.commercetools.history.models.common.LineItemImpl()); + value.setNextValue(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.LineItemImpl()); + .isEqualTo(new com.commercetools.history.models.common.ShoppingListLineItemImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeTest.java new file mode 100644 index 00000000000..906f414ddbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/ReplaceTaxRateChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ReplaceTaxRateChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ReplaceTaxRateChangeBuilder builder) { + ReplaceTaxRateChange replaceTaxRateChange = builder.buildUnchecked(); + Assertions.assertThat(replaceTaxRateChange).isInstanceOf(ReplaceTaxRateChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", ReplaceTaxRateChange.builder().change("change") }, + new Object[] { "previousValue", + ReplaceTaxRateChange.builder() + .previousValue(new com.commercetools.history.models.common.TaxRateImpl()) }, + new Object[] { "nextValue", ReplaceTaxRateChange.builder() + .nextValue(new com.commercetools.history.models.common.TaxRateImpl()) } }; + } + + @Test + public void change() { + ReplaceTaxRateChange value = ReplaceTaxRateChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + ReplaceTaxRateChange value = ReplaceTaxRateChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } + + @Test + public void nextValue() { + ReplaceTaxRateChange value = ReplaceTaxRateChange.of(); + value.setNextValue(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeTest.java new file mode 100644 index 00000000000..01f4cfdc13a --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedChangesChangeTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RevertStagedChangesChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RevertStagedChangesChangeBuilder builder) { + RevertStagedChangesChange revertStagedChangesChange = builder.buildUnchecked(); + Assertions.assertThat(revertStagedChangesChange).isInstanceOf(RevertStagedChangesChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", RevertStagedChangesChange.builder().change("change") } }; + } + + @Test + public void change() { + RevertStagedChangesChange value = RevertStagedChangesChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeTest.java new file mode 100644 index 00000000000..8ca48f3b083 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/RevertStagedVariantChangesChangeTest.java @@ -0,0 +1,29 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RevertStagedVariantChangesChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RevertStagedVariantChangesChangeBuilder builder) { + RevertStagedVariantChangesChange revertStagedVariantChangesChange = builder.buildUnchecked(); + Assertions.assertThat(revertStagedVariantChangesChange).isInstanceOf(RevertStagedVariantChangesChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", RevertStagedVariantChangesChange.builder().change("change") } }; + } + + @Test + public void change() { + RevertStagedVariantChangesChange value = RevertStagedVariantChangesChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAncestorsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAncestorsChangeTest.java new file mode 100644 index 00000000000..0525ba76ea8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAncestorsChangeTest.java @@ -0,0 +1,77 @@ + +package com.commercetools.history.models.change; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAncestorsChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAncestorsChangeBuilder builder) { + SetAncestorsChange setAncestorsChange = builder.buildUnchecked(); + Assertions.assertThat(setAncestorsChange).isInstanceOf(SetAncestorsChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetAncestorsChange.builder().change("change") }, + new Object[] { "addedItems", + SetAncestorsChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "removedItems", + SetAncestorsChange.builder() + .removedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "previousValue", + SetAncestorsChange.builder() + .previousValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "nextValue", SetAncestorsChange.builder() + .nextValue( + Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; + } + + @Test + public void change() { + SetAncestorsChange value = SetAncestorsChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addedItems() { + SetAncestorsChange value = SetAncestorsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void removedItems() { + SetAncestorsChange value = SetAncestorsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void previousValue() { + SetAncestorsChange value = SetAncestorsChange.of(); + value.setPreviousValue(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void nextValue() { + SetAncestorsChange value = SetAncestorsChange.of(); + value.setNextValue(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeTest.java index bae619968ad..32c9cee2ad5 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomFieldChangeTest.java @@ -21,8 +21,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetAssetCustomFieldChange.builder().nextValue("nextValue") }, new Object[] { "name", SetAssetCustomFieldChange.builder().name("name") }, new Object[] { "customTypeId", SetAssetCustomFieldChange.builder().customTypeId("customTypeId") }, - new Object[] { "asset", SetAssetCustomFieldChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetCustomFieldChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetCustomFieldChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetCustomFieldChange.builder().variant("variant") } }; } @Test @@ -67,4 +70,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetCustomFieldChange value = SetAssetCustomFieldChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetCustomFieldChange value = SetAssetCustomFieldChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeTest.java index 11b02a59641..b4c378b84ce 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetCustomTypeChangeTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetAssetCustomTypeChange.builder() .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, - new Object[] { "asset", SetAssetCustomTypeChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetCustomTypeChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetCustomTypeChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetCustomTypeChange.builder().variant("variant") } }; } @Test @@ -57,4 +60,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetCustomTypeChange value = SetAssetCustomTypeChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetCustomTypeChange value = SetAssetCustomTypeChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeTest.java index 9c4ec83381f..c11f704f9e4 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetDescriptionChangeTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetAssetDescriptionChange.builder() .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "asset", SetAssetDescriptionChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetDescriptionChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetDescriptionChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetDescriptionChange.builder().variant("variant") } }; } @Test @@ -57,4 +60,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetDescriptionChange value = SetAssetDescriptionChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetDescriptionChange value = SetAssetDescriptionChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeTest.java index c39432f8bfd..12527e1ee4e 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetKeyChangeTest.java @@ -19,8 +19,11 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetAssetKeyChange.builder().change("change") }, new Object[] { "previousValue", SetAssetKeyChange.builder().previousValue("previousValue") }, new Object[] { "nextValue", SetAssetKeyChange.builder().nextValue("nextValue") }, - new Object[] { "asset", SetAssetKeyChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetKeyChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetKeyChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetKeyChange.builder().variant("variant") } }; } @Test @@ -51,4 +54,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetKeyChange value = SetAssetKeyChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetKeyChange value = SetAssetKeyChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeTest.java index 6a340db634c..683cb88c2eb 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetSourcesChangeTest.java @@ -27,8 +27,11 @@ public static Object[][] objectBuilder() { SetAssetSourcesChange.builder() .nextValue(Collections.singletonList( new com.commercetools.history.models.common.AssetSourceImpl())) }, - new Object[] { "asset", SetAssetSourcesChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetSourcesChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetSourcesChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetSourcesChange.builder().variant("variant") } }; } @Test @@ -62,4 +65,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetSourcesChange value = SetAssetSourcesChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetSourcesChange value = SetAssetSourcesChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeTest.java index 1d97d940bc0..1c7e3ed8eae 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssetTagsChangeTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { SetAssetTagsChange.builder().previousValue(Collections.singletonList("previousValue")) }, new Object[] { "nextValue", SetAssetTagsChange.builder().nextValue(Collections.singletonList("nextValue")) }, - new Object[] { "asset", SetAssetTagsChange.builder() - .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) } }; + new Object[] { "asset", + SetAssetTagsChange.builder() + .asset(new com.commercetools.history.models.change_value.AssetChangeValueImpl()) }, + new Object[] { "catalogData", SetAssetTagsChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAssetTagsChange.builder().variant("variant") } }; } @Test @@ -55,4 +58,18 @@ public void asset() { Assertions.assertThat(value.getAsset()) .isEqualTo(new com.commercetools.history.models.change_value.AssetChangeValueImpl()); } + + @Test + public void catalogData() { + SetAssetTagsChange value = SetAssetTagsChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetAssetTagsChange value = SetAssetTagsChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssociatesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssociatesChangeTest.java new file mode 100644 index 00000000000..0b0f78ee65e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAssociatesChangeTest.java @@ -0,0 +1,77 @@ + +package com.commercetools.history.models.change; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetAssociatesChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetAssociatesChangeBuilder builder) { + SetAssociatesChange setAssociatesChange = builder.buildUnchecked(); + Assertions.assertThat(setAssociatesChange).isInstanceOf(SetAssociatesChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetAssociatesChange.builder().change("change") }, + new Object[] { "addedItems", + SetAssociatesChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.AssociateImpl())) }, + new Object[] { "removedItems", + SetAssociatesChange.builder() + .removedItems(Collections + .singletonList(new com.commercetools.history.models.common.AssociateImpl())) }, + new Object[] { "previousValue", + SetAssociatesChange.builder() + .previousValue(Collections + .singletonList(new com.commercetools.history.models.common.AssociateImpl())) }, + new Object[] { "nextValue", SetAssociatesChange.builder() + .nextValue( + Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())) } }; + } + + @Test + public void change() { + SetAssociatesChange value = SetAssociatesChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addedItems() { + SetAssociatesChange value = SetAssociatesChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + } + + @Test + public void removedItems() { + SetAssociatesChange value = SetAssociatesChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + } + + @Test + public void previousValue() { + SetAssociatesChange value = SetAssociatesChange.of(); + value.setPreviousValue(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + } + + @Test + public void nextValue() { + SetAssociatesChange value = SetAssociatesChange.of(); + value.setNextValue(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssociateImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAttributeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAttributeChangeTest.java index ab929389d7d..8208df3bce6 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAttributeChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetAttributeChangeTest.java @@ -17,12 +17,14 @@ public void buildUnchecked(String name, SetAttributeChangeBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetAttributeChange.builder().change("change") }, - new Object[] { "previousValue", SetAttributeChange.builder() - .previousValue(new com.commercetools.history.models.change_value.AttributeValueImpl()) }, + new Object[] { "previousValue", + SetAttributeChange.builder() + .previousValue(new com.commercetools.history.models.common.AttributeImpl()) }, new Object[] { "nextValue", SetAttributeChange.builder() - .nextValue(new com.commercetools.history.models.change_value.AttributeValueImpl()) }, - new Object[] { "catalogData", SetAttributeChange.builder().catalogData("catalogData") } }; + .nextValue(new com.commercetools.history.models.common.AttributeImpl()) }, + new Object[] { "catalogData", SetAttributeChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetAttributeChange.builder().variant("variant") } }; } @Test @@ -35,17 +37,17 @@ public void change() { @Test public void previousValue() { SetAttributeChange value = SetAttributeChange.of(); - value.setPreviousValue(new com.commercetools.history.models.change_value.AttributeValueImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.AttributeImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.change_value.AttributeValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.AttributeImpl()); } @Test public void nextValue() { SetAttributeChange value = SetAttributeChange.of(); - value.setNextValue(new com.commercetools.history.models.change_value.AttributeValueImpl()); + value.setNextValue(new com.commercetools.history.models.common.AttributeImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.change_value.AttributeValueImpl()); + .isEqualTo(new com.commercetools.history.models.common.AttributeImpl()); } @Test @@ -54,4 +56,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetAttributeChange value = SetAttributeChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeTest.java new file mode 100644 index 00000000000..89528f66b80 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomFieldChangeTest.java @@ -0,0 +1,64 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetBillingAddressCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetBillingAddressCustomFieldChangeBuilder builder) { + SetBillingAddressCustomFieldChange setBillingAddressCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setBillingAddressCustomFieldChange) + .isInstanceOf(SetBillingAddressCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetBillingAddressCustomFieldChange.builder().change("change") }, + new Object[] { "name", SetBillingAddressCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetBillingAddressCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetBillingAddressCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetBillingAddressCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetBillingAddressCustomFieldChange value = SetBillingAddressCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void name() { + SetBillingAddressCustomFieldChange value = SetBillingAddressCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetBillingAddressCustomFieldChange value = SetBillingAddressCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetBillingAddressCustomFieldChange value = SetBillingAddressCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetBillingAddressCustomFieldChange value = SetBillingAddressCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeTest.java new file mode 100644 index 00000000000..6a7de9033e0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBillingAddressCustomTypeChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetBillingAddressCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetBillingAddressCustomTypeChangeBuilder builder) { + SetBillingAddressCustomTypeChange setBillingAddressCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setBillingAddressCustomTypeChange).isInstanceOf(SetBillingAddressCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetBillingAddressCustomTypeChange.builder().change("change") }, + new Object[] { "previousValue", + SetBillingAddressCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetBillingAddressCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetBillingAddressCustomTypeChange value = SetBillingAddressCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetBillingAddressCustomTypeChange value = SetBillingAddressCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetBillingAddressCustomTypeChange value = SetBillingAddressCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeTest.java new file mode 100644 index 00000000000..0e3d1aacdb5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetBusinessUnitChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetBusinessUnitChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetBusinessUnitChangeBuilder builder) { + SetBusinessUnitChange setBusinessUnitChange = builder.buildUnchecked(); + Assertions.assertThat(setBusinessUnitChange).isInstanceOf(SetBusinessUnitChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetBusinessUnitChange.builder().change("change") }, + new Object[] { "previousValue", + SetBusinessUnitChange.builder() + .previousValue(new com.commercetools.history.models.common.KeyReferenceImpl()) }, + new Object[] { "nextValue", SetBusinessUnitChange.builder() + .nextValue(new com.commercetools.history.models.common.KeyReferenceImpl()) } }; + } + + @Test + public void change() { + SetBusinessUnitChange value = SetBusinessUnitChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetBusinessUnitChange value = SetBusinessUnitChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.KeyReferenceImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + } + + @Test + public void nextValue() { + SetBusinessUnitChange value = SetBusinessUnitChange.of(); + value.setNextValue(new com.commercetools.history.models.common.KeyReferenceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeTest.java index 6a1a7cf69b7..4bf614657ec 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetChannelRolesChangeTest.java @@ -24,6 +24,12 @@ public static Object[][] objectBuilder() { com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))) }, new Object[] { "nextValue", SetChannelRolesChange.builder() .nextValue(Collections.singletonList( + com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))) }, + new Object[] { "addedItems", SetChannelRolesChange.builder() + .addedItems(Collections.singletonList( + com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))) }, + new Object[] { "removedItems", SetChannelRolesChange.builder() + .removedItems(Collections.singletonList( com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))) } }; } @@ -53,4 +59,24 @@ public void nextValue() { .isEqualTo(Collections.singletonList( com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))); } + + @Test + public void addedItems() { + SetChannelRolesChange value = SetChannelRolesChange.of(); + value.setAddedItems(Collections + .singletonList(com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList( + com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))); + } + + @Test + public void removedItems() { + SetChannelRolesChange value = SetChannelRolesChange.of(); + value.setRemovedItems(Collections + .singletonList(com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList( + com.commercetools.history.models.common.ChannelRoleEnum.findEnum("InventorySupply"))); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCountriesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCountriesChangeTest.java index 605e6648e7b..686d31a69b8 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCountriesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCountriesChangeTest.java @@ -26,6 +26,14 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetCountriesChange.builder() .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.StoreCountryImpl())) }, + new Object[] { "addedItems", + SetCountriesChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.StoreCountryImpl())) }, + new Object[] { "removedItems", + SetCountriesChange.builder() + .removedItems(Collections.singletonList( new com.commercetools.history.models.common.StoreCountryImpl())) } }; } @@ -52,4 +60,21 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.StoreCountryImpl())); } + + @Test + public void addedItems() { + SetCountriesChange value = SetCountriesChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.StoreCountryImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.StoreCountryImpl())); + } + + @Test + public void removedItems() { + SetCountriesChange value = SetCountriesChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.StoreCountryImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.StoreCountryImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeTest.java index 426245b73d7..5a29e509c83 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemCustomFieldChangeTest.java @@ -27,7 +27,9 @@ public static Object[][] objectBuilder() { SetCustomLineItemCustomFieldChange.builder() .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "customLineItemId", - SetCustomLineItemCustomFieldChange.builder().customLineItemId("customLineItemId") } }; + SetCustomLineItemCustomFieldChange.builder().customLineItemId("customLineItemId") }, + new Object[] { "customTypeId", + SetCustomLineItemCustomFieldChange.builder().customTypeId("customTypeId") } }; } @Test @@ -72,4 +74,11 @@ public void customLineItemId() { value.setCustomLineItemId("customLineItemId"); Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); } + + @Test + public void customTypeId() { + SetCustomLineItemCustomFieldChange value = SetCustomLineItemCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeTest.java new file mode 100644 index 00000000000..d5d13c69589 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPriceChangeTest.java @@ -0,0 +1,70 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetCustomLineItemDiscountedPriceChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetCustomLineItemDiscountedPriceChangeBuilder builder) { + SetCustomLineItemDiscountedPriceChange setCustomLineItemDiscountedPriceChange = builder.buildUnchecked(); + Assertions.assertThat(setCustomLineItemDiscountedPriceChange) + .isInstanceOf(SetCustomLineItemDiscountedPriceChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetCustomLineItemDiscountedPriceChange.builder().change("change") }, + new Object[] { "customLineItem", + SetCustomLineItemDiscountedPriceChange.builder() + .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "customLineItemId", + SetCustomLineItemDiscountedPriceChange.builder().customLineItemId("customLineItemId") }, + new Object[] { "previousValue", SetCustomLineItemDiscountedPriceChange.builder() + .previousValue(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()) }, + new Object[] { "nextValue", SetCustomLineItemDiscountedPriceChange.builder() + .nextValue(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()) } }; + } + + @Test + public void change() { + SetCustomLineItemDiscountedPriceChange value = SetCustomLineItemDiscountedPriceChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void customLineItem() { + SetCustomLineItemDiscountedPriceChange value = SetCustomLineItemDiscountedPriceChange.of(); + value.setCustomLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getCustomLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void customLineItemId() { + SetCustomLineItemDiscountedPriceChange value = SetCustomLineItemDiscountedPriceChange.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void previousValue() { + SetCustomLineItemDiscountedPriceChange value = SetCustomLineItemDiscountedPriceChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + } + + @Test + public void nextValue() { + SetCustomLineItemDiscountedPriceChange value = SetCustomLineItemDiscountedPriceChange.of(); + value.setNextValue(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeTest.java new file mode 100644 index 00000000000..df8d36dbcf4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemDiscountedPricePerQuantityChangeTest.java @@ -0,0 +1,79 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetCustomLineItemDiscountedPricePerQuantityChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetCustomLineItemDiscountedPricePerQuantityChangeBuilder builder) { + SetCustomLineItemDiscountedPricePerQuantityChange setCustomLineItemDiscountedPricePerQuantityChange = builder + .buildUnchecked(); + Assertions.assertThat(setCustomLineItemDiscountedPricePerQuantityChange) + .isInstanceOf(SetCustomLineItemDiscountedPricePerQuantityChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetCustomLineItemDiscountedPricePerQuantityChange.builder().change("change") }, + new Object[] { "customLineItem", + SetCustomLineItemDiscountedPricePerQuantityChange.builder() + .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "customLineItemId", + SetCustomLineItemDiscountedPricePerQuantityChange.builder() + .customLineItemId("customLineItemId") }, + new Object[] { "previousValue", SetCustomLineItemDiscountedPricePerQuantityChange.builder() + .previousValue( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()) }, + new Object[] { "nextValue", SetCustomLineItemDiscountedPricePerQuantityChange.builder() + .nextValue( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()) } }; + } + + @Test + public void change() { + SetCustomLineItemDiscountedPricePerQuantityChange value = SetCustomLineItemDiscountedPricePerQuantityChange + .of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void customLineItem() { + SetCustomLineItemDiscountedPricePerQuantityChange value = SetCustomLineItemDiscountedPricePerQuantityChange + .of(); + value.setCustomLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getCustomLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void customLineItemId() { + SetCustomLineItemDiscountedPricePerQuantityChange value = SetCustomLineItemDiscountedPricePerQuantityChange + .of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void previousValue() { + SetCustomLineItemDiscountedPricePerQuantityChange value = SetCustomLineItemDiscountedPricePerQuantityChange + .of(); + value.setPreviousValue(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()); + } + + @Test + public void nextValue() { + SetCustomLineItemDiscountedPricePerQuantityChange value = SetCustomLineItemDiscountedPricePerQuantityChange + .of(); + value.setNextValue(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeTest.java index 7bcff4b8b80..0a0b69475f2 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemShippingDetailsChangeTest.java @@ -26,7 +26,9 @@ public static Object[][] objectBuilder() { SetCustomLineItemShippingDetailsChange.builder() .nextValue(new com.commercetools.history.models.common.ItemShippingDetailsImpl()) }, new Object[] { "customLineItemId", - SetCustomLineItemShippingDetailsChange.builder().customLineItemId("customLineItemId") } }; + SetCustomLineItemShippingDetailsChange.builder().customLineItemId("customLineItemId") }, + new Object[] { "customLineItem", SetCustomLineItemShippingDetailsChange.builder() + .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; } @Test @@ -58,4 +60,12 @@ public void customLineItemId() { value.setCustomLineItemId("customLineItemId"); Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); } + + @Test + public void customLineItem() { + SetCustomLineItemShippingDetailsChange value = SetCustomLineItemShippingDetailsChange.of(); + value.setCustomLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getCustomLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeTest.java index 97f679c877a..044c7274e11 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomLineItemTaxedPriceChangeTest.java @@ -19,10 +19,10 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetCustomLineItemTaxedPriceChange.builder().change("change") }, new Object[] { "previousValue", SetCustomLineItemTaxedPriceChange.builder() - .previousValue(new com.commercetools.history.models.common.MoneyImpl()) }, + .previousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, new Object[] { "nextValue", SetCustomLineItemTaxedPriceChange.builder() - .nextValue(new com.commercetools.history.models.common.MoneyImpl()) }, + .nextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, new Object[] { "customLineItem", SetCustomLineItemTaxedPriceChange.builder() .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, @@ -40,16 +40,17 @@ public void change() { @Test public void previousValue() { SetCustomLineItemTaxedPriceChange value = SetCustomLineItemTaxedPriceChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.MoneyImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); } @Test public void nextValue() { SetCustomLineItemTaxedPriceChange value = SetCustomLineItemTaxedPriceChange.of(); - value.setNextValue(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getNextValue()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setNextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeTest.java new file mode 100644 index 00000000000..47ec5204e82 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetCustomerGroupAssignmentsChangeTest.java @@ -0,0 +1,86 @@ + +package com.commercetools.history.models.change; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetCustomerGroupAssignmentsChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetCustomerGroupAssignmentsChangeBuilder builder) { + SetCustomerGroupAssignmentsChange setCustomerGroupAssignmentsChange = builder.buildUnchecked(); + Assertions.assertThat(setCustomerGroupAssignmentsChange).isInstanceOf(SetCustomerGroupAssignmentsChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetCustomerGroupAssignmentsChange.builder().change("change") }, + new Object[] { "addedItems", + SetCustomerGroupAssignmentsChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())) }, + new Object[] { "removedItems", + SetCustomerGroupAssignmentsChange.builder() + .removedItems(Collections.singletonList( + new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())) }, + new Object[] { "previousValue", + SetCustomerGroupAssignmentsChange.builder() + .previousValue(Collections.singletonList( + new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())) }, + new Object[] { "nextValue", + SetCustomerGroupAssignmentsChange.builder() + .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())) } }; + } + + @Test + public void change() { + SetCustomerGroupAssignmentsChange value = SetCustomerGroupAssignmentsChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addedItems() { + SetCustomerGroupAssignmentsChange value = SetCustomerGroupAssignmentsChange.of(); + value.setAddedItems( + Collections.singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + } + + @Test + public void removedItems() { + SetCustomerGroupAssignmentsChange value = SetCustomerGroupAssignmentsChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + } + + @Test + public void previousValue() { + SetCustomerGroupAssignmentsChange value = SetCustomerGroupAssignmentsChange.of(); + value.setPreviousValue( + Collections.singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + } + + @Test + public void nextValue() { + SetCustomerGroupAssignmentsChange value = SetCustomerGroupAssignmentsChange.of(); + value.setNextValue( + Collections.singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.CustomerGroupAssignmentImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeTest.java new file mode 100644 index 00000000000..8ceba044151 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomFieldChangeTest.java @@ -0,0 +1,80 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDeliveryAddressCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDeliveryAddressCustomFieldChangeBuilder builder) { + SetDeliveryAddressCustomFieldChange setDeliveryAddressCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setDeliveryAddressCustomFieldChange) + .isInstanceOf(SetDeliveryAddressCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetDeliveryAddressCustomFieldChange.builder().change("change") }, + new Object[] { "deliveryId", SetDeliveryAddressCustomFieldChange.builder().deliveryId("deliveryId") }, + new Object[] { "addressId", SetDeliveryAddressCustomFieldChange.builder().addressId("addressId") }, + new Object[] { "name", SetDeliveryAddressCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetDeliveryAddressCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetDeliveryAddressCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetDeliveryAddressCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void deliveryId() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setDeliveryId("deliveryId"); + Assertions.assertThat(value.getDeliveryId()).isEqualTo("deliveryId"); + } + + @Test + public void addressId() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setAddressId("addressId"); + Assertions.assertThat(value.getAddressId()).isEqualTo("addressId"); + } + + @Test + public void name() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetDeliveryAddressCustomFieldChange value = SetDeliveryAddressCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeTest.java new file mode 100644 index 00000000000..098d08a8a9b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryAddressCustomTypeChangeTest.java @@ -0,0 +1,67 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDeliveryAddressCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDeliveryAddressCustomTypeChangeBuilder builder) { + SetDeliveryAddressCustomTypeChange setDeliveryAddressCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setDeliveryAddressCustomTypeChange) + .isInstanceOf(SetDeliveryAddressCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetDeliveryAddressCustomTypeChange.builder().change("change") }, + new Object[] { "deliveryId", SetDeliveryAddressCustomTypeChange.builder().deliveryId("deliveryId") }, + new Object[] { "addressId", SetDeliveryAddressCustomTypeChange.builder().addressId("addressId") }, + new Object[] { "previousValue", + SetDeliveryAddressCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetDeliveryAddressCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetDeliveryAddressCustomTypeChange value = SetDeliveryAddressCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void deliveryId() { + SetDeliveryAddressCustomTypeChange value = SetDeliveryAddressCustomTypeChange.of(); + value.setDeliveryId("deliveryId"); + Assertions.assertThat(value.getDeliveryId()).isEqualTo("deliveryId"); + } + + @Test + public void addressId() { + SetDeliveryAddressCustomTypeChange value = SetDeliveryAddressCustomTypeChange.of(); + value.setAddressId("addressId"); + Assertions.assertThat(value.getAddressId()).isEqualTo("addressId"); + } + + @Test + public void previousValue() { + SetDeliveryAddressCustomTypeChange value = SetDeliveryAddressCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetDeliveryAddressCustomTypeChange value = SetDeliveryAddressCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeTest.java new file mode 100644 index 00000000000..f41f03d19c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomFieldChangeTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDeliveryCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDeliveryCustomFieldChangeBuilder builder) { + SetDeliveryCustomFieldChange setDeliveryCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setDeliveryCustomFieldChange).isInstanceOf(SetDeliveryCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetDeliveryCustomFieldChange.builder().change("change") }, + new Object[] { "deliveryId", SetDeliveryCustomFieldChange.builder().deliveryId("deliveryId") }, + new Object[] { "name", SetDeliveryCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", SetDeliveryCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", SetDeliveryCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetDeliveryCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void deliveryId() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setDeliveryId("deliveryId"); + Assertions.assertThat(value.getDeliveryId()).isEqualTo("deliveryId"); + } + + @Test + public void name() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetDeliveryCustomFieldChange value = SetDeliveryCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeTest.java new file mode 100644 index 00000000000..c52f9c3735c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDeliveryCustomTypeChangeTest.java @@ -0,0 +1,57 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDeliveryCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDeliveryCustomTypeChangeBuilder builder) { + SetDeliveryCustomTypeChange setDeliveryCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setDeliveryCustomTypeChange).isInstanceOf(SetDeliveryCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetDeliveryCustomTypeChange.builder().change("change") }, + new Object[] { "deliveryId", SetDeliveryCustomTypeChange.builder().deliveryId("deliveryId") }, + new Object[] { "previousValue", + SetDeliveryCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetDeliveryCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetDeliveryCustomTypeChange value = SetDeliveryCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void deliveryId() { + SetDeliveryCustomTypeChange value = SetDeliveryCustomTypeChange.of(); + value.setDeliveryId("deliveryId"); + Assertions.assertThat(value.getDeliveryId()).isEqualTo("deliveryId"); + } + + @Test + public void previousValue() { + SetDeliveryCustomTypeChange value = SetDeliveryCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetDeliveryCustomTypeChange value = SetDeliveryCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeTest.java new file mode 100644 index 00000000000..9aa5bd2494e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountOnTotalPriceChangeTest.java @@ -0,0 +1,48 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetDiscountOnTotalPriceChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetDiscountOnTotalPriceChangeBuilder builder) { + SetDiscountOnTotalPriceChange setDiscountOnTotalPriceChange = builder.buildUnchecked(); + Assertions.assertThat(setDiscountOnTotalPriceChange).isInstanceOf(SetDiscountOnTotalPriceChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetDiscountOnTotalPriceChange.builder().change("change") }, + new Object[] { "previousValue", SetDiscountOnTotalPriceChange.builder() + .previousValue(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()) }, + new Object[] { "nextValue", SetDiscountOnTotalPriceChange.builder() + .nextValue(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()) } }; + } + + @Test + public void change() { + SetDiscountOnTotalPriceChange value = SetDiscountOnTotalPriceChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetDiscountOnTotalPriceChange value = SetDiscountOnTotalPriceChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()); + } + + @Test + public void nextValue() { + SetDiscountOnTotalPriceChange value = SetDiscountOnTotalPriceChange.of(); + value.setNextValue(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountOnTotalPriceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeTest.java index 45f25476865..d133dc19de1 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDiscountedPriceChangeTest.java @@ -19,13 +19,15 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetDiscountedPriceChange.builder().change("change") }, new Object[] { "previousValue", SetDiscountedPriceChange.builder() - .previousValue(new com.commercetools.history.models.common.PriceImpl()) }, + .previousValue(new com.commercetools.history.models.common.DiscountedPriceImpl()) }, new Object[] { "nextValue", SetDiscountedPriceChange.builder() - .nextValue(new com.commercetools.history.models.common.PriceImpl()) }, + .nextValue(new com.commercetools.history.models.common.DiscountedPriceImpl()) }, new Object[] { "catalogData", SetDiscountedPriceChange.builder().catalogData("catalogData") }, new Object[] { "variant", SetDiscountedPriceChange.builder().variant("variant") }, - new Object[] { "priceId", SetDiscountedPriceChange.builder().priceId("priceId") } }; + new Object[] { "priceId", SetDiscountedPriceChange.builder().priceId("priceId") }, + new Object[] { "price", SetDiscountedPriceChange.builder() + .price(new com.commercetools.history.models.common.PriceImpl()) } }; } @Test @@ -38,16 +40,17 @@ public void change() { @Test public void previousValue() { SetDiscountedPriceChange value = SetDiscountedPriceChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.PriceImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.DiscountedPriceImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.PriceImpl()); + .isEqualTo(new com.commercetools.history.models.common.DiscountedPriceImpl()); } @Test public void nextValue() { SetDiscountedPriceChange value = SetDiscountedPriceChange.of(); - value.setNextValue(new com.commercetools.history.models.common.PriceImpl()); - Assertions.assertThat(value.getNextValue()).isEqualTo(new com.commercetools.history.models.common.PriceImpl()); + value.setNextValue(new com.commercetools.history.models.common.DiscountedPriceImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedPriceImpl()); } @Test @@ -70,4 +73,11 @@ public void priceId() { value.setPriceId("priceId"); Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); } + + @Test + public void price() { + SetDiscountedPriceChange value = SetDiscountedPriceChange.of(); + value.setPrice(new com.commercetools.history.models.common.PriceImpl()); + Assertions.assertThat(value.getPrice()).isEqualTo(new com.commercetools.history.models.common.PriceImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeTest.java index 6e5a58a96ed..7c987d8f47c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetDistributionChannelsChangeTest.java @@ -23,8 +23,16 @@ public static Object[][] objectBuilder() { SetDistributionChannelsChange.builder() .previousValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "nextValue", SetDistributionChannelsChange.builder() - .nextValue( + new Object[] { "nextValue", + SetDistributionChannelsChange.builder() + .nextValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "addedItems", + SetDistributionChannelsChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "removedItems", SetDistributionChannelsChange.builder() + .removedItems( Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; } @@ -50,4 +58,20 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); } + + @Test + public void addedItems() { + SetDistributionChannelsChange value = SetDistributionChannelsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void removedItems() { + SetDistributionChannelsChange value = SetDistributionChannelsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetImageLabelChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetImageLabelChangeTest.java index 8fcfddbe23e..98ac078ff88 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetImageLabelChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetImageLabelChangeTest.java @@ -23,7 +23,8 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetImageLabelChange.builder() .nextValue(new com.commercetools.history.models.common.ImageImpl()) }, - new Object[] { "catalogData", SetImageLabelChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", SetImageLabelChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetImageLabelChange.builder().variant("variant") } }; } @Test @@ -54,4 +55,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetImageLabelChange value = SetImageLabelChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeTest.java new file mode 100644 index 00000000000..c6ed7365923 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedAssociatesChangeTest.java @@ -0,0 +1,86 @@ + +package com.commercetools.history.models.change; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetInheritedAssociatesChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetInheritedAssociatesChangeBuilder builder) { + SetInheritedAssociatesChange setInheritedAssociatesChange = builder.buildUnchecked(); + Assertions.assertThat(setInheritedAssociatesChange).isInstanceOf(SetInheritedAssociatesChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetInheritedAssociatesChange.builder().change("change") }, + new Object[] { "addedItems", + SetInheritedAssociatesChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.InheritedAssociateImpl())) }, + new Object[] { "removedItems", + SetInheritedAssociatesChange.builder() + .removedItems(Collections.singletonList( + new com.commercetools.history.models.common.InheritedAssociateImpl())) }, + new Object[] { "previousValue", + SetInheritedAssociatesChange.builder() + .previousValue(Collections.singletonList( + new com.commercetools.history.models.common.InheritedAssociateImpl())) }, + new Object[] { "nextValue", + SetInheritedAssociatesChange.builder() + .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.InheritedAssociateImpl())) } }; + } + + @Test + public void change() { + SetInheritedAssociatesChange value = SetInheritedAssociatesChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addedItems() { + SetInheritedAssociatesChange value = SetInheritedAssociatesChange.of(); + value.setAddedItems( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + } + + @Test + public void removedItems() { + SetInheritedAssociatesChange value = SetInheritedAssociatesChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + } + + @Test + public void previousValue() { + SetInheritedAssociatesChange value = SetInheritedAssociatesChange.of(); + value.setPreviousValue( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + } + + @Test + public void nextValue() { + SetInheritedAssociatesChange value = SetInheritedAssociatesChange.of(); + value.setNextValue( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + Assertions.assertThat(value.getNextValue()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.InheritedAssociateImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeTest.java new file mode 100644 index 00000000000..fa0bae3e2d3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetInheritedStoresChangeTest.java @@ -0,0 +1,80 @@ + +package com.commercetools.history.models.change; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetInheritedStoresChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetInheritedStoresChangeBuilder builder) { + SetInheritedStoresChange setInheritedStoresChange = builder.buildUnchecked(); + Assertions.assertThat(setInheritedStoresChange).isInstanceOf(SetInheritedStoresChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetInheritedStoresChange.builder().change("change") }, + new Object[] { "addedItems", + SetInheritedStoresChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) }, + new Object[] { "removedItems", + SetInheritedStoresChange.builder() + .removedItems(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) }, + new Object[] { "previousValue", + SetInheritedStoresChange.builder() + .previousValue(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) }, + new Object[] { "nextValue", + SetInheritedStoresChange.builder() + .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) } }; + } + + @Test + public void change() { + SetInheritedStoresChange value = SetInheritedStoresChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addedItems() { + SetInheritedStoresChange value = SetInheritedStoresChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } + + @Test + public void removedItems() { + SetInheritedStoresChange value = SetInheritedStoresChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } + + @Test + public void previousValue() { + SetInheritedStoresChange value = SetInheritedStoresChange.of(); + value.setPreviousValue( + Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } + + @Test + public void nextValue() { + SetInheritedStoresChange value = SetInheritedStoresChange.of(); + value.setNextValue(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeTest.java new file mode 100644 index 00000000000..3eadb25b0ed --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomFieldChangeTest.java @@ -0,0 +1,73 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetItemShippingAddressCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetItemShippingAddressCustomFieldChangeBuilder builder) { + SetItemShippingAddressCustomFieldChange setItemShippingAddressCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setItemShippingAddressCustomFieldChange) + .isInstanceOf(SetItemShippingAddressCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetItemShippingAddressCustomFieldChange.builder().change("change") }, + new Object[] { "addressId", SetItemShippingAddressCustomFieldChange.builder().addressId("addressId") }, + new Object[] { "name", SetItemShippingAddressCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetItemShippingAddressCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetItemShippingAddressCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", + SetItemShippingAddressCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addressId() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setAddressId("addressId"); + Assertions.assertThat(value.getAddressId()).isEqualTo("addressId"); + } + + @Test + public void name() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetItemShippingAddressCustomFieldChange value = SetItemShippingAddressCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeTest.java new file mode 100644 index 00000000000..8b8a0e52ed1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetItemShippingAddressCustomTypeChangeTest.java @@ -0,0 +1,59 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetItemShippingAddressCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetItemShippingAddressCustomTypeChangeBuilder builder) { + SetItemShippingAddressCustomTypeChange setItemShippingAddressCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setItemShippingAddressCustomTypeChange) + .isInstanceOf(SetItemShippingAddressCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetItemShippingAddressCustomTypeChange.builder().change("change") }, + new Object[] { "addressId", SetItemShippingAddressCustomTypeChange.builder().addressId("addressId") }, + new Object[] { "previousValue", + SetItemShippingAddressCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetItemShippingAddressCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetItemShippingAddressCustomTypeChange value = SetItemShippingAddressCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void addressId() { + SetItemShippingAddressCustomTypeChange value = SetItemShippingAddressCustomTypeChange.of(); + value.setAddressId("addressId"); + Assertions.assertThat(value.getAddressId()).isEqualTo("addressId"); + } + + @Test + public void previousValue() { + SetItemShippingAddressCustomTypeChange value = SetItemShippingAddressCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetItemShippingAddressCustomTypeChange value = SetItemShippingAddressCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLanguagesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLanguagesChangeTest.java index 7ee41df694c..f530485ca13 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLanguagesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLanguagesChangeTest.java @@ -22,7 +22,11 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", SetLanguagesChange.builder().previousValue(Collections.singletonList("previousValue")) }, new Object[] { "nextValue", - SetLanguagesChange.builder().nextValue(Collections.singletonList("nextValue")) } }; + SetLanguagesChange.builder().nextValue(Collections.singletonList("nextValue")) }, + new Object[] { "addedItems", + SetLanguagesChange.builder().addedItems(Collections.singletonList("addedItems")) }, + new Object[] { "removedItems", + SetLanguagesChange.builder().removedItems(Collections.singletonList("removedItems")) } }; } @Test @@ -45,4 +49,18 @@ public void nextValue() { value.setNextValue(Collections.singletonList("nextValue")); Assertions.assertThat(value.getNextValue()).isEqualTo(Collections.singletonList("nextValue")); } + + @Test + public void addedItems() { + SetLanguagesChange value = SetLanguagesChange.of(); + value.setAddedItems(Collections.singletonList("addedItems")); + Assertions.assertThat(value.getAddedItems()).isEqualTo(Collections.singletonList("addedItems")); + } + + @Test + public void removedItems() { + SetLanguagesChange value = SetLanguagesChange.of(); + value.setRemovedItems(Collections.singletonList("removedItems")); + Assertions.assertThat(value.getRemovedItems()).isEqualTo(Collections.singletonList("removedItems")); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeTest.java index ad180675f5b..79374728f76 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPriceChangeTest.java @@ -25,7 +25,8 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetLineItemDiscountedPriceChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "variant", SetLineItemDiscountedPriceChange.builder().variant("variant") } }; + new Object[] { "variant", SetLineItemDiscountedPriceChange.builder().variant("variant") }, + new Object[] { "lineItemId", SetLineItemDiscountedPriceChange.builder().lineItemId("lineItemId") } }; } @Test @@ -65,4 +66,11 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void lineItemId() { + SetLineItemDiscountedPriceChange value = SetLineItemDiscountedPriceChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeTest.java index 00a850b5bad..98e50471c35 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemDiscountedPricePerQuantityChangeTest.java @@ -29,7 +29,9 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetLineItemDiscountedPricePerQuantityChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "variant", SetLineItemDiscountedPricePerQuantityChange.builder().variant("variant") } }; + new Object[] { "variant", SetLineItemDiscountedPricePerQuantityChange.builder().variant("variant") }, + new Object[] { "lineItemId", + SetLineItemDiscountedPricePerQuantityChange.builder().lineItemId("lineItemId") } }; } @Test @@ -69,4 +71,11 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void lineItemId() { + SetLineItemDiscountedPricePerQuantityChange value = SetLineItemDiscountedPricePerQuantityChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeTest.java index 1a0f6bfd660..9667659a2a1 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemPriceChangeTest.java @@ -23,8 +23,10 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetLineItemPriceChange.builder() .nextValue(new com.commercetools.history.models.common.PriceImpl()) }, - new Object[] { "lineItem", SetLineItemPriceChange.builder() - .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "lineItem", + SetLineItemPriceChange.builder() + .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "lineItemId", SetLineItemPriceChange.builder().lineItemId("lineItemId") } }; } @Test @@ -56,4 +58,11 @@ public void lineItem() { Assertions.assertThat(value.getLineItem()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void lineItemId() { + SetLineItemPriceChange value = SetLineItemPriceChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeTest.java index cd1cb600671..c5b2871dcb3 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemProductSlugChangeTest.java @@ -26,7 +26,8 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetLineItemProductSlugChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "variant", SetLineItemProductSlugChange.builder().variant("variant") } }; + new Object[] { "variant", SetLineItemProductSlugChange.builder().variant("variant") }, + new Object[] { "lineItemId", SetLineItemProductSlugChange.builder().lineItemId("lineItemId") } }; } @Test @@ -66,4 +67,11 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void lineItemId() { + SetLineItemProductSlugChange value = SetLineItemProductSlugChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeTest.java index 1ced7a5a505..b20308d0e6d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemShippingDetailsChangeTest.java @@ -23,7 +23,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetLineItemShippingDetailsChange.builder() .nextValue(new com.commercetools.history.models.common.ItemShippingDetailsImpl()) }, - new Object[] { "lineItemId", SetLineItemShippingDetailsChange.builder().lineItemId("lineItemId") } }; + new Object[] { "lineItemId", SetLineItemShippingDetailsChange.builder().lineItemId("lineItemId") }, + new Object[] { "lineItem", + SetLineItemShippingDetailsChange.builder() + .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "variant", SetLineItemShippingDetailsChange.builder().variant("variant") } }; } @Test @@ -55,4 +59,19 @@ public void lineItemId() { value.setLineItemId("lineItemId"); Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); } + + @Test + public void lineItem() { + SetLineItemShippingDetailsChange value = SetLineItemShippingDetailsChange.of(); + value.setLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void variant() { + SetLineItemShippingDetailsChange value = SetLineItemShippingDetailsChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeTest.java index ea0a951de6f..685491640c6 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxAmountChangeTest.java @@ -27,8 +27,10 @@ public static Object[][] objectBuilder() { SetLineItemTaxAmountChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "variant", SetLineItemTaxAmountChange.builder().variant("variant") }, - new Object[] { "taxMode", SetLineItemTaxAmountChange.builder() - .taxMode(com.commercetools.history.models.common.TaxMode.findEnum("Platform")) } }; + new Object[] { "taxMode", + SetLineItemTaxAmountChange.builder() + .taxMode(com.commercetools.history.models.common.TaxMode.findEnum("Platform")) }, + new Object[] { "lineItemId", SetLineItemTaxAmountChange.builder().lineItemId("lineItemId") } }; } @Test @@ -76,4 +78,11 @@ public void taxMode() { Assertions.assertThat(value.getTaxMode()) .isEqualTo(com.commercetools.history.models.common.TaxMode.findEnum("Platform")); } + + @Test + public void lineItemId() { + SetLineItemTaxAmountChange value = SetLineItemTaxAmountChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeTest.java index 721b0889cd0..e44f387f87f 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxRateChangeTest.java @@ -27,8 +27,10 @@ public static Object[][] objectBuilder() { SetLineItemTaxRateChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "variant", SetLineItemTaxRateChange.builder().variant("variant") }, - new Object[] { "taxMode", SetLineItemTaxRateChange.builder() - .taxMode(com.commercetools.history.models.common.TaxMode.findEnum("Platform")) } }; + new Object[] { "taxMode", + SetLineItemTaxRateChange.builder() + .taxMode(com.commercetools.history.models.common.TaxMode.findEnum("Platform")) }, + new Object[] { "lineItemId", SetLineItemTaxRateChange.builder().lineItemId("lineItemId") } }; } @Test @@ -76,4 +78,11 @@ public void taxMode() { Assertions.assertThat(value.getTaxMode()) .isEqualTo(com.commercetools.history.models.common.TaxMode.findEnum("Platform")); } + + @Test + public void lineItemId() { + SetLineItemTaxRateChange value = SetLineItemTaxRateChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeTest.java index c46755ae428..f880c06b27d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTaxedPriceChangeTest.java @@ -26,7 +26,8 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetLineItemTaxedPriceChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "lineItemId", SetLineItemTaxedPriceChange.builder().lineItemId("lineItemId") } }; + new Object[] { "lineItemId", SetLineItemTaxedPriceChange.builder().lineItemId("lineItemId") }, + new Object[] { "variant", SetLineItemTaxedPriceChange.builder().variant("variant") } }; } @Test @@ -66,4 +67,11 @@ public void lineItemId() { value.setLineItemId("lineItemId"); Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); } + + @Test + public void variant() { + SetLineItemTaxedPriceChange value = SetLineItemTaxedPriceChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeTest.java index 43b0957307f..70be5f06526 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetLineItemTotalPriceChangeTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetLineItemTotalPriceChange.builder() .nextValue(new com.commercetools.history.models.common.MoneyImpl()) }, - new Object[] { "lineItem", SetLineItemTotalPriceChange.builder() - .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "lineItem", + SetLineItemTotalPriceChange.builder() + .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "lineItemId", SetLineItemTotalPriceChange.builder().lineItemId("lineItemId") }, + new Object[] { "variant", SetLineItemTotalPriceChange.builder().variant("variant") } }; } @Test @@ -56,4 +59,18 @@ public void lineItem() { Assertions.assertThat(value.getLineItem()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void lineItemId() { + SetLineItemTotalPriceChange value = SetLineItemTotalPriceChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } + + @Test + public void variant() { + SetLineItemTotalPriceChange value = SetLineItemTotalPriceChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeTest.java new file mode 100644 index 00000000000..583e01efbbe --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMaxCartQuantityChangeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetMaxCartQuantityChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetMaxCartQuantityChangeBuilder builder) { + SetMaxCartQuantityChange setMaxCartQuantityChange = builder.buildUnchecked(); + Assertions.assertThat(setMaxCartQuantityChange).isInstanceOf(SetMaxCartQuantityChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetMaxCartQuantityChange.builder().change("change") }, + new Object[] { "previousValue", SetMaxCartQuantityChange.builder().previousValue(8) }, + new Object[] { "nextValue", SetMaxCartQuantityChange.builder().nextValue(7) } }; + } + + @Test + public void change() { + SetMaxCartQuantityChange value = SetMaxCartQuantityChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetMaxCartQuantityChange value = SetMaxCartQuantityChange.of(); + value.setPreviousValue(8); + Assertions.assertThat(value.getPreviousValue()).isEqualTo(8); + } + + @Test + public void nextValue() { + SetMaxCartQuantityChange value = SetMaxCartQuantityChange.of(); + value.setNextValue(7); + Assertions.assertThat(value.getNextValue()).isEqualTo(7); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeTest.java index 7cb1cb9c1d9..da20beaea90 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaDescriptionChangeTest.java @@ -20,8 +20,10 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", SetMetaDescriptionChange.builder() .previousValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "nextValue", SetMetaDescriptionChange.builder() - .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "nextValue", + SetMetaDescriptionChange.builder() + .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "catalogData", SetMetaDescriptionChange.builder().catalogData("catalogData") } }; } @Test @@ -46,4 +48,11 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void catalogData() { + SetMetaDescriptionChange value = SetMetaDescriptionChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeTest.java index d45d0db8884..968c5b52f11 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaKeywordsChangeTest.java @@ -20,8 +20,10 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", SetMetaKeywordsChange.builder() .previousValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "nextValue", SetMetaKeywordsChange.builder() - .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "nextValue", + SetMetaKeywordsChange.builder() + .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "catalogData", SetMetaKeywordsChange.builder().catalogData("catalogData") } }; } @Test @@ -46,4 +48,11 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void catalogData() { + SetMetaKeywordsChange value = SetMetaKeywordsChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeTest.java index 7a0eaa4bbea..34739f4cac1 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMetaTitleChangeTest.java @@ -20,8 +20,10 @@ public static Object[][] objectBuilder() { new Object[] { "previousValue", SetMetaTitleChange.builder() .previousValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "nextValue", SetMetaTitleChange.builder() - .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + new Object[] { "nextValue", + SetMetaTitleChange.builder() + .nextValue(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "catalogData", SetMetaTitleChange.builder().catalogData("catalogData") } }; } @Test @@ -46,4 +48,11 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + + @Test + public void catalogData() { + SetMetaTitleChange value = SetMetaTitleChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeTest.java new file mode 100644 index 00000000000..edea2972f60 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetMinCartQuantityChangeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetMinCartQuantityChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetMinCartQuantityChangeBuilder builder) { + SetMinCartQuantityChange setMinCartQuantityChange = builder.buildUnchecked(); + Assertions.assertThat(setMinCartQuantityChange).isInstanceOf(SetMinCartQuantityChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetMinCartQuantityChange.builder().change("change") }, + new Object[] { "previousValue", SetMinCartQuantityChange.builder().previousValue(8) }, + new Object[] { "nextValue", SetMinCartQuantityChange.builder().nextValue(7) } }; + } + + @Test + public void change() { + SetMinCartQuantityChange value = SetMinCartQuantityChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetMinCartQuantityChange value = SetMinCartQuantityChange.of(); + value.setPreviousValue(8); + Assertions.assertThat(value.getPreviousValue()).isEqualTo(8); + } + + @Test + public void nextValue() { + SetMinCartQuantityChange value = SetMinCartQuantityChange.of(); + value.setNextValue(7); + Assertions.assertThat(value.getNextValue()).isEqualTo(7); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeTest.java index 9101fff32c6..ce72a61dc97 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomFieldChangeTest.java @@ -26,7 +26,8 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetOrderLineItemCustomFieldChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "variant", SetOrderLineItemCustomFieldChange.builder().variant("variant") } }; + new Object[] { "variant", SetOrderLineItemCustomFieldChange.builder().variant("variant") }, + new Object[] { "lineItemId", SetOrderLineItemCustomFieldChange.builder().lineItemId("lineItemId") } }; } @Test @@ -78,4 +79,11 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void lineItemId() { + SetOrderLineItemCustomFieldChange value = SetOrderLineItemCustomFieldChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeTest.java index 25e8dc100d9..bbc4accf42c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderLineItemCustomTypeChangeTest.java @@ -26,7 +26,8 @@ public static Object[][] objectBuilder() { new Object[] { "lineItem", SetOrderLineItemCustomTypeChange.builder() .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "variant", SetOrderLineItemCustomTypeChange.builder().variant("variant") } }; + new Object[] { "variant", SetOrderLineItemCustomTypeChange.builder().variant("variant") }, + new Object[] { "lineItemId", SetOrderLineItemCustomTypeChange.builder().lineItemId("lineItemId") } }; } @Test @@ -66,4 +67,11 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void lineItemId() { + SetOrderLineItemCustomTypeChange value = SetOrderLineItemCustomTypeChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeTest.java index c63832aafcb..b9fdc8362e5 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetOrderTaxedPriceChangeTest.java @@ -19,10 +19,10 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetOrderTaxedPriceChange.builder().change("change") }, new Object[] { "previousValue", SetOrderTaxedPriceChange.builder() - .previousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, + .previousValue(new com.commercetools.history.models.common.TaxedPriceImpl()) }, new Object[] { "nextValue", SetOrderTaxedPriceChange.builder() - .nextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, + .nextValue(new com.commercetools.history.models.common.TaxedPriceImpl()) }, new Object[] { "taxMode", SetOrderTaxedPriceChange.builder() .taxMode(com.commercetools.history.models.common.TaxMode.findEnum("Platform")) } }; } @@ -37,17 +37,17 @@ public void change() { @Test public void previousValue() { SetOrderTaxedPriceChange value = SetOrderTaxedPriceChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.TaxedPriceImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + .isEqualTo(new com.commercetools.history.models.common.TaxedPriceImpl()); } @Test public void nextValue() { SetOrderTaxedPriceChange value = SetOrderTaxedPriceChange.of(); - value.setNextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + value.setNextValue(new com.commercetools.history.models.common.TaxedPriceImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + .isEqualTo(new com.commercetools.history.models.common.TaxedPriceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeTest.java new file mode 100644 index 00000000000..3553a6e456c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomFieldChangeTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetParcelCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetParcelCustomFieldChangeBuilder builder) { + SetParcelCustomFieldChange setParcelCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setParcelCustomFieldChange).isInstanceOf(SetParcelCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetParcelCustomFieldChange.builder().change("change") }, + new Object[] { "parcel", + SetParcelCustomFieldChange.builder() + .parcel(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()) }, + new Object[] { "customTypeId", SetParcelCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "name", SetParcelCustomFieldChange.builder().name("name") }, + new Object[] { "previousValue", SetParcelCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetParcelCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void parcel() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setParcel(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()); + Assertions.assertThat(value.getParcel()) + .isEqualTo(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()); + } + + @Test + public void customTypeId() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void name() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void previousValue() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetParcelCustomFieldChange value = SetParcelCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeTest.java new file mode 100644 index 00000000000..f1bd23d52be --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetParcelCustomTypeChangeTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetParcelCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetParcelCustomTypeChangeBuilder builder) { + SetParcelCustomTypeChange setParcelCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setParcelCustomTypeChange).isInstanceOf(SetParcelCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetParcelCustomTypeChange.builder().change("change") }, + new Object[] { "parcel", + SetParcelCustomTypeChange.builder() + .parcel(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()) }, + new Object[] { "previousValue", + SetParcelCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetParcelCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetParcelCustomTypeChange value = SetParcelCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void parcel() { + SetParcelCustomTypeChange value = SetParcelCustomTypeChange.of(); + value.setParcel(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()); + Assertions.assertThat(value.getParcel()) + .isEqualTo(new com.commercetools.history.models.change_value.ParcelChangeValueImpl()); + } + + @Test + public void previousValue() { + SetParcelCustomTypeChange value = SetParcelCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetParcelCustomTypeChange value = SetParcelCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPasswordChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPasswordChangeTest.java new file mode 100644 index 00000000000..a023e8fce5b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPasswordChangeTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPasswordChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPasswordChangeBuilder builder) { + SetPasswordChange setPasswordChange = builder.buildUnchecked(); + Assertions.assertThat(setPasswordChange).isInstanceOf(SetPasswordChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetPasswordChange.builder().change("change") } }; + } + + @Test + public void change() { + SetPasswordChange value = SetPasswordChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPermissionsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPermissionsChangeTest.java index 6eb31216b45..5c7123b474b 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPermissionsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPermissionsChangeTest.java @@ -26,6 +26,14 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetPermissionsChange.builder() .nextValue(Collections.singletonList( + com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))) }, + new Object[] { "addedItems", + SetPermissionsChange.builder() + .addedItems(Collections.singletonList( + com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))) }, + new Object[] { "removedItems", + SetPermissionsChange.builder() + .removedItems(Collections.singletonList( com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))) } }; } @@ -55,4 +63,24 @@ public void nextValue() { .isEqualTo(Collections .singletonList(com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))); } + + @Test + public void addedItems() { + SetPermissionsChange value = SetPermissionsChange.of(); + value.setAddedItems( + Collections.singletonList(com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections + .singletonList(com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))); + } + + @Test + public void removedItems() { + SetPermissionsChange value = SetPermissionsChange.of(); + value.setRemovedItems( + Collections.singletonList(com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections + .singletonList(com.commercetools.history.models.common.Permission.findEnum("AddChildUnits"))); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeTest.java new file mode 100644 index 00000000000..e9be072d43b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceKeyChangeTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPriceKeyChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPriceKeyChangeBuilder builder) { + SetPriceKeyChange setPriceKeyChange = builder.buildUnchecked(); + Assertions.assertThat(setPriceKeyChange).isInstanceOf(SetPriceKeyChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetPriceKeyChange.builder().change("change") }, + new Object[] { "catalogData", SetPriceKeyChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetPriceKeyChange.builder().variant("variant") }, + new Object[] { "priceId", SetPriceKeyChange.builder().priceId("priceId") }, + new Object[] { "previousValue", SetPriceKeyChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetPriceKeyChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void catalogData() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void variant() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } + + @Test + public void priceId() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void previousValue() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetPriceKeyChange value = SetPriceKeyChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceModeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceModeChangeTest.java new file mode 100644 index 00000000000..24999eac9b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPriceModeChangeTest.java @@ -0,0 +1,51 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetPriceModeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetPriceModeChangeBuilder builder) { + SetPriceModeChange setPriceModeChange = builder.buildUnchecked(); + Assertions.assertThat(setPriceModeChange).isInstanceOf(SetPriceModeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetPriceModeChange.builder().change("change") }, + new Object[] { "previousValue", + SetPriceModeChange.builder() + .previousValue(com.commercetools.history.models.common.ProductPriceModeEnum + .findEnum("Embedded")) }, + new Object[] { "nextValue", SetPriceModeChange.builder() + .nextValue( + com.commercetools.history.models.common.ProductPriceModeEnum.findEnum("Embedded")) } }; + } + + @Test + public void change() { + SetPriceModeChange value = SetPriceModeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetPriceModeChange value = SetPriceModeChange.of(); + value.setPreviousValue(com.commercetools.history.models.common.ProductPriceModeEnum.findEnum("Embedded")); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(com.commercetools.history.models.common.ProductPriceModeEnum.findEnum("Embedded")); + } + + @Test + public void nextValue() { + SetPriceModeChange value = SetPriceModeChange.of(); + value.setNextValue(com.commercetools.history.models.common.ProductPriceModeEnum.findEnum("Embedded")); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(com.commercetools.history.models.common.ProductPriceModeEnum.findEnum("Embedded")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPricesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPricesChangeTest.java index afd2faf41c7..c252d686e17 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPricesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetPricesChangeTest.java @@ -28,7 +28,14 @@ public static Object[][] objectBuilder() { .nextValue(Collections .singletonList(new com.commercetools.history.models.common.PriceImpl())) }, new Object[] { "catalogData", SetPricesChange.builder().catalogData("catalogData") }, - new Object[] { "variant", SetPricesChange.builder().variant("variant") } }; + new Object[] { "variant", SetPricesChange.builder().variant("variant") }, + new Object[] { "addedItems", + SetPricesChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.PriceImpl())) }, + new Object[] { "removedItems", SetPricesChange.builder() + .removedItems( + Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())) } }; } @Test @@ -67,4 +74,20 @@ public void variant() { value.setVariant("variant"); Assertions.assertThat(value.getVariant()).isEqualTo("variant"); } + + @Test + public void addedItems() { + SetPricesChange value = SetPricesChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + } + + @Test + public void removedItems() { + SetPricesChange value = SetPricesChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeTest.java new file mode 100644 index 00000000000..5416512c9e5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductAttributeChangeTest.java @@ -0,0 +1,57 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetProductAttributeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetProductAttributeChangeBuilder builder) { + SetProductAttributeChange setProductAttributeChange = builder.buildUnchecked(); + Assertions.assertThat(setProductAttributeChange).isInstanceOf(SetProductAttributeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetProductAttributeChange.builder().change("change") }, + new Object[] { "catalogData", SetProductAttributeChange.builder().catalogData("catalogData") }, + new Object[] { "previousValue", + SetProductAttributeChange.builder() + .previousValue(new com.commercetools.history.models.common.AttributeImpl()) }, + new Object[] { "nextValue", SetProductAttributeChange.builder() + .nextValue(new com.commercetools.history.models.common.AttributeImpl()) } }; + } + + @Test + public void change() { + SetProductAttributeChange value = SetProductAttributeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void catalogData() { + SetProductAttributeChange value = SetProductAttributeChange.of(); + value.setCatalogData("catalogData"); + Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); + } + + @Test + public void previousValue() { + SetProductAttributeChange value = SetProductAttributeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.AttributeImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.AttributeImpl()); + } + + @Test + public void nextValue() { + SetProductAttributeChange value = SetProductAttributeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.AttributeImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.AttributeImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeTest.java index 24a4e8082bc..c52f7a3602c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomFieldChangeTest.java @@ -23,7 +23,12 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetProductPriceCustomFieldChange.builder() .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, - new Object[] { "catalogData", SetProductPriceCustomFieldChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", SetProductPriceCustomFieldChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetProductPriceCustomFieldChange.builder().variant("variant") }, + new Object[] { "priceId", SetProductPriceCustomFieldChange.builder().priceId("priceId") }, + new Object[] { "customTypeId", + SetProductPriceCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "name", SetProductPriceCustomFieldChange.builder().name("name") } }; } @Test @@ -55,4 +60,32 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetProductPriceCustomFieldChange value = SetProductPriceCustomFieldChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } + + @Test + public void priceId() { + SetProductPriceCustomFieldChange value = SetProductPriceCustomFieldChange.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } + + @Test + public void customTypeId() { + SetProductPriceCustomFieldChange value = SetProductPriceCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void name() { + SetProductPriceCustomFieldChange value = SetProductPriceCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeTest.java index 92546961236..68ece9c5880 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductPriceCustomTypeChangeTest.java @@ -23,7 +23,9 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetProductPriceCustomTypeChange.builder() .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, - new Object[] { "catalogData", SetProductPriceCustomTypeChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", SetProductPriceCustomTypeChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetProductPriceCustomTypeChange.builder().variant("variant") }, + new Object[] { "priceId", SetProductPriceCustomTypeChange.builder().priceId("priceId") } }; } @Test @@ -55,4 +57,18 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetProductPriceCustomTypeChange value = SetProductPriceCustomTypeChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } + + @Test + public void priceId() { + SetProductPriceCustomTypeChange value = SetProductPriceCustomTypeChange.of(); + value.setPriceId("priceId"); + Assertions.assertThat(value.getPriceId()).isEqualTo("priceId"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeTest.java index 1f2aef4e919..81ef607f044 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductSelectionsChangeTest.java @@ -26,6 +26,14 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetProductSelectionsChange.builder() .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.ProductSelectionSettingImpl())) }, + new Object[] { "addedItems", + SetProductSelectionsChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.ProductSelectionSettingImpl())) }, + new Object[] { "removedItems", + SetProductSelectionsChange.builder() + .removedItems(Collections.singletonList( new com.commercetools.history.models.common.ProductSelectionSettingImpl())) } }; } @@ -55,4 +63,24 @@ public void nextValue() { .isEqualTo(Collections .singletonList(new com.commercetools.history.models.common.ProductSelectionSettingImpl())); } + + @Test + public void addedItems() { + SetProductSelectionsChange value = SetProductSelectionsChange.of(); + value.setAddedItems( + Collections.singletonList(new com.commercetools.history.models.common.ProductSelectionSettingImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.ProductSelectionSettingImpl())); + } + + @Test + public void removedItems() { + SetProductSelectionsChange value = SetProductSelectionsChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.ProductSelectionSettingImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.ProductSelectionSettingImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeTest.java index 561c60bd07a..371c9e09dcb 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetProductVariantKeyChangeTest.java @@ -19,7 +19,8 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetProductVariantKeyChange.builder().change("change") }, new Object[] { "previousValue", SetProductVariantKeyChange.builder().previousValue("previousValue") }, new Object[] { "nextValue", SetProductVariantKeyChange.builder().nextValue("nextValue") }, - new Object[] { "catalogData", SetProductVariantKeyChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", SetProductVariantKeyChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetProductVariantKeyChange.builder().variant("variant") } }; } @Test @@ -49,4 +50,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetProductVariantKeyChange value = SetProductVariantKeyChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReservationsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReservationsChangeTest.java index 13691aee367..0b1f7699311 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReservationsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReservationsChangeTest.java @@ -26,6 +26,14 @@ public static Object[][] objectBuilder() { new Object[] { "nextValue", SetReservationsChange.builder() .nextValue(Collections.singletonList( + new com.commercetools.history.models.common.ReservationImpl())) }, + new Object[] { "addedItems", + SetReservationsChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.ReservationImpl())) }, + new Object[] { "removedItems", + SetReservationsChange.builder() + .removedItems(Collections.singletonList( new com.commercetools.history.models.common.ReservationImpl())) } }; } @@ -52,4 +60,20 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReservationImpl())); } + + @Test + public void addedItems() { + SetReservationsChange value = SetReservationsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReservationImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReservationImpl())); + } + + @Test + public void removedItems() { + SetReservationsChange value = SetReservationsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReservationImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReservationImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeTest.java new file mode 100644 index 00000000000..618616fe7a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnInfoChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetReturnInfoChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetReturnInfoChangeBuilder builder) { + SetReturnInfoChange setReturnInfoChange = builder.buildUnchecked(); + Assertions.assertThat(setReturnInfoChange).isInstanceOf(SetReturnInfoChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetReturnInfoChange.builder().change("change") }, + new Object[] { "previousValue", + SetReturnInfoChange.builder() + .previousValue(new com.commercetools.history.models.common.ReturnInfoImpl()) }, + new Object[] { "nextValue", SetReturnInfoChange.builder() + .nextValue(new com.commercetools.history.models.common.ReturnInfoImpl()) } }; + } + + @Test + public void change() { + SetReturnInfoChange value = SetReturnInfoChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetReturnInfoChange value = SetReturnInfoChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.ReturnInfoImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.ReturnInfoImpl()); + } + + @Test + public void nextValue() { + SetReturnInfoChange value = SetReturnInfoChange.of(); + value.setNextValue(new com.commercetools.history.models.common.ReturnInfoImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ReturnInfoImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeTest.java new file mode 100644 index 00000000000..f0f52fa9e1c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomFieldChangeTest.java @@ -0,0 +1,86 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetReturnItemCustomLineItemCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetReturnItemCustomLineItemCustomFieldChangeBuilder builder) { + SetReturnItemCustomLineItemCustomFieldChange setReturnItemCustomLineItemCustomFieldChange = builder + .buildUnchecked(); + Assertions.assertThat(setReturnItemCustomLineItemCustomFieldChange) + .isInstanceOf(SetReturnItemCustomLineItemCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetReturnItemCustomLineItemCustomFieldChange.builder().change("change") }, + new Object[] { "customLineItem", + SetReturnItemCustomLineItemCustomFieldChange.builder() + .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "customLineItemId", + SetReturnItemCustomLineItemCustomFieldChange.builder().customLineItemId("customLineItemId") }, + new Object[] { "name", SetReturnItemCustomLineItemCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetReturnItemCustomLineItemCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetReturnItemCustomLineItemCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", + SetReturnItemCustomLineItemCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void customLineItem() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setCustomLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getCustomLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void customLineItemId() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void name() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetReturnItemCustomLineItemCustomFieldChange value = SetReturnItemCustomLineItemCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeTest.java new file mode 100644 index 00000000000..8e201254251 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemCustomLineItemCustomTypeChangeTest.java @@ -0,0 +1,72 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetReturnItemCustomLineItemCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetReturnItemCustomLineItemCustomTypeChangeBuilder builder) { + SetReturnItemCustomLineItemCustomTypeChange setReturnItemCustomLineItemCustomTypeChange = builder + .buildUnchecked(); + Assertions.assertThat(setReturnItemCustomLineItemCustomTypeChange) + .isInstanceOf(SetReturnItemCustomLineItemCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetReturnItemCustomLineItemCustomTypeChange.builder().change("change") }, + new Object[] { "customLineItem", + SetReturnItemCustomLineItemCustomTypeChange.builder() + .customLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "customLineItemId", + SetReturnItemCustomLineItemCustomTypeChange.builder().customLineItemId("customLineItemId") }, + new Object[] { "previousValue", + SetReturnItemCustomLineItemCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetReturnItemCustomLineItemCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetReturnItemCustomLineItemCustomTypeChange value = SetReturnItemCustomLineItemCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void customLineItem() { + SetReturnItemCustomLineItemCustomTypeChange value = SetReturnItemCustomLineItemCustomTypeChange.of(); + value.setCustomLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getCustomLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void customLineItemId() { + SetReturnItemCustomLineItemCustomTypeChange value = SetReturnItemCustomLineItemCustomTypeChange.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + + @Test + public void previousValue() { + SetReturnItemCustomLineItemCustomTypeChange value = SetReturnItemCustomLineItemCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetReturnItemCustomLineItemCustomTypeChange value = SetReturnItemCustomLineItemCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeTest.java new file mode 100644 index 00000000000..036d48ccccd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomFieldChangeTest.java @@ -0,0 +1,92 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetReturnItemLineItemCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetReturnItemLineItemCustomFieldChangeBuilder builder) { + SetReturnItemLineItemCustomFieldChange setReturnItemLineItemCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setReturnItemLineItemCustomFieldChange) + .isInstanceOf(SetReturnItemLineItemCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetReturnItemLineItemCustomFieldChange.builder().change("change") }, + new Object[] { "variant", SetReturnItemLineItemCustomFieldChange.builder().variant("variant") }, + new Object[] { "lineItem", + SetReturnItemLineItemCustomFieldChange.builder() + .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "lineItemId", + SetReturnItemLineItemCustomFieldChange.builder().lineItemId("lineItemId") }, + new Object[] { "name", SetReturnItemLineItemCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetReturnItemLineItemCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetReturnItemLineItemCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetReturnItemLineItemCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void variant() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } + + @Test + public void lineItem() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void lineItemId() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } + + @Test + public void name() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetReturnItemLineItemCustomFieldChange value = SetReturnItemLineItemCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeTest.java new file mode 100644 index 00000000000..3061693874e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetReturnItemLineItemCustomTypeChangeTest.java @@ -0,0 +1,78 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetReturnItemLineItemCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetReturnItemLineItemCustomTypeChangeBuilder builder) { + SetReturnItemLineItemCustomTypeChange setReturnItemLineItemCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setReturnItemLineItemCustomTypeChange) + .isInstanceOf(SetReturnItemLineItemCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetReturnItemLineItemCustomTypeChange.builder().change("change") }, + new Object[] { "variant", SetReturnItemLineItemCustomTypeChange.builder().variant("variant") }, + new Object[] { "lineItem", + SetReturnItemLineItemCustomTypeChange.builder() + .lineItem(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "lineItemId", SetReturnItemLineItemCustomTypeChange.builder().lineItemId("lineItemId") }, + new Object[] { "previousValue", + SetReturnItemLineItemCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetReturnItemLineItemCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void variant() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } + + @Test + public void lineItem() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setLineItem(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLineItem()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void lineItemId() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setLineItemId("lineItemId"); + Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); + } + + @Test + public void previousValue() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetReturnItemLineItemCustomTypeChange value = SetReturnItemLineItemCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeTest.java new file mode 100644 index 00000000000..cb5324986ef --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomFieldChangeTest.java @@ -0,0 +1,64 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetShippingAddressCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetShippingAddressCustomFieldChangeBuilder builder) { + SetShippingAddressCustomFieldChange setShippingAddressCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setShippingAddressCustomFieldChange) + .isInstanceOf(SetShippingAddressCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetShippingAddressCustomFieldChange.builder().change("change") }, + new Object[] { "name", SetShippingAddressCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", + SetShippingAddressCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetShippingAddressCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetShippingAddressCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetShippingAddressCustomFieldChange value = SetShippingAddressCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void name() { + SetShippingAddressCustomFieldChange value = SetShippingAddressCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetShippingAddressCustomFieldChange value = SetShippingAddressCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetShippingAddressCustomFieldChange value = SetShippingAddressCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetShippingAddressCustomFieldChange value = SetShippingAddressCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeTest.java new file mode 100644 index 00000000000..af6afaed100 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingAddressCustomTypeChangeTest.java @@ -0,0 +1,51 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetShippingAddressCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetShippingAddressCustomTypeChangeBuilder builder) { + SetShippingAddressCustomTypeChange setShippingAddressCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setShippingAddressCustomTypeChange) + .isInstanceOf(SetShippingAddressCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "change", SetShippingAddressCustomTypeChange.builder().change("change") }, + new Object[] { "previousValue", + SetShippingAddressCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetShippingAddressCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetShippingAddressCustomTypeChange value = SetShippingAddressCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + SetShippingAddressCustomTypeChange value = SetShippingAddressCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetShippingAddressCustomTypeChange value = SetShippingAddressCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeTest.java new file mode 100644 index 00000000000..6a18a1ccfd7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomFieldChangeTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetShippingCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetShippingCustomFieldChangeBuilder builder) { + SetShippingCustomFieldChange setShippingCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setShippingCustomFieldChange).isInstanceOf(SetShippingCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetShippingCustomFieldChange.builder().change("change") }, + new Object[] { "shippingKey", SetShippingCustomFieldChange.builder().shippingKey("shippingKey") }, + new Object[] { "name", SetShippingCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", SetShippingCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", SetShippingCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetShippingCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void shippingKey() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setShippingKey("shippingKey"); + Assertions.assertThat(value.getShippingKey()).isEqualTo("shippingKey"); + } + + @Test + public void name() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetShippingCustomFieldChange value = SetShippingCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeTest.java new file mode 100644 index 00000000000..6b5fb6186a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingCustomTypeChangeTest.java @@ -0,0 +1,57 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetShippingCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetShippingCustomTypeChangeBuilder builder) { + SetShippingCustomTypeChange setShippingCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setShippingCustomTypeChange).isInstanceOf(SetShippingCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetShippingCustomTypeChange.builder().change("change") }, + new Object[] { "shippingKey", SetShippingCustomTypeChange.builder().shippingKey("shippingKey") }, + new Object[] { "previousValue", + SetShippingCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetShippingCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetShippingCustomTypeChange value = SetShippingCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void shippingKey() { + SetShippingCustomTypeChange value = SetShippingCustomTypeChange.of(); + value.setShippingKey("shippingKey"); + Assertions.assertThat(value.getShippingKey()).isEqualTo("shippingKey"); + } + + @Test + public void previousValue() { + SetShippingCustomTypeChange value = SetShippingCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetShippingCustomTypeChange value = SetShippingCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeTest.java index 3cc818fa4e7..af07e1d8d42 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingInfoTaxedPriceChangeTest.java @@ -19,9 +19,9 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetShippingInfoTaxedPriceChange.builder().change("change") }, new Object[] { "previousValue", SetShippingInfoTaxedPriceChange.builder() - .previousValue(new com.commercetools.history.models.common.TaxedPriceImpl()) }, + .previousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, new Object[] { "nextValue", SetShippingInfoTaxedPriceChange.builder() - .nextValue(new com.commercetools.history.models.common.TaxedPriceImpl()) } }; + .nextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()) } }; } @Test @@ -34,16 +34,16 @@ public void change() { @Test public void previousValue() { SetShippingInfoTaxedPriceChange value = SetShippingInfoTaxedPriceChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.TaxedPriceImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.TaxedPriceImpl()); + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); } @Test public void nextValue() { SetShippingInfoTaxedPriceChange value = SetShippingInfoTaxedPriceChange.of(); - value.setNextValue(new com.commercetools.history.models.common.TaxedPriceImpl()); + value.setNextValue(new com.commercetools.history.models.common.TaxedItemPriceImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.TaxedPriceImpl()); + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingRateChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingRateChangeTest.java index cd1df8b1c31..bd5a3bc46c7 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingRateChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetShippingRateChangeTest.java @@ -19,9 +19,9 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetShippingRateChange.builder().change("change") }, new Object[] { "previousValue", SetShippingRateChange.builder() - .previousValue(new com.commercetools.history.models.common.MoneyImpl()) }, + .previousValue(new com.commercetools.history.models.common.ShippingRateImpl()) }, new Object[] { "nextValue", SetShippingRateChange.builder() - .nextValue(new com.commercetools.history.models.common.MoneyImpl()) } }; + .nextValue(new com.commercetools.history.models.common.ShippingRateImpl()) } }; } @Test @@ -34,15 +34,16 @@ public void change() { @Test public void previousValue() { SetShippingRateChange value = SetShippingRateChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.MoneyImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.ShippingRateImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + .isEqualTo(new com.commercetools.history.models.common.ShippingRateImpl()); } @Test public void nextValue() { SetShippingRateChange value = SetShippingRateChange.of(); - value.setNextValue(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getNextValue()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setNextValue(new com.commercetools.history.models.common.ShippingRateImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ShippingRateImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSkuChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSkuChangeTest.java index 881147f0799..27a82214fec 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSkuChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSkuChangeTest.java @@ -19,7 +19,8 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetSkuChange.builder().change("change") }, new Object[] { "previousValue", SetSkuChange.builder().previousValue("previousValue") }, new Object[] { "nextValue", SetSkuChange.builder().nextValue("nextValue") }, - new Object[] { "catalogData", SetSkuChange.builder().catalogData("catalogData") } }; + new Object[] { "catalogData", SetSkuChange.builder().catalogData("catalogData") }, + new Object[] { "variant", SetSkuChange.builder().variant("variant") } }; } @Test @@ -49,4 +50,11 @@ public void catalogData() { value.setCatalogData("catalogData"); Assertions.assertThat(value.getCatalogData()).isEqualTo("catalogData"); } + + @Test + public void variant() { + SetSkuChange value = SetSkuChange.of(); + value.setVariant("variant"); + Assertions.assertThat(value.getVariant()).isEqualTo("variant"); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStateRolesChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStateRolesChangeTest.java index a95593dc2e9..2125f5b6de7 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStateRolesChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStateRolesChangeTest.java @@ -24,6 +24,12 @@ public static Object[][] objectBuilder() { .findEnum("ReviewIncludedInStatistics"))) }, new Object[] { "nextValue", SetStateRolesChange.builder() .nextValue(Collections.singletonList(com.commercetools.history.models.common.StateRoleEnum + .findEnum("ReviewIncludedInStatistics"))) }, + new Object[] { "addedItems", SetStateRolesChange.builder() + .addedItems(Collections.singletonList(com.commercetools.history.models.common.StateRoleEnum + .findEnum("ReviewIncludedInStatistics"))) }, + new Object[] { "removedItems", SetStateRolesChange.builder() + .removedItems(Collections.singletonList(com.commercetools.history.models.common.StateRoleEnum .findEnum("ReviewIncludedInStatistics"))) } }; } @@ -53,4 +59,24 @@ public void nextValue() { .isEqualTo(Collections.singletonList( com.commercetools.history.models.common.StateRoleEnum.findEnum("ReviewIncludedInStatistics"))); } + + @Test + public void addedItems() { + SetStateRolesChange value = SetStateRolesChange.of(); + value.setAddedItems(Collections.singletonList( + com.commercetools.history.models.common.StateRoleEnum.findEnum("ReviewIncludedInStatistics"))); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList( + com.commercetools.history.models.common.StateRoleEnum.findEnum("ReviewIncludedInStatistics"))); + } + + @Test + public void removedItems() { + SetStateRolesChange value = SetStateRolesChange.of(); + value.setRemovedItems(Collections.singletonList( + com.commercetools.history.models.common.StateRoleEnum.findEnum("ReviewIncludedInStatistics"))); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList( + com.commercetools.history.models.common.StateRoleEnum.findEnum("ReviewIncludedInStatistics"))); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoreChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoreChangeTest.java index ab63a239057..b30d63585bf 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoreChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoreChangeTest.java @@ -19,9 +19,9 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "change", SetStoreChange.builder().change("change") }, new Object[] { "previousValue", SetStoreChange.builder() - .previousValue(new com.commercetools.history.models.common.ReferenceImpl()) }, + .previousValue(new com.commercetools.history.models.common.KeyReferenceImpl()) }, new Object[] { "nextValue", SetStoreChange.builder() - .nextValue(new com.commercetools.history.models.common.ReferenceImpl()) } }; + .nextValue(new com.commercetools.history.models.common.KeyReferenceImpl()) } }; } @Test @@ -34,16 +34,16 @@ public void change() { @Test public void previousValue() { SetStoreChange value = SetStoreChange.of(); - value.setPreviousValue(new com.commercetools.history.models.common.ReferenceImpl()); + value.setPreviousValue(new com.commercetools.history.models.common.KeyReferenceImpl()); Assertions.assertThat(value.getPreviousValue()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); } @Test public void nextValue() { SetStoreChange value = SetStoreChange.of(); - value.setNextValue(new com.commercetools.history.models.common.ReferenceImpl()); + value.setNextValue(new com.commercetools.history.models.common.KeyReferenceImpl()); Assertions.assertThat(value.getNextValue()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoresChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoresChangeTest.java index 9a253b43775..3cf82c07eef 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoresChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetStoresChangeTest.java @@ -23,9 +23,18 @@ public static Object[][] objectBuilder() { SetStoresChange.builder() .previousValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "nextValue", SetStoresChange.builder() - .nextValue( - Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; + new Object[] { "nextValue", + SetStoresChange.builder() + .nextValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "addedItems", + SetStoresChange.builder() + .addedItems(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) }, + new Object[] { "removedItems", + SetStoresChange.builder() + .removedItems(Collections.singletonList( + new com.commercetools.history.models.common.KeyReferenceImpl())) } }; } @Test @@ -50,4 +59,21 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); } + + @Test + public void addedItems() { + SetStoresChange value = SetStoresChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } + + @Test + public void removedItems() { + SetStoresChange value = SetStoresChange.of(); + value.setRemovedItems( + Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.KeyReferenceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeTest.java index d48a4e0fc98..ef9359292e9 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetSupplyChannelsChangeTest.java @@ -23,8 +23,16 @@ public static Object[][] objectBuilder() { SetSupplyChannelsChange.builder() .previousValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "nextValue", SetSupplyChannelsChange.builder() - .nextValue( + new Object[] { "nextValue", + SetSupplyChannelsChange.builder() + .nextValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "addedItems", + SetSupplyChannelsChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "removedItems", SetSupplyChannelsChange.builder() + .removedItems( Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; } @@ -50,4 +58,20 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); } + + @Test + public void addedItems() { + SetSupplyChannelsChange value = SetSupplyChannelsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void removedItems() { + SetSupplyChannelsChange value = SetSupplyChannelsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeTest.java new file mode 100644 index 00000000000..1ba3dcd6d6f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomFieldChangeTest.java @@ -0,0 +1,71 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetTransactionCustomFieldChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetTransactionCustomFieldChangeBuilder builder) { + SetTransactionCustomFieldChange setTransactionCustomFieldChange = builder.buildUnchecked(); + Assertions.assertThat(setTransactionCustomFieldChange).isInstanceOf(SetTransactionCustomFieldChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetTransactionCustomFieldChange.builder().change("change") }, + new Object[] { "transaction", SetTransactionCustomFieldChange.builder() + .transaction(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()) }, + new Object[] { "name", SetTransactionCustomFieldChange.builder().name("name") }, + new Object[] { "customTypeId", SetTransactionCustomFieldChange.builder().customTypeId("customTypeId") }, + new Object[] { "previousValue", + SetTransactionCustomFieldChange.builder().previousValue("previousValue") }, + new Object[] { "nextValue", SetTransactionCustomFieldChange.builder().nextValue("nextValue") } }; + } + + @Test + public void change() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void transaction() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setTransaction(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()); + Assertions.assertThat(value.getTransaction()) + .isEqualTo(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()); + } + + @Test + public void name() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void customTypeId() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setCustomTypeId("customTypeId"); + Assertions.assertThat(value.getCustomTypeId()).isEqualTo("customTypeId"); + } + + @Test + public void previousValue() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setPreviousValue("previousValue"); + Assertions.assertThat(value.getPreviousValue()).isEqualTo("previousValue"); + } + + @Test + public void nextValue() { + SetTransactionCustomFieldChange value = SetTransactionCustomFieldChange.of(); + value.setNextValue("nextValue"); + Assertions.assertThat(value.getNextValue()).isEqualTo("nextValue"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeTest.java new file mode 100644 index 00000000000..6379f1a10cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransactionCustomTypeChangeTest.java @@ -0,0 +1,59 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetTransactionCustomTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetTransactionCustomTypeChangeBuilder builder) { + SetTransactionCustomTypeChange setTransactionCustomTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setTransactionCustomTypeChange).isInstanceOf(SetTransactionCustomTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetTransactionCustomTypeChange.builder().change("change") }, + new Object[] { "transaction", SetTransactionCustomTypeChange.builder() + .transaction(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()) }, + new Object[] { "previousValue", + SetTransactionCustomTypeChange.builder() + .previousValue(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "nextValue", SetTransactionCustomTypeChange.builder() + .nextValue(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void change() { + SetTransactionCustomTypeChange value = SetTransactionCustomTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void transaction() { + SetTransactionCustomTypeChange value = SetTransactionCustomTypeChange.of(); + value.setTransaction(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()); + Assertions.assertThat(value.getTransaction()) + .isEqualTo(new com.commercetools.history.models.change_value.TransactionChangeValueImpl()); + } + + @Test + public void previousValue() { + SetTransactionCustomTypeChange value = SetTransactionCustomTypeChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void nextValue() { + SetTransactionCustomTypeChange value = SetTransactionCustomTypeChange.of(); + value.setNextValue(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransitionsChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransitionsChangeTest.java index 4ef89927459..2db8572c04a 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransitionsChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetTransitionsChangeTest.java @@ -23,8 +23,16 @@ public static Object[][] objectBuilder() { SetTransitionsChange.builder() .previousValue(Collections .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, - new Object[] { "nextValue", SetTransitionsChange.builder() - .nextValue( + new Object[] { "nextValue", + SetTransitionsChange.builder() + .nextValue(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "addedItems", + SetTransitionsChange.builder() + .addedItems(Collections + .singletonList(new com.commercetools.history.models.common.ReferenceImpl())) }, + new Object[] { "removedItems", SetTransitionsChange.builder() + .removedItems( Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; } @@ -50,4 +58,20 @@ public void nextValue() { Assertions.assertThat(value.getNextValue()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); } + + @Test + public void addedItems() { + SetTransitionsChange value = SetTransitionsChange.of(); + value.setAddedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getAddedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } + + @Test + public void removedItems() { + SetTransitionsChange value = SetTransitionsChange.of(); + value.setRemovedItems(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + Assertions.assertThat(value.getRemovedItems()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeTest.java new file mode 100644 index 00000000000..cc9f627d666 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetUnitTypeChangeTest.java @@ -0,0 +1,58 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetUnitTypeChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetUnitTypeChangeBuilder builder) { + SetUnitTypeChange setUnitTypeChange = builder.buildUnchecked(); + Assertions.assertThat(setUnitTypeChange).isInstanceOf(SetUnitTypeChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetUnitTypeChange.builder().change("change") }, + new Object[] { "parentUnit", SetUnitTypeChange.builder() + .parentUnit(new com.commercetools.history.models.common.BusinessUnitResourceIdentifierImpl()) }, + new Object[] { "previousValue", SetUnitTypeChange.builder() + .previousValue(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")) }, + new Object[] { "nextValue", SetUnitTypeChange.builder() + .nextValue(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")) } }; + } + + @Test + public void change() { + SetUnitTypeChange value = SetUnitTypeChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void parentUnit() { + SetUnitTypeChange value = SetUnitTypeChange.of(); + value.setParentUnit(new com.commercetools.history.models.common.BusinessUnitResourceIdentifierImpl()); + Assertions.assertThat(value.getParentUnit()) + .isEqualTo(new com.commercetools.history.models.common.BusinessUnitResourceIdentifierImpl()); + } + + @Test + public void previousValue() { + SetUnitTypeChange value = SetUnitTypeChange.of(); + value.setPreviousValue(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")); + } + + @Test + public void nextValue() { + SetUnitTypeChange value = SetUnitTypeChange.of(); + value.setNextValue(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(com.commercetools.history.models.common.BusinessUnitType.findEnum("Company")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeTest.java new file mode 100644 index 00000000000..5b64f008a03 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/SetVariantExclusionChangeTest.java @@ -0,0 +1,59 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class SetVariantExclusionChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, SetVariantExclusionChangeBuilder builder) { + SetVariantExclusionChange setVariantExclusionChange = builder.buildUnchecked(); + Assertions.assertThat(setVariantExclusionChange).isInstanceOf(SetVariantExclusionChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", SetVariantExclusionChange.builder().change("change") }, + new Object[] { "product", + SetVariantExclusionChange.builder() + .product(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "previousValue", SetVariantExclusionChange.builder() + .previousValue(new com.commercetools.history.models.common.ProductVariantExclusionImpl()) }, + new Object[] { "nextValue", SetVariantExclusionChange.builder() + .nextValue(new com.commercetools.history.models.common.ProductVariantExclusionImpl()) } }; + } + + @Test + public void change() { + SetVariantExclusionChange value = SetVariantExclusionChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void product() { + SetVariantExclusionChange value = SetVariantExclusionChange.of(); + value.setProduct(new com.commercetools.history.models.common.ReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + } + + @Test + public void previousValue() { + SetVariantExclusionChange value = SetVariantExclusionChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + } + + @Test + public void nextValue() { + SetVariantExclusionChange value = SetVariantExclusionChange.of(); + value.setNextValue(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantExclusionImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeTest.java index 0254a567bf0..b592b7f6334 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/TransitionCustomLineItemStateChangeTest.java @@ -30,6 +30,8 @@ public static Object[][] objectBuilder() { .nextValue(Collections .singletonList(new com.commercetools.history.models.common.ItemStateImpl())) }, new Object[] { "lineItemId", TransitionCustomLineItemStateChange.builder().lineItemId("lineItemId") }, + new Object[] { "customLineItemId", + TransitionCustomLineItemStateChange.builder().customLineItemId("customLineItemId") }, new Object[] { "stateId", TransitionCustomLineItemStateChange.builder().stateId("stateId") } }; } @@ -63,6 +65,13 @@ public void lineItemId() { Assertions.assertThat(value.getLineItemId()).isEqualTo("lineItemId"); } + @Test + public void customLineItemId() { + TransitionCustomLineItemStateChange value = TransitionCustomLineItemStateChange.of(); + value.setCustomLineItemId("customLineItemId"); + Assertions.assertThat(value.getCustomLineItemId()).isEqualTo("customLineItemId"); + } + @Test public void stateId() { TransitionCustomLineItemStateChange value = TransitionCustomLineItemStateChange.of(); diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeTest.java new file mode 100644 index 00000000000..156d83696e3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/change/UpdateItemShippingAddressChangeTest.java @@ -0,0 +1,49 @@ + +package com.commercetools.history.models.change; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class UpdateItemShippingAddressChangeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, UpdateItemShippingAddressChangeBuilder builder) { + UpdateItemShippingAddressChange updateItemShippingAddressChange = builder.buildUnchecked(); + Assertions.assertThat(updateItemShippingAddressChange).isInstanceOf(UpdateItemShippingAddressChange.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "change", UpdateItemShippingAddressChange.builder().change("change") }, + new Object[] { "previousValue", + UpdateItemShippingAddressChange.builder() + .previousValue(new com.commercetools.history.models.common.AddressImpl()) }, + new Object[] { "nextValue", UpdateItemShippingAddressChange.builder() + .nextValue(new com.commercetools.history.models.common.AddressImpl()) } }; + } + + @Test + public void change() { + UpdateItemShippingAddressChange value = UpdateItemShippingAddressChange.of(); + value.setChange("change"); + Assertions.assertThat(value.getChange()).isEqualTo("change"); + } + + @Test + public void previousValue() { + UpdateItemShippingAddressChange value = UpdateItemShippingAddressChange.of(); + value.setPreviousValue(new com.commercetools.history.models.common.AddressImpl()); + Assertions.assertThat(value.getPreviousValue()) + .isEqualTo(new com.commercetools.history.models.common.AddressImpl()); + } + + @Test + public void nextValue() { + UpdateItemShippingAddressChange value = UpdateItemShippingAddressChange.of(); + value.setNextValue(new com.commercetools.history.models.common.AddressImpl()); + Assertions.assertThat(value.getNextValue()) + .isEqualTo(new com.commercetools.history.models.common.AddressImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AddressTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AddressTest.java index 5ee15aeb897..f9791a5d614 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AddressTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AddressTest.java @@ -16,206 +16,15 @@ public void buildUnchecked(String name, AddressBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "id", Address.builder().id("id") }, - new Object[] { "key", Address.builder().key("key") }, - new Object[] { "title", Address.builder().title("title") }, - new Object[] { "salutation", Address.builder().salutation("salutation") }, - new Object[] { "firstName", Address.builder().firstName("firstName") }, - new Object[] { "lastName", Address.builder().lastName("lastName") }, - new Object[] { "streetName", Address.builder().streetName("streetName") }, - new Object[] { "streetNumber", Address.builder().streetNumber("streetNumber") }, - new Object[] { "additionalStreetInfo", Address.builder().additionalStreetInfo("additionalStreetInfo") }, - new Object[] { "postalCode", Address.builder().postalCode("postalCode") }, - new Object[] { "city", Address.builder().city("city") }, - new Object[] { "region", Address.builder().region("region") }, - new Object[] { "state", Address.builder().state("state") }, - new Object[] { "country", Address.builder().country("country") }, - new Object[] { "company", Address.builder().company("company") }, - new Object[] { "department", Address.builder().department("department") }, - new Object[] { "building", Address.builder().building("building") }, - new Object[] { "apartment", Address.builder().apartment("apartment") }, - new Object[] { "pOBox", Address.builder().pOBox("pOBox") }, - new Object[] { "phone", Address.builder().phone("phone") }, - new Object[] { "mobile", Address.builder().mobile("mobile") }, - new Object[] { "email", Address.builder().email("email") }, - new Object[] { "fax", Address.builder().fax("fax") }, - new Object[] { "additionalAddressInfo", - Address.builder().additionalAddressInfo("additionalAddressInfo") }, - new Object[] { "externalId", Address.builder().externalId("externalId") } }; + return new Object[][] { new Object[] { "custom", + Address.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; } @Test - public void id() { + public void custom() { Address value = Address.of(); - value.setId("id"); - Assertions.assertThat(value.getId()).isEqualTo("id"); - } - - @Test - public void key() { - Address value = Address.of(); - value.setKey("key"); - Assertions.assertThat(value.getKey()).isEqualTo("key"); - } - - @Test - public void title() { - Address value = Address.of(); - value.setTitle("title"); - Assertions.assertThat(value.getTitle()).isEqualTo("title"); - } - - @Test - public void salutation() { - Address value = Address.of(); - value.setSalutation("salutation"); - Assertions.assertThat(value.getSalutation()).isEqualTo("salutation"); - } - - @Test - public void firstName() { - Address value = Address.of(); - value.setFirstName("firstName"); - Assertions.assertThat(value.getFirstName()).isEqualTo("firstName"); - } - - @Test - public void lastName() { - Address value = Address.of(); - value.setLastName("lastName"); - Assertions.assertThat(value.getLastName()).isEqualTo("lastName"); - } - - @Test - public void streetName() { - Address value = Address.of(); - value.setStreetName("streetName"); - Assertions.assertThat(value.getStreetName()).isEqualTo("streetName"); - } - - @Test - public void streetNumber() { - Address value = Address.of(); - value.setStreetNumber("streetNumber"); - Assertions.assertThat(value.getStreetNumber()).isEqualTo("streetNumber"); - } - - @Test - public void additionalStreetInfo() { - Address value = Address.of(); - value.setAdditionalStreetInfo("additionalStreetInfo"); - Assertions.assertThat(value.getAdditionalStreetInfo()).isEqualTo("additionalStreetInfo"); - } - - @Test - public void postalCode() { - Address value = Address.of(); - value.setPostalCode("postalCode"); - Assertions.assertThat(value.getPostalCode()).isEqualTo("postalCode"); - } - - @Test - public void city() { - Address value = Address.of(); - value.setCity("city"); - Assertions.assertThat(value.getCity()).isEqualTo("city"); - } - - @Test - public void region() { - Address value = Address.of(); - value.setRegion("region"); - Assertions.assertThat(value.getRegion()).isEqualTo("region"); - } - - @Test - public void state() { - Address value = Address.of(); - value.setState("state"); - Assertions.assertThat(value.getState()).isEqualTo("state"); - } - - @Test - public void country() { - Address value = Address.of(); - value.setCountry("country"); - Assertions.assertThat(value.getCountry()).isEqualTo("country"); - } - - @Test - public void company() { - Address value = Address.of(); - value.setCompany("company"); - Assertions.assertThat(value.getCompany()).isEqualTo("company"); - } - - @Test - public void department() { - Address value = Address.of(); - value.setDepartment("department"); - Assertions.assertThat(value.getDepartment()).isEqualTo("department"); - } - - @Test - public void building() { - Address value = Address.of(); - value.setBuilding("building"); - Assertions.assertThat(value.getBuilding()).isEqualTo("building"); - } - - @Test - public void apartment() { - Address value = Address.of(); - value.setApartment("apartment"); - Assertions.assertThat(value.getApartment()).isEqualTo("apartment"); - } - - @Test - public void pOBox() { - Address value = Address.of(); - value.setPOBox("pOBox"); - Assertions.assertThat(value.getPOBox()).isEqualTo("pOBox"); - } - - @Test - public void phone() { - Address value = Address.of(); - value.setPhone("phone"); - Assertions.assertThat(value.getPhone()).isEqualTo("phone"); - } - - @Test - public void mobile() { - Address value = Address.of(); - value.setMobile("mobile"); - Assertions.assertThat(value.getMobile()).isEqualTo("mobile"); - } - - @Test - public void email() { - Address value = Address.of(); - value.setEmail("email"); - Assertions.assertThat(value.getEmail()).isEqualTo("email"); - } - - @Test - public void fax() { - Address value = Address.of(); - value.setFax("fax"); - Assertions.assertThat(value.getFax()).isEqualTo("fax"); - } - - @Test - public void additionalAddressInfo() { - Address value = Address.of(); - value.setAdditionalAddressInfo("additionalAddressInfo"); - Assertions.assertThat(value.getAdditionalAddressInfo()).isEqualTo("additionalAddressInfo"); - } - - @Test - public void externalId() { - Address value = Address.of(); - value.setExternalId("externalId"); - Assertions.assertThat(value.getExternalId()).isEqualTo("externalId"); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssetTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssetTest.java index e07c430a6ef..856ab236161 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssetTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssetTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -17,11 +19,16 @@ public void buildUnchecked(String name, AssetBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", Asset.builder().id("id") }, + new Object[] { "sources", + Asset.builder() + .sources(Collections.singletonList( + new com.commercetools.history.models.common.AssetSourceImpl())) }, new Object[] { "name", Asset.builder().name(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "description", Asset.builder() .description(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "tags", Asset.builder().tags(Collections.singletonList("tags")) }, new Object[] { "custom", Asset.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, new Object[] { "key", Asset.builder().key("key") } }; @@ -34,6 +41,14 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void sources() { + Asset value = Asset.of(); + value.setSources(Collections.singletonList(new com.commercetools.history.models.common.AssetSourceImpl())); + Assertions.assertThat(value.getSources()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssetSourceImpl())); + } + @Test public void name() { Asset value = Asset.of(); @@ -50,6 +65,13 @@ public void description() { .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + @Test + public void tags() { + Asset value = Asset.of(); + value.setTags(Collections.singletonList("tags")); + Assertions.assertThat(value.getTags()).isEqualTo(Collections.singletonList("tags")); + } + @Test public void custom() { Asset value = Asset.of(); diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentTest.java index 83d74f42b3d..4efc800dcfa 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleAssignmentTest.java @@ -17,9 +17,8 @@ public void buildUnchecked(String name, AssociateRoleAssignmentBuilder builder) public static Object[][] objectBuilder() { return new Object[][] { - new Object[] { "associateRole", - AssociateRoleAssignment.builder() - .associateRole(new com.commercetools.history.models.common.KeyReferenceImpl()) }, + new Object[] { "associateRole", AssociateRoleAssignment.builder() + .associateRole(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()) }, new Object[] { "inheritance", AssociateRoleAssignment.builder() .inheritance(com.commercetools.history.models.common.AssociateRoleInheritanceMode @@ -29,9 +28,9 @@ public static Object[][] objectBuilder() { @Test public void associateRole() { AssociateRoleAssignment value = AssociateRoleAssignment.of(); - value.setAssociateRole(new com.commercetools.history.models.common.KeyReferenceImpl()); + value.setAssociateRole(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()); Assertions.assertThat(value.getAssociateRole()) - .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceTest.java new file mode 100644 index 00000000000..516e4236b63 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateRoleKeyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AssociateRoleKeyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AssociateRoleKeyReferenceBuilder builder) { + AssociateRoleKeyReference associateRoleKeyReference = builder.buildUnchecked(); + Assertions.assertThat(associateRoleKeyReference).isInstanceOf(AssociateRoleKeyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", AssociateRoleKeyReference.builder().key("key") } }; + } + + @Test + public void key() { + AssociateRoleKeyReference value = AssociateRoleKeyReference.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateTest.java index 46e4d73300e..3d333d498b3 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AssociateTest.java @@ -23,8 +23,11 @@ public static Object[][] objectBuilder() { Associate.builder() .associateRoleAssignments(Collections.singletonList( new com.commercetools.history.models.common.AssociateRoleAssignmentImpl())) }, - new Object[] { "customer", - Associate.builder().customer(new com.commercetools.history.models.common.ReferenceImpl()) } }; + new Object[] { "roles", Associate.builder() + .roles(Collections.singletonList( + com.commercetools.history.models.common.AssociateRoleDeprecated.findEnum("Admin"))) }, + new Object[] { "customer", Associate.builder() + .customer(new com.commercetools.history.models.common.CustomerReferenceImpl()) } }; } @Test @@ -37,11 +40,21 @@ public void associateRoleAssignments() { .singletonList(new com.commercetools.history.models.common.AssociateRoleAssignmentImpl())); } + @Test + public void roles() { + Associate value = Associate.of(); + value.setRoles(Collections + .singletonList(com.commercetools.history.models.common.AssociateRoleDeprecated.findEnum("Admin"))); + Assertions.assertThat(value.getRoles()) + .isEqualTo(Collections.singletonList( + com.commercetools.history.models.common.AssociateRoleDeprecated.findEnum("Admin"))); + } + @Test public void customer() { Associate value = Associate.of(); - value.setCustomer(new com.commercetools.history.models.common.ReferenceImpl()); + value.setCustomer(new com.commercetools.history.models.common.CustomerReferenceImpl()); Assertions.assertThat(value.getCustomer()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.CustomerReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeDefinitionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeDefinitionTest.java index c9b78ccaf43..14228fcf1c8 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeDefinitionTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeDefinitionTest.java @@ -25,6 +25,8 @@ public static Object[][] objectBuilder() { AttributeDefinition.builder() .label(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "isRequired", AttributeDefinition.builder().isRequired(true) }, + new Object[] { "level", AttributeDefinition.builder() + .level(com.commercetools.history.models.common.AttributeLevelEnum.findEnum("Product")) }, new Object[] { "attributeConstraint", AttributeDefinition.builder() .attributeConstraint( @@ -67,6 +69,14 @@ public void isRequired() { Assertions.assertThat(value.getIsRequired()).isEqualTo(true); } + @Test + public void level() { + AttributeDefinition value = AttributeDefinition.of(); + value.setLevel(com.commercetools.history.models.common.AttributeLevelEnum.findEnum("Product")); + Assertions.assertThat(value.getLevel()) + .isEqualTo(com.commercetools.history.models.common.AttributeLevelEnum.findEnum("Product")); + } + @Test public void attributeConstraint() { AttributeDefinition value = AttributeDefinition.of(); diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeTest.java new file mode 100644 index 00000000000..b5db4e9899c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/AttributeTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class AttributeTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, AttributeBuilder builder) { + Attribute attribute = builder.buildUnchecked(); + Assertions.assertThat(attribute).isInstanceOf(Attribute.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", Attribute.builder().name("name") }, + new Object[] { "value", Attribute.builder().value("value") } }; + } + + @Test + public void name() { + Attribute value = Attribute.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + Attribute value = Attribute.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BaseAddressTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BaseAddressTest.java new file mode 100644 index 00000000000..3c058ced7d5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BaseAddressTest.java @@ -0,0 +1,222 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BaseAddressTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BaseAddressBuilder builder) { + BaseAddress baseAddress = builder.buildUnchecked(); + Assertions.assertThat(baseAddress).isInstanceOf(BaseAddress.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", BaseAddress.builder().id("id") }, + new Object[] { "key", BaseAddress.builder().key("key") }, + new Object[] { "country", BaseAddress.builder().country("country") }, + new Object[] { "title", BaseAddress.builder().title("title") }, + new Object[] { "salutation", BaseAddress.builder().salutation("salutation") }, + new Object[] { "firstName", BaseAddress.builder().firstName("firstName") }, + new Object[] { "lastName", BaseAddress.builder().lastName("lastName") }, + new Object[] { "streetName", BaseAddress.builder().streetName("streetName") }, + new Object[] { "streetNumber", BaseAddress.builder().streetNumber("streetNumber") }, + new Object[] { "additionalStreetInfo", + BaseAddress.builder().additionalStreetInfo("additionalStreetInfo") }, + new Object[] { "postalCode", BaseAddress.builder().postalCode("postalCode") }, + new Object[] { "city", BaseAddress.builder().city("city") }, + new Object[] { "region", BaseAddress.builder().region("region") }, + new Object[] { "state", BaseAddress.builder().state("state") }, + new Object[] { "company", BaseAddress.builder().company("company") }, + new Object[] { "department", BaseAddress.builder().department("department") }, + new Object[] { "building", BaseAddress.builder().building("building") }, + new Object[] { "apartment", BaseAddress.builder().apartment("apartment") }, + new Object[] { "pOBox", BaseAddress.builder().pOBox("pOBox") }, + new Object[] { "phone", BaseAddress.builder().phone("phone") }, + new Object[] { "mobile", BaseAddress.builder().mobile("mobile") }, + new Object[] { "email", BaseAddress.builder().email("email") }, + new Object[] { "fax", BaseAddress.builder().fax("fax") }, + new Object[] { "additionalAddressInfo", + BaseAddress.builder().additionalAddressInfo("additionalAddressInfo") }, + new Object[] { "externalId", BaseAddress.builder().externalId("externalId") } }; + } + + @Test + public void id() { + BaseAddress value = BaseAddress.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + BaseAddress value = BaseAddress.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void country() { + BaseAddress value = BaseAddress.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void title() { + BaseAddress value = BaseAddress.of(); + value.setTitle("title"); + Assertions.assertThat(value.getTitle()).isEqualTo("title"); + } + + @Test + public void salutation() { + BaseAddress value = BaseAddress.of(); + value.setSalutation("salutation"); + Assertions.assertThat(value.getSalutation()).isEqualTo("salutation"); + } + + @Test + public void firstName() { + BaseAddress value = BaseAddress.of(); + value.setFirstName("firstName"); + Assertions.assertThat(value.getFirstName()).isEqualTo("firstName"); + } + + @Test + public void lastName() { + BaseAddress value = BaseAddress.of(); + value.setLastName("lastName"); + Assertions.assertThat(value.getLastName()).isEqualTo("lastName"); + } + + @Test + public void streetName() { + BaseAddress value = BaseAddress.of(); + value.setStreetName("streetName"); + Assertions.assertThat(value.getStreetName()).isEqualTo("streetName"); + } + + @Test + public void streetNumber() { + BaseAddress value = BaseAddress.of(); + value.setStreetNumber("streetNumber"); + Assertions.assertThat(value.getStreetNumber()).isEqualTo("streetNumber"); + } + + @Test + public void additionalStreetInfo() { + BaseAddress value = BaseAddress.of(); + value.setAdditionalStreetInfo("additionalStreetInfo"); + Assertions.assertThat(value.getAdditionalStreetInfo()).isEqualTo("additionalStreetInfo"); + } + + @Test + public void postalCode() { + BaseAddress value = BaseAddress.of(); + value.setPostalCode("postalCode"); + Assertions.assertThat(value.getPostalCode()).isEqualTo("postalCode"); + } + + @Test + public void city() { + BaseAddress value = BaseAddress.of(); + value.setCity("city"); + Assertions.assertThat(value.getCity()).isEqualTo("city"); + } + + @Test + public void region() { + BaseAddress value = BaseAddress.of(); + value.setRegion("region"); + Assertions.assertThat(value.getRegion()).isEqualTo("region"); + } + + @Test + public void state() { + BaseAddress value = BaseAddress.of(); + value.setState("state"); + Assertions.assertThat(value.getState()).isEqualTo("state"); + } + + @Test + public void company() { + BaseAddress value = BaseAddress.of(); + value.setCompany("company"); + Assertions.assertThat(value.getCompany()).isEqualTo("company"); + } + + @Test + public void department() { + BaseAddress value = BaseAddress.of(); + value.setDepartment("department"); + Assertions.assertThat(value.getDepartment()).isEqualTo("department"); + } + + @Test + public void building() { + BaseAddress value = BaseAddress.of(); + value.setBuilding("building"); + Assertions.assertThat(value.getBuilding()).isEqualTo("building"); + } + + @Test + public void apartment() { + BaseAddress value = BaseAddress.of(); + value.setApartment("apartment"); + Assertions.assertThat(value.getApartment()).isEqualTo("apartment"); + } + + @Test + public void pOBox() { + BaseAddress value = BaseAddress.of(); + value.setPOBox("pOBox"); + Assertions.assertThat(value.getPOBox()).isEqualTo("pOBox"); + } + + @Test + public void phone() { + BaseAddress value = BaseAddress.of(); + value.setPhone("phone"); + Assertions.assertThat(value.getPhone()).isEqualTo("phone"); + } + + @Test + public void mobile() { + BaseAddress value = BaseAddress.of(); + value.setMobile("mobile"); + Assertions.assertThat(value.getMobile()).isEqualTo("mobile"); + } + + @Test + public void email() { + BaseAddress value = BaseAddress.of(); + value.setEmail("email"); + Assertions.assertThat(value.getEmail()).isEqualTo("email"); + } + + @Test + public void fax() { + BaseAddress value = BaseAddress.of(); + value.setFax("fax"); + Assertions.assertThat(value.getFax()).isEqualTo("fax"); + } + + @Test + public void additionalAddressInfo() { + BaseAddress value = BaseAddress.of(); + value.setAdditionalAddressInfo("additionalAddressInfo"); + Assertions.assertThat(value.getAdditionalAddressInfo()).isEqualTo("additionalAddressInfo"); + } + + @Test + public void externalId() { + BaseAddress value = BaseAddress.of(); + value.setExternalId("externalId"); + Assertions.assertThat(value.getExternalId()).isEqualTo("externalId"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceTest.java new file mode 100644 index 00000000000..9928c5d1245 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitKeyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BusinessUnitKeyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BusinessUnitKeyReferenceBuilder builder) { + BusinessUnitKeyReference businessUnitKeyReference = builder.buildUnchecked(); + Assertions.assertThat(businessUnitKeyReference).isInstanceOf(BusinessUnitKeyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", BusinessUnitKeyReference.builder().key("key") } }; + } + + @Test + public void key() { + BusinessUnitKeyReference value = BusinessUnitKeyReference.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifierTest.java new file mode 100644 index 00000000000..c20bb7c607f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/BusinessUnitResourceIdentifierTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class BusinessUnitResourceIdentifierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, BusinessUnitResourceIdentifierBuilder builder) { + BusinessUnitResourceIdentifier businessUnitResourceIdentifier = builder.buildUnchecked(); + Assertions.assertThat(businessUnitResourceIdentifier).isInstanceOf(BusinessUnitResourceIdentifier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", BusinessUnitResourceIdentifier.builder().id("id") }, + new Object[] { "key", BusinessUnitResourceIdentifier.builder().key("key") } }; + } + + @Test + public void id() { + BusinessUnitResourceIdentifier value = BusinessUnitResourceIdentifier.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + BusinessUnitResourceIdentifier value = BusinessUnitResourceIdentifier.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountReferenceTest.java new file mode 100644 index 00000000000..ae4ea981ddb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartDiscountReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartDiscountReferenceBuilder builder) { + CartDiscountReference cartDiscountReference = builder.buildUnchecked(); + Assertions.assertThat(cartDiscountReference).isInstanceOf(CartDiscountReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CartDiscountReference.builder().id("id") } }; + } + + @Test + public void id() { + CartDiscountReference value = CartDiscountReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountTargetTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountTargetTest.java new file mode 100644 index 00000000000..eefcac69efa --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountTargetTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartDiscountTargetTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartDiscountTargetBuilder builder) { + CartDiscountTarget cartDiscountTarget = builder.buildUnchecked(); + Assertions.assertThat(cartDiscountTarget).isInstanceOf(CartDiscountTarget.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", CartDiscountTarget.builder().type("type") } }; + } + + @Test + public void type() { + CartDiscountTarget value = CartDiscountTarget.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountValueTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountValueTest.java new file mode 100644 index 00000000000..19b355cb9e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CartDiscountValueTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CartDiscountValueTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CartDiscountValueBuilder builder) { + CartDiscountValue cartDiscountValue = builder.buildUnchecked(); + Assertions.assertThat(cartDiscountValue).isInstanceOf(CartDiscountValue.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", CartDiscountValue.builder().type("type") } }; + } + + @Test + public void type() { + CartDiscountValue value = CartDiscountValue.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CategoryReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CategoryReferenceTest.java new file mode 100644 index 00000000000..8f2cd65cc06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CategoryReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CategoryReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CategoryReferenceBuilder builder) { + CategoryReference categoryReference = builder.buildUnchecked(); + Assertions.assertThat(categoryReference).isInstanceOf(CategoryReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CategoryReference.builder().id("id") } }; + } + + @Test + public void id() { + CategoryReference value = CategoryReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyTest.java new file mode 100644 index 00000000000..0eb272ff83c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CentPrecisionMoneyTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CentPrecisionMoneyTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CentPrecisionMoneyBuilder builder) { + CentPrecisionMoney centPrecisionMoney = builder.buildUnchecked(); + Assertions.assertThat(centPrecisionMoney).isInstanceOf(CentPrecisionMoney.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "fractionDigits", CentPrecisionMoney.builder().fractionDigits(4) } }; + } + + @Test + public void fractionDigits() { + CentPrecisionMoney value = CentPrecisionMoney.of(); + value.setFractionDigits(4); + Assertions.assertThat(value.getFractionDigits()).isEqualTo(4); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ChannelReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ChannelReferenceTest.java new file mode 100644 index 00000000000..1d5c7599479 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ChannelReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ChannelReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ChannelReferenceBuilder builder) { + ChannelReference channelReference = builder.buildUnchecked(); + Assertions.assertThat(channelReference).isInstanceOf(ChannelReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ChannelReference.builder().id("id") } }; + } + + @Test + public void id() { + ChannelReference value = ChannelReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ClientLoggingTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ClientLoggingTest.java new file mode 100644 index 00000000000..ff62041f7a6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ClientLoggingTest.java @@ -0,0 +1,65 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ClientLoggingTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ClientLoggingBuilder builder) { + ClientLogging clientLogging = builder.buildUnchecked(); + Assertions.assertThat(clientLogging).isInstanceOf(ClientLogging.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "clientId", ClientLogging.builder().clientId("clientId") }, + new Object[] { "externalUserId", ClientLogging.builder().externalUserId("externalUserId") }, + new Object[] { "customer", + ClientLogging.builder() + .customer(new com.commercetools.history.models.common.CustomerReferenceImpl()) }, + new Object[] { "anonymousId", ClientLogging.builder().anonymousId("anonymousId") }, + new Object[] { "associate", ClientLogging.builder() + .associate(new com.commercetools.history.models.common.CustomerReferenceImpl()) } }; + } + + @Test + public void clientId() { + ClientLogging value = ClientLogging.of(); + value.setClientId("clientId"); + Assertions.assertThat(value.getClientId()).isEqualTo("clientId"); + } + + @Test + public void externalUserId() { + ClientLogging value = ClientLogging.of(); + value.setExternalUserId("externalUserId"); + Assertions.assertThat(value.getExternalUserId()).isEqualTo("externalUserId"); + } + + @Test + public void customer() { + ClientLogging value = ClientLogging.of(); + value.setCustomer(new com.commercetools.history.models.common.CustomerReferenceImpl()); + Assertions.assertThat(value.getCustomer()) + .isEqualTo(new com.commercetools.history.models.common.CustomerReferenceImpl()); + } + + @Test + public void anonymousId() { + ClientLogging value = ClientLogging.of(); + value.setAnonymousId("anonymousId"); + Assertions.assertThat(value.getAnonymousId()).isEqualTo("anonymousId"); + } + + @Test + public void associate() { + ClientLogging value = ClientLogging.of(); + value.setAssociate(new com.commercetools.history.models.common.CustomerReferenceImpl()); + Assertions.assertThat(value.getAssociate()) + .isEqualTo(new com.commercetools.history.models.common.CustomerReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueTest.java new file mode 100644 index 00000000000..66f9dcf00be --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldEnumValueTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomFieldEnumValueTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomFieldEnumValueBuilder builder) { + CustomFieldEnumValue customFieldEnumValue = builder.buildUnchecked(); + Assertions.assertThat(customFieldEnumValue).isInstanceOf(CustomFieldEnumValue.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", CustomFieldEnumValue.builder().key("key") }, + new Object[] { "label", CustomFieldEnumValue.builder().label("label") } }; + } + + @Test + public void key() { + CustomFieldEnumValue value = CustomFieldEnumValue.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void label() { + CustomFieldEnumValue value = CustomFieldEnumValue.of(); + value.setLabel("label"); + Assertions.assertThat(value.getLabel()).isEqualTo("label"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueTest.java new file mode 100644 index 00000000000..cdd52439174 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldLocalizedEnumValueTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomFieldLocalizedEnumValueTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomFieldLocalizedEnumValueBuilder builder) { + CustomFieldLocalizedEnumValue customFieldLocalizedEnumValue = builder.buildUnchecked(); + Assertions.assertThat(customFieldLocalizedEnumValue).isInstanceOf(CustomFieldLocalizedEnumValue.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", CustomFieldLocalizedEnumValue.builder().key("key") }, + new Object[] { "label", CustomFieldLocalizedEnumValue.builder() + .label(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void key() { + CustomFieldLocalizedEnumValue value = CustomFieldLocalizedEnumValue.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void label() { + CustomFieldLocalizedEnumValue value = CustomFieldLocalizedEnumValue.of(); + value.setLabel(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getLabel()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldsTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldsTest.java index badeee85847..922b5d55f1d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldsTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomFieldsTest.java @@ -18,21 +18,24 @@ public void buildUnchecked(String name, CustomFieldsBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "type", - CustomFields.builder().type(new com.commercetools.history.models.common.ReferenceImpl()) }, - new Object[] { "fields", CustomFields.builder().fields("fields") } }; + CustomFields.builder().type(new com.commercetools.history.models.common.TypeReferenceImpl()) }, + new Object[] { "fields", CustomFields.builder() + .fields(new com.commercetools.history.models.common.FieldContainerImpl()) } }; } @Test public void type() { CustomFields value = CustomFields.of(); - value.setType(new com.commercetools.history.models.common.ReferenceImpl()); - Assertions.assertThat(value.getType()).isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + value.setType(new com.commercetools.history.models.common.TypeReferenceImpl()); + Assertions.assertThat(value.getType()) + .isEqualTo(new com.commercetools.history.models.common.TypeReferenceImpl()); } @Test public void fields() { CustomFields value = CustomFields.of(); - value.setFields("fields"); - Assertions.assertThat(value.getFields()).isEqualTo("fields"); + value.setFields(new com.commercetools.history.models.common.FieldContainerImpl()); + Assertions.assertThat(value.getFields()) + .isEqualTo(new com.commercetools.history.models.common.FieldContainerImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoTest.java new file mode 100644 index 00000000000..3720a7c03a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemRecurrenceInfoTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomLineItemRecurrenceInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomLineItemRecurrenceInfoBuilder builder) { + CustomLineItemRecurrenceInfo customLineItemRecurrenceInfo = builder.buildUnchecked(); + Assertions.assertThat(customLineItemRecurrenceInfo).isInstanceOf(CustomLineItemRecurrenceInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "recurrencePolicy", CustomLineItemRecurrenceInfo.builder() + .recurrencePolicy(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()) } }; + } + + @Test + public void recurrencePolicy() { + CustomLineItemRecurrenceInfo value = CustomLineItemRecurrenceInfo.of(); + value.setRecurrencePolicy(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemTest.java index 1f6cc6a777e..cd3e205e145 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomLineItemTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -17,18 +19,53 @@ public void buildUnchecked(String name, CustomLineItemBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", CustomLineItem.builder().id("id") }, + new Object[] { "key", CustomLineItem.builder().key("key") }, new Object[] { "name", CustomLineItem.builder() .name(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "money", - CustomLineItem.builder().money(new com.commercetools.history.models.common.MoneyImpl()) }, + CustomLineItem.builder().money(new com.commercetools.history.models.common.TypedMoneyImpl()) }, new Object[] { "taxedPrice", CustomLineItem.builder() .taxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, + new Object[] { "taxedPricePortions", + CustomLineItem.builder() + .taxedPricePortions(Collections.singletonList( + new com.commercetools.history.models.common.MethodTaxedPriceImpl())) }, new Object[] { "totalPrice", - CustomLineItem.builder().totalPrice(new com.commercetools.history.models.common.MoneyImpl()) }, + CustomLineItem.builder() + .totalPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, new Object[] { "slug", CustomLineItem.builder().slug("slug") }, - new Object[] { "quantity", CustomLineItem.builder().quantity(8) } }; + new Object[] { "quantity", CustomLineItem.builder().quantity(8L) }, + new Object[] { "state", + CustomLineItem.builder() + .state(Collections + .singletonList(new com.commercetools.history.models.common.ItemStateImpl())) }, + new Object[] { "taxCategory", + CustomLineItem.builder() + .taxCategory(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()) }, + new Object[] { "taxRate", + CustomLineItem.builder().taxRate(new com.commercetools.history.models.common.TaxRateImpl()) }, + new Object[] { "perMethodTaxRate", + CustomLineItem.builder() + .perMethodTaxRate(Collections.singletonList( + new com.commercetools.history.models.common.MethodTaxRateImpl())) }, + new Object[] { "discountedPricePerQuantity", CustomLineItem.builder() + .discountedPricePerQuantity(Collections.singletonList( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())) }, + new Object[] { "custom", + CustomLineItem.builder() + .custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "shippingDetails", CustomLineItem.builder() + .shippingDetails(new com.commercetools.history.models.common.ItemShippingDetailsImpl()) }, + new Object[] { "priceMode", + CustomLineItem.builder() + .priceMode(com.commercetools.history.models.common.CustomLineItemPriceMode + .findEnum("Standard")) }, + new Object[] { "recurrenceInfo", + CustomLineItem.builder() + .recurrenceInfo( + new com.commercetools.history.models.common.CustomLineItemRecurrenceInfoImpl()) } }; } @Test @@ -38,6 +75,13 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + CustomLineItem value = CustomLineItem.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void name() { CustomLineItem value = CustomLineItem.of(); @@ -49,8 +93,8 @@ public void name() { @Test public void money() { CustomLineItem value = CustomLineItem.of(); - value.setMoney(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getMoney()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setMoney(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getMoney()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); } @Test @@ -61,11 +105,22 @@ public void taxedPrice() { .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); } + @Test + public void taxedPricePortions() { + CustomLineItem value = CustomLineItem.of(); + value.setTaxedPricePortions( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxedPriceImpl())); + Assertions.assertThat(value.getTaxedPricePortions()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxedPriceImpl())); + } + @Test public void totalPrice() { CustomLineItem value = CustomLineItem.of(); - value.setTotalPrice(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getTotalPrice()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setTotalPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalPrice()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test @@ -78,7 +133,81 @@ public void slug() { @Test public void quantity() { CustomLineItem value = CustomLineItem.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); + } + + @Test + public void state() { + CustomLineItem value = CustomLineItem.of(); + value.setState(Collections.singletonList(new com.commercetools.history.models.common.ItemStateImpl())); + Assertions.assertThat(value.getState()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ItemStateImpl())); + } + + @Test + public void taxCategory() { + CustomLineItem value = CustomLineItem.of(); + value.setTaxCategory(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()); + Assertions.assertThat(value.getTaxCategory()) + .isEqualTo(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()); + } + + @Test + public void taxRate() { + CustomLineItem value = CustomLineItem.of(); + value.setTaxRate(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getTaxRate()).isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } + + @Test + public void perMethodTaxRate() { + CustomLineItem value = CustomLineItem.of(); + value.setPerMethodTaxRate( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxRateImpl())); + Assertions.assertThat(value.getPerMethodTaxRate()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.MethodTaxRateImpl())); + } + + @Test + public void discountedPricePerQuantity() { + CustomLineItem value = CustomLineItem.of(); + value.setDiscountedPricePerQuantity(Collections + .singletonList(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())); + Assertions.assertThat(value.getDiscountedPricePerQuantity()) + .isEqualTo(Collections.singletonList( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())); + } + + @Test + public void custom() { + CustomLineItem value = CustomLineItem.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void shippingDetails() { + CustomLineItem value = CustomLineItem.of(); + value.setShippingDetails(new com.commercetools.history.models.common.ItemShippingDetailsImpl()); + Assertions.assertThat(value.getShippingDetails()) + .isEqualTo(new com.commercetools.history.models.common.ItemShippingDetailsImpl()); + } + + @Test + public void priceMode() { + CustomLineItem value = CustomLineItem.of(); + value.setPriceMode(com.commercetools.history.models.common.CustomLineItemPriceMode.findEnum("Standard")); + Assertions.assertThat(value.getPriceMode()) + .isEqualTo(com.commercetools.history.models.common.CustomLineItemPriceMode.findEnum("Standard")); + } + + @Test + public void recurrenceInfo() { + CustomLineItem value = CustomLineItem.of(); + value.setRecurrenceInfo(new com.commercetools.history.models.common.CustomLineItemRecurrenceInfoImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.history.models.common.CustomLineItemRecurrenceInfoImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentTest.java new file mode 100644 index 00000000000..00ce4ed1e4b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupAssignmentTest.java @@ -0,0 +1,30 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerGroupAssignmentTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerGroupAssignmentBuilder builder) { + CustomerGroupAssignment customerGroupAssignment = builder.buildUnchecked(); + Assertions.assertThat(customerGroupAssignment).isInstanceOf(CustomerGroupAssignment.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "customerGroup", CustomerGroupAssignment.builder() + .customerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()) } }; + } + + @Test + public void customerGroup() { + CustomerGroupAssignment value = CustomerGroupAssignment.of(); + value.setCustomerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceTest.java new file mode 100644 index 00000000000..40ee12e658f --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerGroupReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerGroupReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerGroupReferenceBuilder builder) { + CustomerGroupReference customerGroupReference = builder.buildUnchecked(); + Assertions.assertThat(customerGroupReference).isInstanceOf(CustomerGroupReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CustomerGroupReference.builder().id("id") } }; + } + + @Test + public void id() { + CustomerGroupReference value = CustomerGroupReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerReferenceTest.java new file mode 100644 index 00000000000..ded90ac1a0e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/CustomerReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class CustomerReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, CustomerReferenceBuilder builder) { + CustomerReference customerReference = builder.buildUnchecked(); + Assertions.assertThat(customerReference).isInstanceOf(CustomerReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", CustomerReference.builder().id("id") } }; + } + + @Test + public void id() { + CustomerReference value = CustomerReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryItemTest.java index 3d5ef018cc1..a75549a4425 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryItemTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryItemTest.java @@ -17,7 +17,7 @@ public void buildUnchecked(String name, DeliveryItemBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", DeliveryItem.builder().id("id") }, - new Object[] { "quantity", DeliveryItem.builder().quantity(8) } }; + new Object[] { "quantity", DeliveryItem.builder().quantity(8L) } }; } @Test @@ -30,7 +30,7 @@ public void id() { @Test public void quantity() { DeliveryItem value = DeliveryItem.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryTest.java index 3fffc78ab47..a39976a4515 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DeliveryTest.java @@ -1,6 +1,7 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; import java.util.Collections; import org.assertj.core.api.Assertions; @@ -19,7 +20,8 @@ public void buildUnchecked(String name, DeliveryBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", Delivery.builder().id("id") }, - new Object[] { "createdAt", Delivery.builder().createdAt("createdAt") }, + new Object[] { "key", Delivery.builder().key("key") }, + new Object[] { "createdAt", Delivery.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, new Object[] { "items", Delivery.builder() .items(Collections.singletonList( @@ -41,11 +43,18 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + Delivery value = Delivery.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void createdAt() { Delivery value = Delivery.of(); - value.setCreatedAt("createdAt"); - Assertions.assertThat(value.getCreatedAt()).isEqualTo("createdAt"); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeInfoTest.java index e4be382b9dc..c7831f7020d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeInfoTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeInfoTest.java @@ -17,9 +17,8 @@ public void buildUnchecked(String name, DiscountCodeInfoBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { - new Object[] { "discountCode", - DiscountCodeInfo.builder() - .discountCode(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "discountCode", DiscountCodeInfo.builder() + .discountCode(new com.commercetools.history.models.common.DiscountCodeReferenceImpl()) }, new Object[] { "state", DiscountCodeInfo.builder() .state(com.commercetools.history.models.common.DiscountCodeState.findEnum("NotActive")) } }; } @@ -27,9 +26,9 @@ public static Object[][] objectBuilder() { @Test public void discountCode() { DiscountCodeInfo value = DiscountCodeInfo.of(); - value.setDiscountCode(new com.commercetools.history.models.common.ReferenceImpl()); + value.setDiscountCode(new com.commercetools.history.models.common.DiscountCodeReferenceImpl()); Assertions.assertThat(value.getDiscountCode()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.DiscountCodeReferenceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceTest.java new file mode 100644 index 00000000000..7845445b2b9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountCodeReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountCodeReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountCodeReferenceBuilder builder) { + DiscountCodeReference discountCodeReference = builder.buildUnchecked(); + Assertions.assertThat(discountCodeReference).isInstanceOf(DiscountCodeReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", DiscountCodeReference.builder().id("id") } }; + } + + @Test + public void id() { + DiscountCodeReference value = DiscountCodeReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceTest.java new file mode 100644 index 00000000000..be8e483776e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountOnTotalPriceTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.history.models.common; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountOnTotalPriceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountOnTotalPriceBuilder builder) { + DiscountOnTotalPrice discountOnTotalPrice = builder.buildUnchecked(); + Assertions.assertThat(discountOnTotalPrice).isInstanceOf(DiscountOnTotalPrice.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "discountedAmount", + DiscountOnTotalPrice.builder() + .discountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "includedDiscounts", + DiscountOnTotalPrice.builder() + .includedDiscounts(Collections.singletonList( + new com.commercetools.history.models.common.DiscountedTotalPricePortionImpl())) }, + new Object[] { "discountedNetAmount", + DiscountOnTotalPrice.builder() + .discountedNetAmount(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "discountedGrossAmount", DiscountOnTotalPrice.builder() + .discountedGrossAmount(new com.commercetools.history.models.common.TypedMoneyImpl()) } }; + } + + @Test + public void discountedAmount() { + DiscountOnTotalPrice value = DiscountOnTotalPrice.of(); + value.setDiscountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getDiscountedAmount()) + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void includedDiscounts() { + DiscountOnTotalPrice value = DiscountOnTotalPrice.of(); + value.setIncludedDiscounts( + Collections.singletonList(new com.commercetools.history.models.common.DiscountedTotalPricePortionImpl())); + Assertions.assertThat(value.getIncludedDiscounts()) + .isEqualTo(Collections + .singletonList(new com.commercetools.history.models.common.DiscountedTotalPricePortionImpl())); + } + + @Test + public void discountedNetAmount() { + DiscountOnTotalPrice value = DiscountOnTotalPrice.of(); + value.setDiscountedNetAmount(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getDiscountedNetAmount()) + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void discountedGrossAmount() { + DiscountOnTotalPrice value = DiscountOnTotalPrice.of(); + value.setDiscountedGrossAmount(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getDiscountedGrossAmount()) + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionTest.java index af1afe64867..7ed51985722 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPortionTest.java @@ -21,7 +21,7 @@ public static Object[][] objectBuilder() { DiscountedLineItemPortion.builder() .discount(new com.commercetools.history.models.common.ReferenceImpl()) }, new Object[] { "discountedAmount", DiscountedLineItemPortion.builder() - .discountedAmount(new com.commercetools.history.models.common.MoneyImpl()) } }; + .discountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()) } }; } @Test @@ -35,8 +35,8 @@ public void discount() { @Test public void discountedAmount() { DiscountedLineItemPortion value = DiscountedLineItemPortion.of(); - value.setDiscountedAmount(new com.commercetools.history.models.common.MoneyImpl()); + value.setDiscountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()); Assertions.assertThat(value.getDiscountedAmount()) - .isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityTest.java index 5bcbb6e1c22..4ed2f008666 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceForQuantityTest.java @@ -17,7 +17,7 @@ public void buildUnchecked(String name, DiscountedLineItemPriceForQuantityBuilde } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "quantity", DiscountedLineItemPriceForQuantity.builder().quantity(8) }, + return new Object[][] { new Object[] { "quantity", DiscountedLineItemPriceForQuantity.builder().quantity(8L) }, new Object[] { "discountedPrice", DiscountedLineItemPriceForQuantity.builder() .discountedPrice(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()) } }; } @@ -25,8 +25,8 @@ public static Object[][] objectBuilder() { @Test public void quantity() { DiscountedLineItemPriceForQuantity value = DiscountedLineItemPriceForQuantity.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceTest.java index 86e4e92aeab..e9f776ad651 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedLineItemPriceTest.java @@ -21,7 +21,7 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "value", DiscountedLineItemPrice.builder() - .value(new com.commercetools.history.models.common.MoneyImpl()) }, + .value(new com.commercetools.history.models.common.TypedMoneyImpl()) }, new Object[] { "includedDiscounts", DiscountedLineItemPrice.builder() .includedDiscounts(Collections.singletonList( @@ -31,8 +31,8 @@ public static Object[][] objectBuilder() { @Test public void value() { DiscountedLineItemPrice value = DiscountedLineItemPrice.of(); - value.setValue(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedPriceTest.java new file mode 100644 index 00000000000..43479841a4c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedPriceTest.java @@ -0,0 +1,40 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountedPriceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountedPriceBuilder builder) { + DiscountedPrice discountedPrice = builder.buildUnchecked(); + Assertions.assertThat(discountedPrice).isInstanceOf(DiscountedPrice.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "value", + DiscountedPrice.builder().value(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "discount", DiscountedPrice.builder() + .discount(new com.commercetools.history.models.common.ProductDiscountReferenceImpl()) } }; + } + + @Test + public void value() { + DiscountedPrice value = DiscountedPrice.of(); + value.setValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void discount() { + DiscountedPrice value = DiscountedPrice.of(); + value.setDiscount(new com.commercetools.history.models.common.ProductDiscountReferenceImpl()); + Assertions.assertThat(value.getDiscount()) + .isEqualTo(new com.commercetools.history.models.common.ProductDiscountReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionTest.java new file mode 100644 index 00000000000..0b3018f9088 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/DiscountedTotalPricePortionTest.java @@ -0,0 +1,42 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class DiscountedTotalPricePortionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, DiscountedTotalPricePortionBuilder builder) { + DiscountedTotalPricePortion discountedTotalPricePortion = builder.buildUnchecked(); + Assertions.assertThat(discountedTotalPricePortion).isInstanceOf(DiscountedTotalPricePortion.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "discount", + DiscountedTotalPricePortion.builder() + .discount(new com.commercetools.history.models.common.ReferenceImpl()) }, + new Object[] { "discountedAmount", DiscountedTotalPricePortion.builder() + .discountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()) } }; + } + + @Test + public void discount() { + DiscountedTotalPricePortion value = DiscountedTotalPricePortion.of(); + value.setDiscount(new com.commercetools.history.models.common.ReferenceImpl()); + Assertions.assertThat(value.getDiscount()) + .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + } + + @Test + public void discountedAmount() { + DiscountedTotalPricePortion value = DiscountedTotalPricePortion.of(); + value.setDiscountedAmount(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getDiscountedAmount()) + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldContainerTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldContainerTest.java new file mode 100644 index 00000000000..2964b47835e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldContainerTest.java @@ -0,0 +1,6 @@ + +package com.commercetools.history.models.common; + +public class FieldContainerTest { + +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldDefinitionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldDefinitionTest.java index 53f78b914e5..2ab539c4f89 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldDefinitionTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/FieldDefinitionTest.java @@ -23,8 +23,10 @@ public static Object[][] objectBuilder() { new Object[] { "label", FieldDefinition.builder() .label(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "required", FieldDefinition.builder().required(true) }, new Object[] { "inputHint", FieldDefinition.builder() - .inputHint(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")) } }; + .inputHint( + com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")) } }; } @Test @@ -49,11 +51,18 @@ public void label() { .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } + @Test + public void required() { + FieldDefinition value = FieldDefinition.of(); + value.setRequired(true); + Assertions.assertThat(value.getRequired()).isEqualTo(true); + } + @Test public void inputHint() { FieldDefinition value = FieldDefinition.of(); - value.setInputHint(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + value.setInputHint(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); Assertions.assertThat(value.getInputHint()) - .isEqualTo(com.commercetools.history.models.common.TextInputHint.findEnum("SingleLine")); + .isEqualTo(com.commercetools.history.models.common.TypeTextInputHint.findEnum("SingleLine")); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/GeoLocationTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/GeoLocationTest.java index 215bb12d1f2..8c636268b3e 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/GeoLocationTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/GeoLocationTest.java @@ -18,17 +18,10 @@ public void buildUnchecked(String name, GeoLocationBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "type", GeoLocation.builder().type("type") }, + return new Object[][] { new Object[] { "coordinates", GeoLocation.builder().coordinates(Collections.singletonList(9)) } }; } - @Test - public void type() { - GeoLocation value = GeoLocation.of(); - value.setType("type"); - Assertions.assertThat(value.getType()).isEqualTo("type"); - } - @Test public void coordinates() { GeoLocation value = GeoLocation.of(); diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentTest.java index 2d5a83e5f90..b0d04523f14 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateRoleAssignmentTest.java @@ -17,26 +17,25 @@ public void buildUnchecked(String name, InheritedAssociateRoleAssignmentBuilder public static Object[][] objectBuilder() { return new Object[][] { - new Object[] { "associateRole", - InheritedAssociateRoleAssignment.builder() - .associateRole(new com.commercetools.history.models.common.KeyReferenceImpl()) }, + new Object[] { "associateRole", InheritedAssociateRoleAssignment.builder() + .associateRole(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()) }, new Object[] { "source", InheritedAssociateRoleAssignment.builder() - .source(new com.commercetools.history.models.common.KeyReferenceImpl()) } }; + .source(new com.commercetools.history.models.common.BusinessUnitKeyReferenceImpl()) } }; } @Test public void associateRole() { InheritedAssociateRoleAssignment value = InheritedAssociateRoleAssignment.of(); - value.setAssociateRole(new com.commercetools.history.models.common.KeyReferenceImpl()); + value.setAssociateRole(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()); Assertions.assertThat(value.getAssociateRole()) - .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.AssociateRoleKeyReferenceImpl()); } @Test public void source() { InheritedAssociateRoleAssignment value = InheritedAssociateRoleAssignment.of(); - value.setSource(new com.commercetools.history.models.common.KeyReferenceImpl()); + value.setSource(new com.commercetools.history.models.common.BusinessUnitKeyReferenceImpl()); Assertions.assertThat(value.getSource()) - .isEqualTo(new com.commercetools.history.models.common.KeyReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.BusinessUnitKeyReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateTest.java index f0c92db0aef..3b572dd3c76 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/InheritedAssociateTest.java @@ -23,7 +23,7 @@ public static Object[][] objectBuilder() { .associateRoleAssignments(Collections.singletonList( new com.commercetools.history.models.common.InheritedAssociateRoleAssignmentImpl())) }, new Object[] { "customer", InheritedAssociate.builder() - .customer(new com.commercetools.history.models.common.ReferenceImpl()) } }; + .customer(new com.commercetools.history.models.common.CustomerReferenceImpl()) } }; } @Test @@ -39,8 +39,8 @@ public void associateRoleAssignments() { @Test public void customer() { InheritedAssociate value = InheritedAssociate.of(); - value.setCustomer(new com.commercetools.history.models.common.ReferenceImpl()); + value.setCustomer(new com.commercetools.history.models.common.CustomerReferenceImpl()); Assertions.assertThat(value.getCustomer()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.CustomerReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemShippingTargetTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemShippingTargetTest.java index 3559740be9c..9259ac5e6bf 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemShippingTargetTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemShippingTargetTest.java @@ -17,7 +17,8 @@ public void buildUnchecked(String name, ItemShippingTargetBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "addressKey", ItemShippingTarget.builder().addressKey("addressKey") }, - new Object[] { "quantity", ItemShippingTarget.builder().quantity(8) } }; + new Object[] { "quantity", ItemShippingTarget.builder().quantity(8L) }, new Object[] { + "shippingMethodKey", ItemShippingTarget.builder().shippingMethodKey("shippingMethodKey") } }; } @Test @@ -30,7 +31,14 @@ public void addressKey() { @Test public void quantity() { ItemShippingTarget value = ItemShippingTarget.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); + } + + @Test + public void shippingMethodKey() { + ItemShippingTarget value = ItemShippingTarget.of(); + value.setShippingMethodKey("shippingMethodKey"); + Assertions.assertThat(value.getShippingMethodKey()).isEqualTo("shippingMethodKey"); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemStateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemStateTest.java index 62a4922f0b4..613e63316a1 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemStateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ItemStateTest.java @@ -16,21 +16,22 @@ public void buildUnchecked(String name, ItemStateBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "quantity", ItemState.builder().quantity(8) }, new Object[] { "state", - ItemState.builder().state(new com.commercetools.history.models.common.ReferenceImpl()) } }; + return new Object[][] { new Object[] { "quantity", ItemState.builder().quantity(8L) }, new Object[] { "state", + ItemState.builder().state(new com.commercetools.history.models.common.StateReferenceImpl()) } }; } @Test public void quantity() { ItemState value = ItemState.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } @Test public void state() { ItemState value = ItemState.of(); - value.setState(new com.commercetools.history.models.common.ReferenceImpl()); - Assertions.assertThat(value.getState()).isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + value.setState(new com.commercetools.history.models.common.StateReferenceImpl()); + Assertions.assertThat(value.getState()) + .isEqualTo(new com.commercetools.history.models.common.StateReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/KeyReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/KeyReferenceTest.java deleted file mode 100644 index 2d40786a4ea..00000000000 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/KeyReferenceTest.java +++ /dev/null @@ -1,38 +0,0 @@ - -package com.commercetools.history.models.common; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -public class KeyReferenceTest { - - @ParameterizedTest(name = "#{index} with {0}") - @MethodSource("objectBuilder") - public void buildUnchecked(String name, KeyReferenceBuilder builder) { - KeyReference keyReference = builder.buildUnchecked(); - Assertions.assertThat(keyReference).isInstanceOf(KeyReference.class); - } - - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "key", KeyReference.builder().key("key") }, - new Object[] { "typeId", KeyReference.builder() - .typeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")) } }; - } - - @Test - public void key() { - KeyReference value = KeyReference.of(); - value.setKey("key"); - Assertions.assertThat(value.getKey()).isEqualTo("key"); - } - - @Test - public void typeId() { - KeyReference value = KeyReference.of(); - value.setTypeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); - Assertions.assertThat(value.getTypeId()) - .isEqualTo(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); - } -} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoTest.java new file mode 100644 index 00000000000..dc6a697b9e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemRecurrenceInfoTest.java @@ -0,0 +1,45 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class LineItemRecurrenceInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, LineItemRecurrenceInfoBuilder builder) { + LineItemRecurrenceInfo lineItemRecurrenceInfo = builder.buildUnchecked(); + Assertions.assertThat(lineItemRecurrenceInfo).isInstanceOf(LineItemRecurrenceInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "recurrencePolicy", + LineItemRecurrenceInfo.builder() + .recurrencePolicy( + new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()) }, + new Object[] { "priceSelectionMode", + LineItemRecurrenceInfo.builder() + .priceSelectionMode( + com.commercetools.history.models.common.PriceSelectionMode.findEnum("Fixed")) } }; + } + + @Test + public void recurrencePolicy() { + LineItemRecurrenceInfo value = LineItemRecurrenceInfo.of(); + value.setRecurrencePolicy(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); + } + + @Test + public void priceSelectionMode() { + LineItemRecurrenceInfo value = LineItemRecurrenceInfo.of(); + value.setPriceSelectionMode(com.commercetools.history.models.common.PriceSelectionMode.findEnum("Fixed")); + Assertions.assertThat(value.getPriceSelectionMode()) + .isEqualTo(com.commercetools.history.models.common.PriceSelectionMode.findEnum("Fixed")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemTest.java index 9155cdf5716..70e20a43d89 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/LineItemTest.java @@ -1,6 +1,9 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -16,59 +19,102 @@ public void buildUnchecked(String name, LineItemBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "addedAt", LineItem.builder().addedAt("addedAt") }, - new Object[] { "custom", - LineItem.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, - new Object[] { "id", LineItem.builder().id("id") }, + return new Object[][] { new Object[] { "id", LineItem.builder().id("id") }, + new Object[] { "key", LineItem.builder().key("key") }, + new Object[] { "productId", LineItem.builder().productId("productId") }, + new Object[] { "productKey", LineItem.builder().productKey("productKey") }, new Object[] { "name", LineItem.builder().name(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "productId", LineItem.builder().productId("productId") }, new Object[] { "productSlug", LineItem.builder() .productSlug(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "productType", - LineItem.builder().productType(new com.commercetools.history.models.common.ReferenceImpl()) }, - new Object[] { "quantity", LineItem.builder().quantity(8) }, + LineItem.builder() + .productType(new com.commercetools.history.models.common.ProductTypeReferenceImpl()) }, new Object[] { "variant", - LineItem.builder().variant(new com.commercetools.history.models.common.VariantImpl()) }, - new Object[] { "variantId", LineItem.builder().variantId(5) } }; + LineItem.builder().variant(new com.commercetools.history.models.common.ProductVariantImpl()) }, + new Object[] { "price", + LineItem.builder().price(new com.commercetools.history.models.common.PriceImpl()) }, + new Object[] { "quantity", LineItem.builder().quantity(8L) }, + new Object[] { "totalPrice", + LineItem.builder() + .totalPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, + new Object[] { "discountedPricePerQuantity", LineItem.builder() + .discountedPricePerQuantity(Collections.singletonList( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())) }, + new Object[] { "taxedPrice", + LineItem.builder() + .taxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, + new Object[] { "taxedPricePortions", + LineItem.builder() + .taxedPricePortions(Collections.singletonList( + new com.commercetools.history.models.common.MethodTaxedPriceImpl())) }, + new Object[] { "state", + LineItem.builder() + .state(Collections + .singletonList(new com.commercetools.history.models.common.ItemStateImpl())) }, + new Object[] { "taxRate", + LineItem.builder().taxRate(new com.commercetools.history.models.common.TaxRateImpl()) }, + new Object[] { "perMethodTaxRate", + LineItem.builder() + .perMethodTaxRate(Collections.singletonList( + new com.commercetools.history.models.common.MethodTaxRateImpl())) }, + new Object[] { "supplyChannel", + LineItem.builder() + .supplyChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()) }, + new Object[] { "distributionChannel", LineItem.builder() + .distributionChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()) }, + new Object[] { "priceMode", LineItem.builder() + .priceMode(com.commercetools.history.models.common.LineItemPriceMode.findEnum("Platform")) }, + new Object[] { "lineItemMode", LineItem.builder() + .lineItemMode(com.commercetools.history.models.common.LineItemMode.findEnum("Standard")) }, + new Object[] { "inventoryMode", LineItem.builder() + .inventoryMode(com.commercetools.history.models.common.InventoryMode.findEnum("None")) }, + new Object[] { "shippingDetails", LineItem.builder() + .shippingDetails(new com.commercetools.history.models.common.ItemShippingDetailsImpl()) }, + new Object[] { "custom", + LineItem.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "addedAt", LineItem.builder().addedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "lastModifiedAt", + LineItem.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "recurrenceInfo", LineItem.builder() + .recurrenceInfo(new com.commercetools.history.models.common.LineItemRecurrenceInfoImpl()) } }; } @Test - public void addedAt() { + public void id() { LineItem value = LineItem.of(); - value.setAddedAt("addedAt"); - Assertions.assertThat(value.getAddedAt()).isEqualTo("addedAt"); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); } @Test - public void custom() { + public void key() { LineItem value = LineItem.of(); - value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); - Assertions.assertThat(value.getCustom()) - .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); } @Test - public void id() { + public void productId() { LineItem value = LineItem.of(); - value.setId("id"); - Assertions.assertThat(value.getId()).isEqualTo("id"); + value.setProductId("productId"); + Assertions.assertThat(value.getProductId()).isEqualTo("productId"); } @Test - public void name() { + public void productKey() { LineItem value = LineItem.of(); - value.setName(new com.commercetools.history.models.common.LocalizedStringImpl()); - Assertions.assertThat(value.getName()) - .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); } @Test - public void productId() { + public void name() { LineItem value = LineItem.of(); - value.setProductId("productId"); - Assertions.assertThat(value.getProductId()).isEqualTo("productId"); + value.setName(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); } @Test @@ -82,29 +128,168 @@ public void productSlug() { @Test public void productType() { LineItem value = LineItem.of(); - value.setProductType(new com.commercetools.history.models.common.ReferenceImpl()); + value.setProductType(new com.commercetools.history.models.common.ProductTypeReferenceImpl()); Assertions.assertThat(value.getProductType()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.ProductTypeReferenceImpl()); + } + + @Test + public void variant() { + LineItem value = LineItem.of(); + value.setVariant(new com.commercetools.history.models.common.ProductVariantImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantImpl()); + } + + @Test + public void price() { + LineItem value = LineItem.of(); + value.setPrice(new com.commercetools.history.models.common.PriceImpl()); + Assertions.assertThat(value.getPrice()).isEqualTo(new com.commercetools.history.models.common.PriceImpl()); } @Test public void quantity() { LineItem value = LineItem.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } @Test - public void variant() { + public void totalPrice() { + LineItem value = LineItem.of(); + value.setTotalPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalPrice()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + } + + @Test + public void discountedPricePerQuantity() { + LineItem value = LineItem.of(); + value.setDiscountedPricePerQuantity(Collections + .singletonList(new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())); + Assertions.assertThat(value.getDiscountedPricePerQuantity()) + .isEqualTo(Collections.singletonList( + new com.commercetools.history.models.common.DiscountedLineItemPriceForQuantityImpl())); + } + + @Test + public void taxedPrice() { + LineItem value = LineItem.of(); + value.setTaxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + Assertions.assertThat(value.getTaxedPrice()) + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + } + + @Test + public void taxedPricePortions() { + LineItem value = LineItem.of(); + value.setTaxedPricePortions( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxedPriceImpl())); + Assertions.assertThat(value.getTaxedPricePortions()) + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxedPriceImpl())); + } + + @Test + public void state() { + LineItem value = LineItem.of(); + value.setState(Collections.singletonList(new com.commercetools.history.models.common.ItemStateImpl())); + Assertions.assertThat(value.getState()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ItemStateImpl())); + } + + @Test + public void taxRate() { + LineItem value = LineItem.of(); + value.setTaxRate(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getTaxRate()).isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } + + @Test + public void perMethodTaxRate() { + LineItem value = LineItem.of(); + value.setPerMethodTaxRate( + Collections.singletonList(new com.commercetools.history.models.common.MethodTaxRateImpl())); + Assertions.assertThat(value.getPerMethodTaxRate()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.MethodTaxRateImpl())); + } + + @Test + public void supplyChannel() { + LineItem value = LineItem.of(); + value.setSupplyChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()); + Assertions.assertThat(value.getSupplyChannel()) + .isEqualTo(new com.commercetools.history.models.common.ChannelReferenceImpl()); + } + + @Test + public void distributionChannel() { + LineItem value = LineItem.of(); + value.setDistributionChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()); + Assertions.assertThat(value.getDistributionChannel()) + .isEqualTo(new com.commercetools.history.models.common.ChannelReferenceImpl()); + } + + @Test + public void priceMode() { + LineItem value = LineItem.of(); + value.setPriceMode(com.commercetools.history.models.common.LineItemPriceMode.findEnum("Platform")); + Assertions.assertThat(value.getPriceMode()) + .isEqualTo(com.commercetools.history.models.common.LineItemPriceMode.findEnum("Platform")); + } + + @Test + public void lineItemMode() { + LineItem value = LineItem.of(); + value.setLineItemMode(com.commercetools.history.models.common.LineItemMode.findEnum("Standard")); + Assertions.assertThat(value.getLineItemMode()) + .isEqualTo(com.commercetools.history.models.common.LineItemMode.findEnum("Standard")); + } + + @Test + public void inventoryMode() { + LineItem value = LineItem.of(); + value.setInventoryMode(com.commercetools.history.models.common.InventoryMode.findEnum("None")); + Assertions.assertThat(value.getInventoryMode()) + .isEqualTo(com.commercetools.history.models.common.InventoryMode.findEnum("None")); + } + + @Test + public void shippingDetails() { + LineItem value = LineItem.of(); + value.setShippingDetails(new com.commercetools.history.models.common.ItemShippingDetailsImpl()); + Assertions.assertThat(value.getShippingDetails()) + .isEqualTo(new com.commercetools.history.models.common.ItemShippingDetailsImpl()); + } + + @Test + public void custom() { + LineItem value = LineItem.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void addedAt() { + LineItem value = LineItem.of(); + value.setAddedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getAddedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { LineItem value = LineItem.of(); - value.setVariant(new com.commercetools.history.models.common.VariantImpl()); - Assertions.assertThat(value.getVariant()).isEqualTo(new com.commercetools.history.models.common.VariantImpl()); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test - public void variantId() { + public void recurrenceInfo() { LineItem value = LineItem.of(); - value.setVariantId(5); - Assertions.assertThat(value.getVariantId()).isEqualTo(5); + value.setRecurrenceInfo(new com.commercetools.history.models.common.LineItemRecurrenceInfoImpl()); + Assertions.assertThat(value.getRecurrenceInfo()) + .isEqualTo(new com.commercetools.history.models.common.LineItemRecurrenceInfoImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxRateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxRateTest.java new file mode 100644 index 00000000000..063daab2f98 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxRateTest.java @@ -0,0 +1,38 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MethodTaxRateTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MethodTaxRateBuilder builder) { + MethodTaxRate methodTaxRate = builder.buildUnchecked(); + Assertions.assertThat(methodTaxRate).isInstanceOf(MethodTaxRate.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "shippingMethodKey", MethodTaxRate.builder().shippingMethodKey("shippingMethodKey") }, + new Object[] { "taxRate", + MethodTaxRate.builder().taxRate(new com.commercetools.history.models.common.TaxRateImpl()) } }; + } + + @Test + public void shippingMethodKey() { + MethodTaxRate value = MethodTaxRate.of(); + value.setShippingMethodKey("shippingMethodKey"); + Assertions.assertThat(value.getShippingMethodKey()).isEqualTo("shippingMethodKey"); + } + + @Test + public void taxRate() { + MethodTaxRate value = MethodTaxRate.of(); + value.setTaxRate(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getTaxRate()).isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxedPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxedPriceTest.java new file mode 100644 index 00000000000..a68ec8e20a4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MethodTaxedPriceTest.java @@ -0,0 +1,39 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class MethodTaxedPriceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, MethodTaxedPriceBuilder builder) { + MethodTaxedPrice methodTaxedPrice = builder.buildUnchecked(); + Assertions.assertThat(methodTaxedPrice).isInstanceOf(MethodTaxedPrice.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "shippingMethodKey", MethodTaxedPrice.builder().shippingMethodKey("shippingMethodKey") }, + new Object[] { "taxedPrice", MethodTaxedPrice.builder() + .taxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()) } }; + } + + @Test + public void shippingMethodKey() { + MethodTaxedPrice value = MethodTaxedPrice.of(); + value.setShippingMethodKey("shippingMethodKey"); + Assertions.assertThat(value.getShippingMethodKey()).isEqualTo("shippingMethodKey"); + } + + @Test + public void taxedPrice() { + MethodTaxedPrice value = MethodTaxedPrice.of(); + value.setTaxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + Assertions.assertThat(value.getTaxedPrice()) + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MoneyTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MoneyTest.java index f32b9ec8f6f..85db63adb59 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MoneyTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/MoneyTest.java @@ -16,39 +16,21 @@ public void buildUnchecked(String name, MoneyBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "currencyCode", Money.builder().currencyCode("currencyCode") }, - new Object[] { "centAmount", Money.builder().centAmount(3) }, - new Object[] { "fractionDigits", Money.builder().fractionDigits(4) }, - new Object[] { "type", Money.builder() - .type(com.commercetools.history.models.common.MoneyType.findEnum("centPrecision")) } }; - } - - @Test - public void currencyCode() { - Money value = Money.of(); - value.setCurrencyCode("currencyCode"); - Assertions.assertThat(value.getCurrencyCode()).isEqualTo("currencyCode"); + return new Object[][] { new Object[] { "centAmount", Money.builder().centAmount(3L) }, + new Object[] { "currencyCode", Money.builder().currencyCode("currencyCode") } }; } @Test public void centAmount() { Money value = Money.of(); - value.setCentAmount(3); - Assertions.assertThat(value.getCentAmount()).isEqualTo(3); + value.setCentAmount(3L); + Assertions.assertThat(value.getCentAmount()).isEqualTo(3L); } @Test - public void fractionDigits() { - Money value = Money.of(); - value.setFractionDigits(4); - Assertions.assertThat(value.getFractionDigits()).isEqualTo(4); - } - - @Test - public void type() { + public void currencyCode() { Money value = Money.of(); - value.setType(com.commercetools.history.models.common.MoneyType.findEnum("centPrecision")); - Assertions.assertThat(value.getType()) - .isEqualTo(com.commercetools.history.models.common.MoneyType.findEnum("centPrecision")); + value.setCurrencyCode("currencyCode"); + Assertions.assertThat(value.getCurrencyCode()).isEqualTo("currencyCode"); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ParcelTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ParcelTest.java index a8c2332a66a..8ba14bd4b2f 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ParcelTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ParcelTest.java @@ -1,6 +1,7 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; import java.util.Collections; import org.assertj.core.api.Assertions; @@ -19,7 +20,8 @@ public void buildUnchecked(String name, ParcelBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", Parcel.builder().id("id") }, - new Object[] { "createdAt", Parcel.builder().createdAt("createdAt") }, + new Object[] { "key", Parcel.builder().key("key") }, + new Object[] { "createdAt", Parcel.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, new Object[] { "measurements", Parcel.builder() .measurements(new com.commercetools.history.models.common.ParcelMeasurementsImpl()) }, @@ -28,7 +30,9 @@ public static Object[][] objectBuilder() { new Object[] { "items", Parcel.builder() .items(Collections.singletonList( - new com.commercetools.history.models.common.DeliveryItemImpl())) } }; + new com.commercetools.history.models.common.DeliveryItemImpl())) }, + new Object[] { "custom", + Parcel.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; } @Test @@ -38,11 +42,18 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + Parcel value = Parcel.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void createdAt() { Parcel value = Parcel.of(); - value.setCreatedAt("createdAt"); - Assertions.assertThat(value.getCreatedAt()).isEqualTo("createdAt"); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test @@ -68,4 +79,12 @@ public void items() { Assertions.assertThat(value.getItems()) .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.DeliveryItemImpl())); } + + @Test + public void custom() { + Parcel value = Parcel.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentInfoTest.java index 881f41dac18..afc5b3fec87 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentInfoTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentInfoTest.java @@ -19,14 +19,17 @@ public void buildUnchecked(String name, PaymentInfoBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "payments", PaymentInfo.builder() - .payments(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())) } }; + .payments( + Collections.singletonList(new com.commercetools.history.models.common.PaymentReferenceImpl())) } }; } @Test public void payments() { PaymentInfo value = PaymentInfo.of(); - value.setPayments(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + value.setPayments( + Collections.singletonList(new com.commercetools.history.models.common.PaymentReferenceImpl())); Assertions.assertThat(value.getPayments()) - .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ReferenceImpl())); + .isEqualTo( + Collections.singletonList(new com.commercetools.history.models.common.PaymentReferenceImpl())); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentReferenceTest.java new file mode 100644 index 00000000000..d56ad306ebc --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PaymentReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PaymentReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PaymentReferenceBuilder builder) { + PaymentReference paymentReference = builder.buildUnchecked(); + Assertions.assertThat(paymentReference).isInstanceOf(PaymentReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", PaymentReference.builder().id("id") } }; + } + + @Test + public void id() { + PaymentReference value = PaymentReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTest.java index 2575bb23a17..0db923954de 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTest.java @@ -1,6 +1,9 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -16,8 +19,29 @@ public void buildUnchecked(String name, PriceBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "id", Price.builder().id("id") }, new Object[] { "value", - Price.builder().value(new com.commercetools.history.models.common.MoneyImpl()) } }; + return new Object[][] { new Object[] { "id", Price.builder().id("id") }, + new Object[] { "key", Price.builder().key("key") }, + new Object[] { "value", + Price.builder().value(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "country", Price.builder().country("country") }, + new Object[] { "customerGroup", Price.builder() + .customerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()) }, + new Object[] { "channel", + Price.builder().channel(new com.commercetools.history.models.common.ChannelReferenceImpl()) }, + new Object[] { "validFrom", Price.builder().validFrom(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "validUntil", Price.builder().validUntil(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "discounted", + Price.builder().discounted(new com.commercetools.history.models.common.DiscountedPriceImpl()) }, + new Object[] { "tiers", + Price.builder() + .tiers(Collections + .singletonList(new com.commercetools.history.models.common.PriceTierImpl())) }, + new Object[] { "custom", + Price.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "recurrencePolicy", + Price.builder() + .recurrencePolicy( + new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()) } }; } @Test @@ -27,10 +51,86 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + Price value = Price.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void value() { Price value = Price.of(); - value.setValue(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void country() { + Price value = Price.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + Price value = Price.of(); + value.setCustomerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + } + + @Test + public void channel() { + Price value = Price.of(); + value.setChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.history.models.common.ChannelReferenceImpl()); + } + + @Test + public void validFrom() { + Price value = Price.of(); + value.setValidFrom(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidFrom()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void validUntil() { + Price value = Price.of(); + value.setValidUntil(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidUntil()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void discounted() { + Price value = Price.of(); + value.setDiscounted(new com.commercetools.history.models.common.DiscountedPriceImpl()); + Assertions.assertThat(value.getDiscounted()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedPriceImpl()); + } + + @Test + public void tiers() { + Price value = Price.of(); + value.setTiers(Collections.singletonList(new com.commercetools.history.models.common.PriceTierImpl())); + Assertions.assertThat(value.getTiers()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.PriceTierImpl())); + } + + @Test + public void custom() { + Price value = Price.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void recurrencePolicy() { + Price value = Price.of(); + value.setRecurrencePolicy(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.history.models.common.RecurrencePolicyReferenceImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTierTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTierTest.java new file mode 100644 index 00000000000..5b3279e3c80 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/PriceTierTest.java @@ -0,0 +1,37 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class PriceTierTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, PriceTierBuilder builder) { + PriceTier priceTier = builder.buildUnchecked(); + Assertions.assertThat(priceTier).isInstanceOf(PriceTier.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "minimumQuantity", PriceTier.builder().minimumQuantity(1L) }, + new Object[] { "value", + PriceTier.builder().value(new com.commercetools.history.models.common.TypedMoneyImpl()) } }; + } + + @Test + public void minimumQuantity() { + PriceTier value = PriceTier.of(); + value.setMinimumQuantity(1L); + Assertions.assertThat(value.getMinimumQuantity()).isEqualTo(1L); + } + + @Test + public void value() { + PriceTier value = PriceTier.of(); + value.setValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceTest.java new file mode 100644 index 00000000000..1bc9f8f787c --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductDiscountReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductDiscountReferenceBuilder builder) { + ProductDiscountReference productDiscountReference = builder.buildUnchecked(); + Assertions.assertThat(productDiscountReference).isInstanceOf(ProductDiscountReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ProductDiscountReference.builder().id("id") } }; + } + + @Test + public void id() { + ProductDiscountReference value = ProductDiscountReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountValueTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountValueTest.java new file mode 100644 index 00000000000..55904d6cbed --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductDiscountValueTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductDiscountValueTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductDiscountValueBuilder builder) { + ProductDiscountValue productDiscountValue = builder.buildUnchecked(); + Assertions.assertThat(productDiscountValue).isInstanceOf(ProductDiscountValue.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", ProductDiscountValue.builder().type("type") } }; + } + + @Test + public void type() { + ProductDiscountValue value = ProductDiscountValue.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductReferenceTest.java new file mode 100644 index 00000000000..50865685a07 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductReferenceBuilder builder) { + ProductReference productReference = builder.buildUnchecked(); + Assertions.assertThat(productReference).isInstanceOf(ProductReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ProductReference.builder().id("id") } }; + } + + @Test + public void id() { + ProductReference value = ProductReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceTest.java new file mode 100644 index 00000000000..74c1fc30ba7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductSelectionReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductSelectionReferenceBuilder builder) { + ProductSelectionReference productSelectionReference = builder.buildUnchecked(); + Assertions.assertThat(productSelectionReference).isInstanceOf(ProductSelectionReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ProductSelectionReference.builder().id("id") } }; + } + + @Test + public void id() { + ProductSelectionReference value = ProductSelectionReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionSettingTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionSettingTest.java index 29ff4cc0c12..89073aca3ce 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionSettingTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductSelectionSettingTest.java @@ -19,16 +19,17 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "productSelection", ProductSelectionSetting.builder() - .productSelection(new com.commercetools.history.models.common.ReferenceImpl()) }, + .productSelection( + new com.commercetools.history.models.common.ProductSelectionReferenceImpl()) }, new Object[] { "active", ProductSelectionSetting.builder().active(true) } }; } @Test public void productSelection() { ProductSelectionSetting value = ProductSelectionSetting.of(); - value.setProductSelection(new com.commercetools.history.models.common.ReferenceImpl()); + value.setProductSelection(new com.commercetools.history.models.common.ProductSelectionReferenceImpl()); Assertions.assertThat(value.getProductSelection()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.ProductSelectionReferenceImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductTypeReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductTypeReferenceTest.java new file mode 100644 index 00000000000..0db7087b365 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductTypeReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductTypeReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductTypeReferenceBuilder builder) { + ProductTypeReference productTypeReference = builder.buildUnchecked(); + Assertions.assertThat(productTypeReference).isInstanceOf(ProductTypeReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ProductTypeReference.builder().id("id") } }; + } + + @Test + public void id() { + ProductTypeReference value = ProductTypeReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityTest.java index f5551fb863d..d1d9dcf269f 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantAvailabilityTest.java @@ -16,12 +16,21 @@ public void buildUnchecked(String name, ProductVariantAvailabilityBuilder builde } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "isOnStock", ProductVariantAvailability.builder().isOnStock(true) }, - new Object[] { "restockableInDays", ProductVariantAvailability.builder().restockableInDays(4) }, - new Object[] { "availableQuantity", ProductVariantAvailability.builder().availableQuantity(3) }, - new Object[] { "channels", ProductVariantAvailability.builder() - .channels( - new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()) } }; + return new Object[][] { new Object[] { "channels", ProductVariantAvailability.builder() + .channels(new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()) }, + new Object[] { "isOnStock", ProductVariantAvailability.builder().isOnStock(true) }, + new Object[] { "restockableInDays", ProductVariantAvailability.builder().restockableInDays(4L) }, + new Object[] { "availableQuantity", ProductVariantAvailability.builder().availableQuantity(3L) }, + new Object[] { "id", ProductVariantAvailability.builder().id("id") }, + new Object[] { "version", ProductVariantAvailability.builder().version(2L) } }; + } + + @Test + public void channels() { + ProductVariantAvailability value = ProductVariantAvailability.of(); + value.setChannels(new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()); + Assertions.assertThat(value.getChannels()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()); } @Test @@ -34,22 +43,28 @@ public void isOnStock() { @Test public void restockableInDays() { ProductVariantAvailability value = ProductVariantAvailability.of(); - value.setRestockableInDays(4); - Assertions.assertThat(value.getRestockableInDays()).isEqualTo(4); + value.setRestockableInDays(4L); + Assertions.assertThat(value.getRestockableInDays()).isEqualTo(4L); } @Test public void availableQuantity() { ProductVariantAvailability value = ProductVariantAvailability.of(); - value.setAvailableQuantity(3); - Assertions.assertThat(value.getAvailableQuantity()).isEqualTo(3); + value.setAvailableQuantity(3L); + Assertions.assertThat(value.getAvailableQuantity()).isEqualTo(3L); } @Test - public void channels() { + public void id() { ProductVariantAvailability value = ProductVariantAvailability.of(); - value.setChannels(new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()); - Assertions.assertThat(value.getChannels()) - .isEqualTo(new com.commercetools.history.models.common.ProductVariantChannelAvailabilityMapImpl()); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + ProductVariantAvailability value = ProductVariantAvailability.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityTest.java index 0552c860c10..fbc62385350 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantChannelAvailabilityTest.java @@ -18,9 +18,10 @@ public void buildUnchecked(String name, ProductVariantChannelAvailabilityBuilder public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "isOnStock", ProductVariantChannelAvailability.builder().isOnStock(true) }, - new Object[] { "restockableInDays", ProductVariantChannelAvailability.builder().restockableInDays(4) }, - new Object[] { "availableQuantity", - ProductVariantChannelAvailability.builder().availableQuantity(3) } }; + new Object[] { "restockableInDays", ProductVariantChannelAvailability.builder().restockableInDays(4L) }, + new Object[] { "availableQuantity", ProductVariantChannelAvailability.builder().availableQuantity(3L) }, + new Object[] { "id", ProductVariantChannelAvailability.builder().id("id") }, + new Object[] { "version", ProductVariantChannelAvailability.builder().version(2L) } }; } @Test @@ -33,14 +34,28 @@ public void isOnStock() { @Test public void restockableInDays() { ProductVariantChannelAvailability value = ProductVariantChannelAvailability.of(); - value.setRestockableInDays(4); - Assertions.assertThat(value.getRestockableInDays()).isEqualTo(4); + value.setRestockableInDays(4L); + Assertions.assertThat(value.getRestockableInDays()).isEqualTo(4L); } @Test public void availableQuantity() { ProductVariantChannelAvailability value = ProductVariantChannelAvailability.of(); - value.setAvailableQuantity(3); - Assertions.assertThat(value.getAvailableQuantity()).isEqualTo(3); + value.setAvailableQuantity(3L); + Assertions.assertThat(value.getAvailableQuantity()).isEqualTo(3L); + } + + @Test + public void id() { + ProductVariantChannelAvailability value = ProductVariantChannelAvailability.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void version() { + ProductVariantChannelAvailability value = ProductVariantChannelAvailability.of(); + value.setVersion(2L); + Assertions.assertThat(value.getVersion()).isEqualTo(2L); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantExclusionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantExclusionTest.java new file mode 100644 index 00000000000..bc911ef8cc6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantExclusionTest.java @@ -0,0 +1,31 @@ + +package com.commercetools.history.models.common; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductVariantExclusionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductVariantExclusionBuilder builder) { + ProductVariantExclusion productVariantExclusion = builder.buildUnchecked(); + Assertions.assertThat(productVariantExclusion).isInstanceOf(ProductVariantExclusion.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "skus", ProductVariantExclusion.builder().skus(Collections.singletonList("skus")) } }; + } + + @Test + public void skus() { + ProductVariantExclusion value = ProductVariantExclusion.of(); + value.setSkus(Collections.singletonList("skus")); + Assertions.assertThat(value.getSkus()).isEqualTo(Collections.singletonList("skus")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTest.java index 56383479ea7..99ff4b29190 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantSelectionTest.java @@ -1,8 +1,6 @@ package com.commercetools.history.models.common; -import java.util.Collections; - import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -18,12 +16,9 @@ public void buildUnchecked(String name, ProductVariantSelectionBuilder builder) } public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { "type", - ProductVariantSelection.builder() - .type(com.commercetools.history.models.common.ProductVariantSelectionTypeEnum - .findEnum("inclusion")) }, - new Object[] { "skus", ProductVariantSelection.builder().skus(Collections.singletonList("skus")) } }; + return new Object[][] { new Object[] { "type", ProductVariantSelection.builder() + .type( + com.commercetools.history.models.common.ProductVariantSelectionTypeEnum.findEnum("inclusion")) } }; } @Test @@ -34,11 +29,4 @@ public void type() { .isEqualTo( com.commercetools.history.models.common.ProductVariantSelectionTypeEnum.findEnum("inclusion")); } - - @Test - public void skus() { - ProductVariantSelection value = ProductVariantSelection.of(); - value.setSkus(Collections.singletonList("skus")); - Assertions.assertThat(value.getSkus()).isEqualTo(Collections.singletonList("skus")); - } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantTest.java new file mode 100644 index 00000000000..5d1c27f0b17 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ProductVariantTest.java @@ -0,0 +1,151 @@ + +package com.commercetools.history.models.common; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ProductVariantTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ProductVariantBuilder builder) { + ProductVariant productVariant = builder.buildUnchecked(); + Assertions.assertThat(productVariant).isInstanceOf(ProductVariant.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ProductVariant.builder().id(2L) }, + new Object[] { "sku", ProductVariant.builder().sku("sku") }, + new Object[] { "key", ProductVariant.builder().key("key") }, + new Object[] { "prices", + ProductVariant.builder() + .prices(Collections + .singletonList(new com.commercetools.history.models.common.PriceImpl())) }, + new Object[] { "attributes", + ProductVariant.builder() + .attributes(Collections + .singletonList(new com.commercetools.history.models.common.AttributeImpl())) }, + new Object[] { "price", + ProductVariant.builder().price(new com.commercetools.history.models.common.PriceImpl()) }, + new Object[] { "images", + ProductVariant.builder() + .images(Collections + .singletonList(new com.commercetools.history.models.common.ImageImpl())) }, + new Object[] { "assets", + ProductVariant.builder() + .assets(Collections + .singletonList(new com.commercetools.history.models.common.AssetImpl())) }, + new Object[] { "availability", ProductVariant.builder() + .availability(new com.commercetools.history.models.common.ProductVariantAvailabilityImpl()) }, + new Object[] { "isMatchingVariant", ProductVariant.builder().isMatchingVariant(true) }, + new Object[] { "scopedPrice", + ProductVariant.builder() + .scopedPrice(new com.commercetools.history.models.common.ScopedPriceImpl()) }, + new Object[] { "scopedPriceDiscounted", ProductVariant.builder().scopedPriceDiscounted(true) }, + new Object[] { "recurrencePrices", ProductVariant.builder() + .recurrencePrices( + Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())) } }; + } + + @Test + public void id() { + ProductVariant value = ProductVariant.of(); + value.setId(2L); + Assertions.assertThat(value.getId()).isEqualTo(2L); + } + + @Test + public void sku() { + ProductVariant value = ProductVariant.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void key() { + ProductVariant value = ProductVariant.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void prices() { + ProductVariant value = ProductVariant.of(); + value.setPrices(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + Assertions.assertThat(value.getPrices()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + } + + @Test + public void attributes() { + ProductVariant value = ProductVariant.of(); + value.setAttributes(Collections.singletonList(new com.commercetools.history.models.common.AttributeImpl())); + Assertions.assertThat(value.getAttributes()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AttributeImpl())); + } + + @Test + public void price() { + ProductVariant value = ProductVariant.of(); + value.setPrice(new com.commercetools.history.models.common.PriceImpl()); + Assertions.assertThat(value.getPrice()).isEqualTo(new com.commercetools.history.models.common.PriceImpl()); + } + + @Test + public void images() { + ProductVariant value = ProductVariant.of(); + value.setImages(Collections.singletonList(new com.commercetools.history.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.ImageImpl())); + } + + @Test + public void assets() { + ProductVariant value = ProductVariant.of(); + value.setAssets(Collections.singletonList(new com.commercetools.history.models.common.AssetImpl())); + Assertions.assertThat(value.getAssets()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.AssetImpl())); + } + + @Test + public void availability() { + ProductVariant value = ProductVariant.of(); + value.setAvailability(new com.commercetools.history.models.common.ProductVariantAvailabilityImpl()); + Assertions.assertThat(value.getAvailability()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantAvailabilityImpl()); + } + + @Test + public void isMatchingVariant() { + ProductVariant value = ProductVariant.of(); + value.setIsMatchingVariant(true); + Assertions.assertThat(value.getIsMatchingVariant()).isEqualTo(true); + } + + @Test + public void scopedPrice() { + ProductVariant value = ProductVariant.of(); + value.setScopedPrice(new com.commercetools.history.models.common.ScopedPriceImpl()); + Assertions.assertThat(value.getScopedPrice()) + .isEqualTo(new com.commercetools.history.models.common.ScopedPriceImpl()); + } + + @Test + public void scopedPriceDiscounted() { + ProductVariant value = ProductVariant.of(); + value.setScopedPriceDiscounted(true); + Assertions.assertThat(value.getScopedPriceDiscounted()).isEqualTo(true); + } + + @Test + public void recurrencePrices() { + ProductVariant value = ProductVariant.of(); + value.setRecurrencePrices(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + Assertions.assertThat(value.getRecurrencePrices()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.PriceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceTest.java new file mode 100644 index 00000000000..5722602f260 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/RecurrencePolicyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class RecurrencePolicyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, RecurrencePolicyReferenceBuilder builder) { + RecurrencePolicyReference recurrencePolicyReference = builder.buildUnchecked(); + Assertions.assertThat(recurrencePolicyReference).isInstanceOf(RecurrencePolicyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", RecurrencePolicyReference.builder().id("id") } }; + } + + @Test + public void id() { + RecurrencePolicyReference value = RecurrencePolicyReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReferenceTest.java deleted file mode 100644 index 7c5d56b2922..00000000000 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReferenceTest.java +++ /dev/null @@ -1,38 +0,0 @@ - -package com.commercetools.history.models.common; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -public class ReferenceTest { - - @ParameterizedTest(name = "#{index} with {0}") - @MethodSource("objectBuilder") - public void buildUnchecked(String name, ReferenceBuilder builder) { - Reference reference = builder.buildUnchecked(); - Assertions.assertThat(reference).isInstanceOf(Reference.class); - } - - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "id", Reference.builder().id("id") }, - new Object[] { "typeId", Reference.builder() - .typeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")) } }; - } - - @Test - public void id() { - Reference value = Reference.of(); - value.setId("id"); - Assertions.assertThat(value.getId()).isEqualTo("id"); - } - - @Test - public void typeId() { - Reference value = Reference.of(); - value.setTypeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); - Assertions.assertThat(value.getTypeId()) - .isEqualTo(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); - } -} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ResourceIdentifierTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ResourceIdentifierTest.java index 27e7b181c74..7aa92da34fe 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ResourceIdentifierTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ResourceIdentifierTest.java @@ -19,7 +19,7 @@ public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", ResourceIdentifier.builder().id("id") }, new Object[] { "key", ResourceIdentifier.builder().key("key") }, new Object[] { "typeId", ResourceIdentifier.builder() - .typeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")) } }; + .typeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("approval-flow")) } }; } @Test @@ -39,8 +39,8 @@ public void key() { @Test public void typeId() { ResourceIdentifier value = ResourceIdentifier.of(); - value.setTypeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); + value.setTypeId(com.commercetools.history.models.common.ReferenceTypeId.findEnum("approval-flow")); Assertions.assertThat(value.getTypeId()) - .isEqualTo(com.commercetools.history.models.common.ReferenceTypeId.findEnum("associate-role")); + .isEqualTo(com.commercetools.history.models.common.ReferenceTypeId.findEnum("approval-flow")); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnInfoTest.java index b70bba1b572..ee00c941b27 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnInfoTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnInfoTest.java @@ -1,6 +1,7 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; import java.util.Collections; import org.assertj.core.api.Assertions; @@ -24,7 +25,8 @@ public static Object[][] objectBuilder() { .items(Collections .singletonList(new com.commercetools.history.models.common.ReturnItemImpl())) }, new Object[] { "returnTrackingId", ReturnInfo.builder().returnTrackingId("returnTrackingId") }, - new Object[] { "returnDate", ReturnInfo.builder().returnDate("returnDate") } }; + new Object[] { "returnDate", + ReturnInfo.builder().returnDate(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; } @Test @@ -45,7 +47,7 @@ public void returnTrackingId() { @Test public void returnDate() { ReturnInfo value = ReturnInfo.of(); - value.setReturnDate("returnDate"); - Assertions.assertThat(value.getReturnDate()).isEqualTo("returnDate"); + value.setReturnDate(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getReturnDate()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnItemTest.java index d15c6950842..90fee6ec468 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnItemTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReturnItemTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -17,7 +19,8 @@ public void buildUnchecked(String name, ReturnItemBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", ReturnItem.builder().id("id") }, - new Object[] { "quantity", ReturnItem.builder().quantity(8) }, + new Object[] { "key", ReturnItem.builder().key("key") }, + new Object[] { "quantity", ReturnItem.builder().quantity(8L) }, new Object[] { "type", ReturnItem.builder().type("type") }, new Object[] { "comment", ReturnItem.builder().comment("comment") }, new Object[] { "shipmentState", @@ -28,8 +31,12 @@ public static Object[][] objectBuilder() { ReturnItem.builder() .paymentState(com.commercetools.history.models.common.ReturnPaymentState .findEnum("NonRefundable")) }, - new Object[] { "lastModifiedAt", ReturnItem.builder().lastModifiedAt("lastModifiedAt") }, - new Object[] { "createdAt", ReturnItem.builder().createdAt("createdAt") } }; + new Object[] { "custom", + ReturnItem.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "lastModifiedAt", + ReturnItem.builder().lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "createdAt", + ReturnItem.builder().createdAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; } @Test @@ -39,11 +46,18 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + ReturnItem value = ReturnItem.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void quantity() { ReturnItem value = ReturnItem.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } @Test @@ -76,17 +90,25 @@ public void paymentState() { .isEqualTo(com.commercetools.history.models.common.ReturnPaymentState.findEnum("NonRefundable")); } + @Test + public void custom() { + ReturnItem value = ReturnItem.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + @Test public void lastModifiedAt() { ReturnItem value = ReturnItem.of(); - value.setLastModifiedAt("lastModifiedAt"); - Assertions.assertThat(value.getLastModifiedAt()).isEqualTo("lastModifiedAt"); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test public void createdAt() { ReturnItem value = ReturnItem.of(); - value.setCreatedAt("createdAt"); - Assertions.assertThat(value.getCreatedAt()).isEqualTo("createdAt"); + value.setCreatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getCreatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsTest.java index 5155326c773..fd2ed27349c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ReviewRatingStatisticsTest.java @@ -16,9 +16,10 @@ public void buildUnchecked(String name, ReviewRatingStatisticsBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "averageRating", ReviewRatingStatistics.builder().averageRating(6) }, - new Object[] { "highestRating", ReviewRatingStatistics.builder().highestRating(4) }, - new Object[] { "lowestRating", ReviewRatingStatistics.builder().lowestRating(8) }, + return new Object[][] { + new Object[] { "averageRating", ReviewRatingStatistics.builder().averageRating(0.99762577) }, + new Object[] { "highestRating", ReviewRatingStatistics.builder().highestRating(0.8229182) }, + new Object[] { "lowestRating", ReviewRatingStatistics.builder().lowestRating(0.9610451) }, new Object[] { "count", ReviewRatingStatistics.builder().count(2) }, new Object[] { "ratingsDistribution", ReviewRatingStatistics.builder().ratingsDistribution("ratingsDistribution") } }; @@ -27,22 +28,22 @@ public static Object[][] objectBuilder() { @Test public void averageRating() { ReviewRatingStatistics value = ReviewRatingStatistics.of(); - value.setAverageRating(6); - Assertions.assertThat(value.getAverageRating()).isEqualTo(6); + value.setAverageRating(0.99762577); + Assertions.assertThat(value.getAverageRating()).isEqualTo(0.99762577); } @Test public void highestRating() { ReviewRatingStatistics value = ReviewRatingStatistics.of(); - value.setHighestRating(4); - Assertions.assertThat(value.getHighestRating()).isEqualTo(4); + value.setHighestRating(0.8229182); + Assertions.assertThat(value.getHighestRating()).isEqualTo(0.8229182); } @Test public void lowestRating() { ReviewRatingStatistics value = ReviewRatingStatistics.of(); - value.setLowestRating(8); - Assertions.assertThat(value.getLowestRating()).isEqualTo(8); + value.setLowestRating(0.9610451); + Assertions.assertThat(value.getLowestRating()).isEqualTo(0.9610451); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ScopedPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ScopedPriceTest.java new file mode 100644 index 00000000000..d739eead93e --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ScopedPriceTest.java @@ -0,0 +1,117 @@ + +package com.commercetools.history.models.common; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ScopedPriceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ScopedPriceBuilder builder) { + ScopedPrice scopedPrice = builder.buildUnchecked(); + Assertions.assertThat(scopedPrice).isInstanceOf(ScopedPrice.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ScopedPrice.builder().id("id") }, + new Object[] { "value", + ScopedPrice.builder().value(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "currentValue", + ScopedPrice.builder() + .currentValue(new com.commercetools.history.models.common.TypedMoneyImpl()) }, + new Object[] { "country", ScopedPrice.builder().country("country") }, + new Object[] { "customerGroup", ScopedPrice.builder() + .customerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()) }, + new Object[] { "channel", + ScopedPrice.builder() + .channel(new com.commercetools.history.models.common.ChannelReferenceImpl()) }, + new Object[] { "validFrom", ScopedPrice.builder().validFrom(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "validUntil", + ScopedPrice.builder().validUntil(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "discounted", + ScopedPrice.builder() + .discounted(new com.commercetools.history.models.common.DiscountedPriceImpl()) }, + new Object[] { "custom", ScopedPrice.builder() + .custom(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void id() { + ScopedPrice value = ScopedPrice.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void value() { + ScopedPrice value = ScopedPrice.of(); + value.setValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getValue()).isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void currentValue() { + ScopedPrice value = ScopedPrice.of(); + value.setCurrentValue(new com.commercetools.history.models.common.TypedMoneyImpl()); + Assertions.assertThat(value.getCurrentValue()) + .isEqualTo(new com.commercetools.history.models.common.TypedMoneyImpl()); + } + + @Test + public void country() { + ScopedPrice value = ScopedPrice.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + ScopedPrice value = ScopedPrice.of(); + value.setCustomerGroup(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.history.models.common.CustomerGroupReferenceImpl()); + } + + @Test + public void channel() { + ScopedPrice value = ScopedPrice.of(); + value.setChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.history.models.common.ChannelReferenceImpl()); + } + + @Test + public void validFrom() { + ScopedPrice value = ScopedPrice.of(); + value.setValidFrom(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidFrom()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void validUntil() { + ScopedPrice value = ScopedPrice.of(); + value.setValidUntil(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidUntil()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void discounted() { + ScopedPrice value = ScopedPrice.of(); + value.setDiscounted(new com.commercetools.history.models.common.DiscountedPriceImpl()); + Assertions.assertThat(value.getDiscounted()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedPriceImpl()); + } + + @Test + public void custom() { + ScopedPrice value = ScopedPrice.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingInfoTest.java new file mode 100644 index 00000000000..580a797fd39 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingInfoTest.java @@ -0,0 +1,129 @@ + +package com.commercetools.history.models.common; + +import java.util.Collections; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingInfoTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingInfoBuilder builder) { + ShippingInfo shippingInfo = builder.buildUnchecked(); + Assertions.assertThat(shippingInfo).isInstanceOf(ShippingInfo.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "shippingMethodName", ShippingInfo.builder().shippingMethodName("shippingMethodName") }, + new Object[] { "price", + ShippingInfo.builder() + .price(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, + new Object[] { "shippingRate", + ShippingInfo.builder() + .shippingRate(new com.commercetools.history.models.common.ShippingRateImpl()) }, + new Object[] { "taxedPrice", + ShippingInfo.builder() + .taxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()) }, + new Object[] { "taxRate", + ShippingInfo.builder().taxRate(new com.commercetools.history.models.common.TaxRateImpl()) }, + new Object[] { "taxCategory", + ShippingInfo.builder() + .taxCategory(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()) }, + new Object[] { "shippingMethod", ShippingInfo.builder() + .shippingMethod(new com.commercetools.history.models.common.ShippingMethodReferenceImpl()) }, + new Object[] { "deliveries", + ShippingInfo.builder() + .deliveries(Collections + .singletonList(new com.commercetools.history.models.common.DeliveryImpl())) }, + new Object[] { "discountedPrice", ShippingInfo.builder() + .discountedPrice(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()) }, + new Object[] { "shippingMethodState", + ShippingInfo.builder() + .shippingMethodState(com.commercetools.history.models.common.ShippingMethodState + .findEnum("DoesNotMatchCart")) } }; + } + + @Test + public void shippingMethodName() { + ShippingInfo value = ShippingInfo.of(); + value.setShippingMethodName("shippingMethodName"); + Assertions.assertThat(value.getShippingMethodName()).isEqualTo("shippingMethodName"); + } + + @Test + public void price() { + ShippingInfo value = ShippingInfo.of(); + value.setPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getPrice()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + } + + @Test + public void shippingRate() { + ShippingInfo value = ShippingInfo.of(); + value.setShippingRate(new com.commercetools.history.models.common.ShippingRateImpl()); + Assertions.assertThat(value.getShippingRate()) + .isEqualTo(new com.commercetools.history.models.common.ShippingRateImpl()); + } + + @Test + public void taxedPrice() { + ShippingInfo value = ShippingInfo.of(); + value.setTaxedPrice(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + Assertions.assertThat(value.getTaxedPrice()) + .isEqualTo(new com.commercetools.history.models.common.TaxedItemPriceImpl()); + } + + @Test + public void taxRate() { + ShippingInfo value = ShippingInfo.of(); + value.setTaxRate(new com.commercetools.history.models.common.TaxRateImpl()); + Assertions.assertThat(value.getTaxRate()).isEqualTo(new com.commercetools.history.models.common.TaxRateImpl()); + } + + @Test + public void taxCategory() { + ShippingInfo value = ShippingInfo.of(); + value.setTaxCategory(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()); + Assertions.assertThat(value.getTaxCategory()) + .isEqualTo(new com.commercetools.history.models.common.TaxCategoryReferenceImpl()); + } + + @Test + public void shippingMethod() { + ShippingInfo value = ShippingInfo.of(); + value.setShippingMethod(new com.commercetools.history.models.common.ShippingMethodReferenceImpl()); + Assertions.assertThat(value.getShippingMethod()) + .isEqualTo(new com.commercetools.history.models.common.ShippingMethodReferenceImpl()); + } + + @Test + public void deliveries() { + ShippingInfo value = ShippingInfo.of(); + value.setDeliveries(Collections.singletonList(new com.commercetools.history.models.common.DeliveryImpl())); + Assertions.assertThat(value.getDeliveries()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.DeliveryImpl())); + } + + @Test + public void discountedPrice() { + ShippingInfo value = ShippingInfo.of(); + value.setDiscountedPrice(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + Assertions.assertThat(value.getDiscountedPrice()) + .isEqualTo(new com.commercetools.history.models.common.DiscountedLineItemPriceImpl()); + } + + @Test + public void shippingMethodState() { + ShippingInfo value = ShippingInfo.of(); + value.setShippingMethodState( + com.commercetools.history.models.common.ShippingMethodState.findEnum("DoesNotMatchCart")); + Assertions.assertThat(value.getShippingMethodState()) + .isEqualTo(com.commercetools.history.models.common.ShippingMethodState.findEnum("DoesNotMatchCart")); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceTest.java new file mode 100644 index 00000000000..4b6a47f9ced --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingMethodReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingMethodReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingMethodReferenceBuilder builder) { + ShippingMethodReference shippingMethodReference = builder.buildUnchecked(); + Assertions.assertThat(shippingMethodReference).isInstanceOf(ShippingMethodReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", ShippingMethodReference.builder().id("id") } }; + } + + @Test + public void id() { + ShippingMethodReference value = ShippingMethodReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateInputTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateInputTest.java new file mode 100644 index 00000000000..28374b063d0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateInputTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingRateInputTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingRateInputBuilder builder) { + ShippingRateInput shippingRateInput = builder.buildUnchecked(); + Assertions.assertThat(shippingRateInput).isInstanceOf(ShippingRateInput.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "type", ShippingRateInput.builder().type("type") } }; + } + + @Test + public void type() { + ShippingRateInput value = ShippingRateInput.of(); + value.setType("type"); + Assertions.assertThat(value.getType()).isEqualTo("type"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateTest.java index bf5292eeda9..c954728fb75 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingRateTest.java @@ -20,9 +20,11 @@ public void buildUnchecked(String name, ShippingRateBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "price", - ShippingRate.builder().price(new com.commercetools.history.models.common.MoneyImpl()) }, + ShippingRate.builder() + .price(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, new Object[] { "freeAbove", - ShippingRate.builder().freeAbove(new com.commercetools.history.models.common.MoneyImpl()) }, + ShippingRate.builder() + .freeAbove(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, new Object[] { "isMatching", ShippingRate.builder().isMatching(true) }, new Object[] { "tiers", ShippingRate.builder() @@ -33,15 +35,17 @@ public static Object[][] objectBuilder() { @Test public void price() { ShippingRate value = ShippingRate.of(); - value.setPrice(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getPrice()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setPrice(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getPrice()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test public void freeAbove() { ShippingRate value = ShippingRate.of(); - value.setFreeAbove(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getFreeAbove()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setFreeAbove(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getFreeAbove()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingTest.java new file mode 100644 index 00000000000..bf90a24dabb --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShippingTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShippingTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShippingBuilder builder) { + Shipping shipping = builder.buildUnchecked(); + Assertions.assertThat(shipping).isInstanceOf(Shipping.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "shippingKey", Shipping.builder().shippingKey("shippingKey") }, + new Object[] { "shippingInfo", + Shipping.builder() + .shippingInfo(new com.commercetools.history.models.common.ShippingInfoImpl()) }, + new Object[] { "shippingAddress", + Shipping.builder().shippingAddress(new com.commercetools.history.models.common.AddressImpl()) }, + new Object[] { "shippingRateInput", Shipping.builder() + .shippingRateInput(new com.commercetools.history.models.common.ShippingRateInputImpl()) }, + new Object[] { "shippingCustomFields", Shipping.builder() + .shippingCustomFields(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; + } + + @Test + public void shippingKey() { + Shipping value = Shipping.of(); + value.setShippingKey("shippingKey"); + Assertions.assertThat(value.getShippingKey()).isEqualTo("shippingKey"); + } + + @Test + public void shippingInfo() { + Shipping value = Shipping.of(); + value.setShippingInfo(new com.commercetools.history.models.common.ShippingInfoImpl()); + Assertions.assertThat(value.getShippingInfo()) + .isEqualTo(new com.commercetools.history.models.common.ShippingInfoImpl()); + } + + @Test + public void shippingAddress() { + Shipping value = Shipping.of(); + value.setShippingAddress(new com.commercetools.history.models.common.AddressImpl()); + Assertions.assertThat(value.getShippingAddress()) + .isEqualTo(new com.commercetools.history.models.common.AddressImpl()); + } + + @Test + public void shippingRateInput() { + Shipping value = Shipping.of(); + value.setShippingRateInput(new com.commercetools.history.models.common.ShippingRateInputImpl()); + Assertions.assertThat(value.getShippingRateInput()) + .isEqualTo(new com.commercetools.history.models.common.ShippingRateInputImpl()); + } + + @Test + public void shippingCustomFields() { + Shipping value = Shipping.of(); + value.setShippingCustomFields(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getShippingCustomFields()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShoppingListLineItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShoppingListLineItemTest.java new file mode 100644 index 00000000000..fab38df41d6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/ShoppingListLineItemTest.java @@ -0,0 +1,143 @@ + +package com.commercetools.history.models.common; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ShoppingListLineItemTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ShoppingListLineItemBuilder builder) { + ShoppingListLineItem shoppingListLineItem = builder.buildUnchecked(); + Assertions.assertThat(shoppingListLineItem).isInstanceOf(ShoppingListLineItem.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { "addedAt", + ShoppingListLineItem.builder().addedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "custom", + ShoppingListLineItem.builder() + .custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, + new Object[] { "deactivatedAt", + ShoppingListLineItem.builder().deactivatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "id", ShoppingListLineItem.builder().id("id") }, + new Object[] { "key", ShoppingListLineItem.builder().key("key") }, + new Object[] { "name", + ShoppingListLineItem.builder() + .name(new com.commercetools.history.models.common.LocalizedStringImpl()) }, + new Object[] { "productId", ShoppingListLineItem.builder().productId("productId") }, + new Object[] { "productType", + ShoppingListLineItem.builder() + .productType(new com.commercetools.history.models.common.ProductTypeReferenceImpl()) }, + new Object[] { "published", ShoppingListLineItem.builder().published(true) }, + new Object[] { "quantity", ShoppingListLineItem.builder().quantity(8L) }, + new Object[] { "variantId", ShoppingListLineItem.builder().variantId(5L) }, + new Object[] { "variant", + ShoppingListLineItem.builder() + .variant(new com.commercetools.history.models.common.ProductVariantImpl()) }, + new Object[] { "productSlug", ShoppingListLineItem.builder() + .productSlug(new com.commercetools.history.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void addedAt() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setAddedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getAddedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void custom() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } + + @Test + public void deactivatedAt() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setDeactivatedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getDeactivatedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void id() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void key() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setName(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } + + @Test + public void productId() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setProductId("productId"); + Assertions.assertThat(value.getProductId()).isEqualTo("productId"); + } + + @Test + public void productType() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setProductType(new com.commercetools.history.models.common.ProductTypeReferenceImpl()); + Assertions.assertThat(value.getProductType()) + .isEqualTo(new com.commercetools.history.models.common.ProductTypeReferenceImpl()); + } + + @Test + public void published() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setPublished(true); + Assertions.assertThat(value.getPublished()).isEqualTo(true); + } + + @Test + public void quantity() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); + } + + @Test + public void variantId() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void variant() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setVariant(new com.commercetools.history.models.common.ProductVariantImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.history.models.common.ProductVariantImpl()); + } + + @Test + public void productSlug() { + ShoppingListLineItem value = ShoppingListLineItem.of(); + value.setProductSlug(new com.commercetools.history.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getProductSlug()) + .isEqualTo(new com.commercetools.history.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StateReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StateReferenceTest.java new file mode 100644 index 00000000000..14b539de261 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StateReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class StateReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, StateReferenceBuilder builder) { + StateReference stateReference = builder.buildUnchecked(); + Assertions.assertThat(stateReference).isInstanceOf(StateReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", StateReference.builder().id("id") } }; + } + + @Test + public void id() { + StateReference value = StateReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StoreKeyReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StoreKeyReferenceTest.java new file mode 100644 index 00000000000..14de03689ba --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/StoreKeyReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class StoreKeyReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, StoreKeyReferenceBuilder builder) { + StoreKeyReference storeKeyReference = builder.buildUnchecked(); + Assertions.assertThat(storeKeyReference).isInstanceOf(StoreKeyReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "key", StoreKeyReference.builder().key("key") } }; + } + + @Test + public void key() { + StoreKeyReference value = StoreKeyReference.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SubRateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SubRateTest.java index 48042857669..0d2a778171c 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SubRateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SubRateTest.java @@ -17,7 +17,7 @@ public void buildUnchecked(String name, SubRateBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "name", SubRate.builder().name("name") }, - new Object[] { "amount", SubRate.builder().amount(3) } }; + new Object[] { "amount", SubRate.builder().amount(0.43789625) } }; } @Test @@ -30,7 +30,7 @@ public void name() { @Test public void amount() { SubRate value = SubRate.of(); - value.setAmount(3); - Assertions.assertThat(value.getAmount()).isEqualTo(3); + value.setAmount(0.43789625); + Assertions.assertThat(value.getAmount()).isEqualTo(0.43789625); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SyncInfoTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SyncInfoTest.java index cbece0cf20e..b19dac81965 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SyncInfoTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/SyncInfoTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -18,17 +20,18 @@ public void buildUnchecked(String name, SyncInfoBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "channel", - SyncInfo.builder().channel(new com.commercetools.history.models.common.ReferenceImpl()) }, + SyncInfo.builder() + .channel(new com.commercetools.history.models.common.ChannelReferenceImpl()) }, new Object[] { "externalId", SyncInfo.builder().externalId("externalId") }, - new Object[] { "syncedAt", SyncInfo.builder().syncedAt("syncedAt") } }; + new Object[] { "syncedAt", SyncInfo.builder().syncedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; } @Test public void channel() { SyncInfo value = SyncInfo.of(); - value.setChannel(new com.commercetools.history.models.common.ReferenceImpl()); + value.setChannel(new com.commercetools.history.models.common.ChannelReferenceImpl()); Assertions.assertThat(value.getChannel()) - .isEqualTo(new com.commercetools.history.models.common.ReferenceImpl()); + .isEqualTo(new com.commercetools.history.models.common.ChannelReferenceImpl()); } @Test @@ -41,7 +44,7 @@ public void externalId() { @Test public void syncedAt() { SyncInfo value = SyncInfo.of(); - value.setSyncedAt("syncedAt"); - Assertions.assertThat(value.getSyncedAt()).isEqualTo("syncedAt"); + value.setSyncedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getSyncedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceTest.java new file mode 100644 index 00000000000..3f94c2f03c6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxCategoryReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TaxCategoryReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TaxCategoryReferenceBuilder builder) { + TaxCategoryReference taxCategoryReference = builder.buildUnchecked(); + Assertions.assertThat(taxCategoryReference).isInstanceOf(TaxCategoryReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", TaxCategoryReference.builder().id("id") } }; + } + + @Test + public void id() { + TaxCategoryReference value = TaxCategoryReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxPortionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxPortionTest.java new file mode 100644 index 00000000000..b881fd441e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxPortionTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TaxPortionTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TaxPortionBuilder builder) { + TaxPortion taxPortion = builder.buildUnchecked(); + Assertions.assertThat(taxPortion).isInstanceOf(TaxPortion.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "name", TaxPortion.builder().name("name") }, + new Object[] { "rate", TaxPortion.builder().rate(0.45292872) }, + new Object[] { "amount", TaxPortion.builder() + .amount(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) } }; + } + + @Test + public void name() { + TaxPortion value = TaxPortion.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void rate() { + TaxPortion value = TaxPortion.of(); + value.setRate(0.45292872); + Assertions.assertThat(value.getRate()).isEqualTo(0.45292872); + } + + @Test + public void amount() { + TaxPortion value = TaxPortion.of(); + value.setAmount(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getAmount()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxRateTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxRateTest.java index e27ebb5ff56..90daa7ce6d2 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxRateTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxRateTest.java @@ -19,8 +19,9 @@ public void buildUnchecked(String name, TaxRateBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", TaxRate.builder().id("id") }, + new Object[] { "key", TaxRate.builder().key("key") }, new Object[] { "name", TaxRate.builder().name("name") }, - new Object[] { "amount", TaxRate.builder().amount(3) }, + new Object[] { "amount", TaxRate.builder().amount(0.43789625) }, new Object[] { "includedInPrice", TaxRate.builder().includedInPrice(true) }, new Object[] { "country", TaxRate.builder().country("country") }, new Object[] { "state", TaxRate.builder().state("state") }, @@ -36,6 +37,13 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + TaxRate value = TaxRate.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void name() { TaxRate value = TaxRate.of(); @@ -46,8 +54,8 @@ public void name() { @Test public void amount() { TaxRate value = TaxRate.of(); - value.setAmount(3); - Assertions.assertThat(value.getAmount()).isEqualTo(3); + value.setAmount(0.43789625); + Assertions.assertThat(value.getAmount()).isEqualTo(0.43789625); } @Test diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedItemPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedItemPriceTest.java index 6a0e0ff2002..f31bd1a3b13 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedItemPriceTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedItemPriceTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -18,22 +20,48 @@ public void buildUnchecked(String name, TaxedItemPriceBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "totalNet", - TaxedItemPrice.builder().totalNet(new com.commercetools.history.models.common.MoneyImpl()) }, - new Object[] { "totalGross", TaxedItemPrice.builder() - .totalGross(new com.commercetools.history.models.common.MoneyImpl()) } }; + TaxedItemPrice.builder() + .totalNet(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, + new Object[] { "totalGross", + TaxedItemPrice.builder() + .totalGross(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, + new Object[] { "taxPortions", + TaxedItemPrice.builder() + .taxPortions(Collections + .singletonList(new com.commercetools.history.models.common.TaxPortionImpl())) }, + new Object[] { "totalTax", TaxedItemPrice.builder() + .totalTax(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) } }; } @Test public void totalNet() { TaxedItemPrice value = TaxedItemPrice.of(); - value.setTotalNet(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getTotalNet()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setTotalNet(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalNet()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test public void totalGross() { TaxedItemPrice value = TaxedItemPrice.of(); - value.setTotalGross(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getTotalGross()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setTotalGross(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalGross()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + } + + @Test + public void taxPortions() { + TaxedItemPrice value = TaxedItemPrice.of(); + value.setTaxPortions(Collections.singletonList(new com.commercetools.history.models.common.TaxPortionImpl())); + Assertions.assertThat(value.getTaxPortions()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.TaxPortionImpl())); + } + + @Test + public void totalTax() { + TaxedItemPrice value = TaxedItemPrice.of(); + value.setTotalTax(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalTax()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedPriceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedPriceTest.java index 46563a00f84..544837a3b03 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedPriceTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TaxedPriceTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.util.Collections; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -18,22 +20,48 @@ public void buildUnchecked(String name, TaxedPriceBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "totalNet", - TaxedPrice.builder().totalNet(new com.commercetools.history.models.common.MoneyImpl()) }, + TaxedPrice.builder() + .totalNet(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, new Object[] { "totalGross", - TaxedPrice.builder().totalGross(new com.commercetools.history.models.common.MoneyImpl()) } }; + TaxedPrice.builder() + .totalGross(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, + new Object[] { "taxPortions", + TaxedPrice.builder() + .taxPortions(Collections + .singletonList(new com.commercetools.history.models.common.TaxPortionImpl())) }, + new Object[] { "totalTax", TaxedPrice.builder() + .totalTax(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) } }; } @Test public void totalNet() { TaxedPrice value = TaxedPrice.of(); - value.setTotalNet(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getTotalNet()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setTotalNet(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalNet()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test public void totalGross() { TaxedPrice value = TaxedPrice.of(); - value.setTotalGross(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getTotalGross()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setTotalGross(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalGross()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + } + + @Test + public void taxPortions() { + TaxedPrice value = TaxedPrice.of(); + value.setTaxPortions(Collections.singletonList(new com.commercetools.history.models.common.TaxPortionImpl())); + Assertions.assertThat(value.getTaxPortions()) + .isEqualTo(Collections.singletonList(new com.commercetools.history.models.common.TaxPortionImpl())); + } + + @Test + public void totalTax() { + TaxedPrice value = TaxedPrice.of(); + value.setTotalTax(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getTotalTax()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TextLineItemTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TextLineItemTest.java index 373c2aa4699..b97428eabe2 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TextLineItemTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TextLineItemTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -16,24 +18,26 @@ public void buildUnchecked(String name, TextLineItemBuilder builder) { } public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { "addedAt", TextLineItem.builder().addedAt("addedAt") }, + return new Object[][] { + new Object[] { "addedAt", TextLineItem.builder().addedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, new Object[] { "custom", TextLineItem.builder().custom(new com.commercetools.history.models.common.CustomFieldsImpl()) }, new Object[] { "description", TextLineItem.builder() .description(new com.commercetools.history.models.common.LocalizedStringImpl()) }, new Object[] { "id", TextLineItem.builder().id("id") }, + new Object[] { "key", TextLineItem.builder().key("key") }, new Object[] { "name", TextLineItem.builder() .name(new com.commercetools.history.models.common.LocalizedStringImpl()) }, - new Object[] { "quantity", TextLineItem.builder().quantity(8) } }; + new Object[] { "quantity", TextLineItem.builder().quantity(8L) } }; } @Test public void addedAt() { TextLineItem value = TextLineItem.of(); - value.setAddedAt("addedAt"); - Assertions.assertThat(value.getAddedAt()).isEqualTo("addedAt"); + value.setAddedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getAddedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test @@ -59,6 +63,13 @@ public void id() { Assertions.assertThat(value.getId()).isEqualTo("id"); } + @Test + public void key() { + TextLineItem value = TextLineItem.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + @Test public void name() { TextLineItem value = TextLineItem.of(); @@ -70,7 +81,7 @@ public void name() { @Test public void quantity() { TextLineItem value = TextLineItem.of(); - value.setQuantity(8); - Assertions.assertThat(value.getQuantity()).isEqualTo(8); + value.setQuantity(8L); + Assertions.assertThat(value.getQuantity()).isEqualTo(8L); } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TransactionTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TransactionTest.java index 5a2e3f4e080..9dd6d29e83d 100644 --- a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TransactionTest.java +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TransactionTest.java @@ -1,6 +1,8 @@ package com.commercetools.history.models.common; +import java.time.ZonedDateTime; + import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -17,16 +19,20 @@ public void buildUnchecked(String name, TransactionBuilder builder) { public static Object[][] objectBuilder() { return new Object[][] { new Object[] { "id", Transaction.builder().id("id") }, - new Object[] { "timestamp", Transaction.builder().timestamp("timestamp") }, + new Object[] { "timestamp", Transaction.builder().timestamp(ZonedDateTime.parse("2023-06-01T12:00Z")) }, new Object[] { "type", Transaction.builder() .type(com.commercetools.history.models.common.TransactionType .findEnum("Authorization")) }, new Object[] { "amount", - Transaction.builder().amount(new com.commercetools.history.models.common.MoneyImpl()) }, + Transaction.builder() + .amount(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()) }, new Object[] { "interactionId", Transaction.builder().interactionId("interactionId") }, - new Object[] { "state", Transaction.builder() - .state(com.commercetools.history.models.common.TransactionState.findEnum("Initial")) } }; + new Object[] { "state", + Transaction.builder() + .state(com.commercetools.history.models.common.TransactionState.findEnum("Initial")) }, + new Object[] { "custom", Transaction.builder() + .custom(new com.commercetools.history.models.common.CustomFieldsImpl()) } }; } @Test @@ -39,8 +45,8 @@ public void id() { @Test public void timestamp() { Transaction value = Transaction.of(); - value.setTimestamp("timestamp"); - Assertions.assertThat(value.getTimestamp()).isEqualTo("timestamp"); + value.setTimestamp(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getTimestamp()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); } @Test @@ -54,8 +60,9 @@ public void type() { @Test public void amount() { Transaction value = Transaction.of(); - value.setAmount(new com.commercetools.history.models.common.MoneyImpl()); - Assertions.assertThat(value.getAmount()).isEqualTo(new com.commercetools.history.models.common.MoneyImpl()); + value.setAmount(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); + Assertions.assertThat(value.getAmount()) + .isEqualTo(new com.commercetools.history.models.common.CentPrecisionMoneyImpl()); } @Test @@ -72,4 +79,12 @@ public void state() { Assertions.assertThat(value.getState()) .isEqualTo(com.commercetools.history.models.common.TransactionState.findEnum("Initial")); } + + @Test + public void custom() { + Transaction value = Transaction.of(); + value.setCustom(new com.commercetools.history.models.common.CustomFieldsImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.history.models.common.CustomFieldsImpl()); + } } diff --git a/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TypeReferenceTest.java b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TypeReferenceTest.java new file mode 100644 index 00000000000..2a97a04933b --- /dev/null +++ b/commercetools/commercetools-sdk-java-history/src/test/java-generated/com/commercetools/history/models/common/TypeReferenceTest.java @@ -0,0 +1,28 @@ + +package com.commercetools.history.models.common; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class TypeReferenceTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, TypeReferenceBuilder builder) { + TypeReference typeReference = builder.buildUnchecked(); + Assertions.assertThat(typeReference).isInstanceOf(TypeReference.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "id", TypeReference.builder().id("id") } }; + } + + @Test + public void id() { + TypeReference value = TypeReference.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPost.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPost.java index 1327e15d6d5..5d4b6bc4bd9 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPost.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPost.java @@ -16,7 +16,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

                                                                                                                                                                                              Creates an Import Request for Prices.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Creates an Import Request for Embedded Prices.

                                                                                                                                                                                              * *
                                                                                                                                                                                              *
                                                                                                                                                                                              diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPostString.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPostString.java index 35c622fdb71..da5b80b50e9 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPostString.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyPricesImportContainersByImportContainerKeyPostString.java @@ -17,7 +17,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - *

                                                                                                                                                                                              Creates an Import Request for Prices.

                                                                                                                                                                                              + *

                                                                                                                                                                                              Creates an Import Request for Embedded Prices.

                                                                                                                                                                                              * *
                                                                                                                                                                                              *
                                                                                                                                                                                              diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java index e6c0b45e484..752801e198d 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java @@ -23,16 +23,28 @@ public ByProjectKeyImportOperationsRequestBuilder importOperations() { return new ByProjectKeyImportOperationsRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyBusinessUnitsRequestBuilder businessUnits() { + return new ByProjectKeyBusinessUnitsRequestBuilder(apiHttpClient, projectKey); + } + public ByProjectKeyCategoriesRequestBuilder categories() { return new ByProjectKeyCategoriesRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyCustomersRequestBuilder customers() { + return new ByProjectKeyCustomersRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyDiscountCodesRequestBuilder discountCodes() { + return new ByProjectKeyDiscountCodesRequestBuilder(apiHttpClient, projectKey); + } + public ByProjectKeyPricesRequestBuilder prices() { return new ByProjectKeyPricesRequestBuilder(apiHttpClient, projectKey); } - public ByProjectKeyStandalonePricesRequestBuilder standalonePrices() { - return new ByProjectKeyStandalonePricesRequestBuilder(apiHttpClient, projectKey); + public ByProjectKeyInventoriesRequestBuilder inventories() { + return new ByProjectKeyInventoriesRequestBuilder(apiHttpClient, projectKey); } public ByProjectKeyProductsRequestBuilder products() { @@ -55,6 +67,10 @@ public ByProjectKeyProductVariantPatchesRequestBuilder productVariantPatches() { return new ByProjectKeyProductVariantPatchesRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyProductSelectionsRequestBuilder productSelections() { + return new ByProjectKeyProductSelectionsRequestBuilder(apiHttpClient, projectKey); + } + public ByProjectKeyOrdersRequestBuilder orders() { return new ByProjectKeyOrdersRequestBuilder(apiHttpClient, projectKey); } @@ -63,28 +79,12 @@ public ByProjectKeyOrderPatchesRequestBuilder orderPatches() { return new ByProjectKeyOrderPatchesRequestBuilder(apiHttpClient, projectKey); } - public ByProjectKeyCustomersRequestBuilder customers() { - return new ByProjectKeyCustomersRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeyInventoriesRequestBuilder inventories() { - return new ByProjectKeyInventoriesRequestBuilder(apiHttpClient, projectKey); + public ByProjectKeyStandalonePricesRequestBuilder standalonePrices() { + return new ByProjectKeyStandalonePricesRequestBuilder(apiHttpClient, projectKey); } public ByProjectKeyTypesRequestBuilder types() { return new ByProjectKeyTypesRequestBuilder(apiHttpClient, projectKey); } - public ByProjectKeyDiscountCodesRequestBuilder discountCodes() { - return new ByProjectKeyDiscountCodesRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeyProductSelectionsRequestBuilder productSelections() { - return new ByProjectKeyProductSelectionsRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeyBusinessUnitsRequestBuilder businessUnits() { - return new ByProjectKeyBusinessUnitsRequestBuilder(apiHttpClient, projectKey); - } - } diff --git a/references.txt b/references.txt index 6ba86c651bd..9ccaf308724 100644 --- a/references.txt +++ b/references.txt @@ -476,3 +476,25 @@ ea7ba668e4084d845f2f3871c239999f43613b28 503a69044e9969bc058a116a7f7ecd4556c85258 e5d97cd9fa03ef3c4fe45f051ad8a4a80e690656 07aa50f3b215723c6a2719cdcf78d70a45c219e2 +85ec5b54fce964cd50dc254ed39d0ab1137076bc +65b14540239650479b1799503b3c9e3180d93186 +2e90c8c066eb618de26c10124e1d007cdfc842a4 +3999f168839d6e67496250d2c2c83edd7f7f5a59 +524cda1d7939151daccfc43d29db2af42b52c592 +2d80e476e7b846987e3c2db6fdba76c470f1c173 +2ca7fba4e989ff96a2a3008d3168ea243c9cc3a8 +62910ed7ec4d1110dd8e5c98acc931a7df092a2e +021ca761240e06e31ec45855e8660b712be31817 +8f3d4c3294e504aef6102f2ce130bacf1a477916 +fea3fbfdc8dedcaeb467c0c66bd4968c1d79156c +0eb82a344545c68d83a79ce78e4d353ba3a94a6f +18c787052fbe07c50524d8249ada01228db2a8c9 +681c61f208c763fb7e0171b337956ebd3773aba1 +7fe613ca616e3dc91ba35bb3a8109ff1a4ec534a +f3c35b1b92ccc332f0b95003f0f22ea8f0e5f8e0 +bfb534af33764ac81a3784290b35530d926fccf1 +37f4edec0935ea3be543d48720fb67438c2ab341 +47d240c55478dd0c0e1aa47288c432f785240168 +68fb22e84fc95421ac888349924233d728ef2838 +78d1ed9c74ad1fd8f47f014bc4fe96ce2720d509 +603e489748f9c32c1891d60d6f767892a8ea5207