From e3df647d17312befaee2497cf27a4364b3f26ed0 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 07:32:12 +0000 Subject: [PATCH 1/8] build(codegen): updating SDK --- .../com/commercetools/api/models/cart/CartState.java | 4 ++-- .../com/commercetools/api/models/cart/InventoryMode.java | 4 ++-- .../com/commercetools/api/models/cart/LineItemMode.java | 2 +- .../api/models/error/GraphQLMissingRoleOnChannelError.java | 2 +- .../models/error/GraphQLMissingRoleOnChannelErrorImpl.java | 2 +- .../api/models/error/MissingRoleOnChannelError.java | 2 +- .../api/models/error/MissingRoleOnChannelErrorImpl.java | 2 +- .../commercetools/api/models/project/OrderSearchStatus.java | 2 +- reference.txt | 1 + references.txt | 1 + 10 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 reference.txt diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartState.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartState.java index 95e7fee6e52..3ae65a1b43a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartState.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartState.java @@ -22,12 +22,12 @@ public interface CartState extends JsonEnum { */ CartState ACTIVE = CartStateEnum.ACTIVE; /** -
An anonymous Cart was merged into a Customer's Cart on sign-in, and no further operations are allowed on the Cart.
+An anonymous Cart was merged into a Customer's Cart on sign-in, and no further operations are allowed on the Cart.
*/ CartState MERGED = CartStateEnum.MERGED; /** -A Cart was ordered, and no further operations are allowed on the Cart.
+A Cart was ordered, and no further operations are allowed on the Cart.
*/ CartState ORDERED = CartStateEnum.ORDERED; diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/InventoryMode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/InventoryMode.java index 96963b6096f..2e98f238059 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/InventoryMode.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/InventoryMode.java @@ -24,13 +24,13 @@ public interface InventoryMode extends JsonEnum { InventoryMode NONE = InventoryModeEnum.NONE; /**Orders are tracked on the Inventory, and ordering a LineItem deducts the available quantity on the respective InventoryEntry.
-An Order can be created even if the Line Item quantity is zero or negative, but if no matching Inventory Entry exists for the Line Item, an OutOfStock error is returned.
+An Order can be created even if the Line Item quantity is zero or negative, but if no matching Inventory Entry exists for the Line Item, an OutOfStock error is returned.
*/ InventoryMode TRACK_ONLY = InventoryModeEnum.TRACK_ONLY; /**Line Items in a Cart are only reserved for the duration of the ordering transaction.
- If a Line Item is not available when creating an Order, an OutOfStock error is returned.
+ If a Line Item is not available when creating an Order, an OutOfStock error is returned.
This is because the InventoryEntry availableQuantity
is insufficient (but is still updated) for the ordered Line Item quantity.
However, an Order can be created if the InventoryEntry restockableInDays
is set (including 0
).
The Line Item is added during Cart creation or using the Add LineItem update action. +
The Line Item is added during Cart creation or using the Add LineItem update action. The Line Item quantity can be changed without restriction.
*/ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLMissingRoleOnChannelError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLMissingRoleOnChannelError.java index 6f1f46a333e..464d27f444e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLMissingRoleOnChannelError.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLMissingRoleOnChannelError.java @@ -25,7 +25,7 @@ *The error is returned as a failed response to:
*The error is returned as a failed response to:
*The error is returned as a failed response to:
*The error is returned as a failed response to:
*indicates that the Search Orders endpoint is fully operational.
+indicates that the Search Orders endpoint is fully operational.
*/ OrderSearchStatus ACTIVATED = OrderSearchStatusEnum.ACTIVATED; diff --git a/reference.txt b/reference.txt new file mode 100644 index 00000000000..1ebfdeb08f3 --- /dev/null +++ b/reference.txt @@ -0,0 +1 @@ +55d9271f5bdd3dd7ea1967878e72d27de0e70d70 diff --git a/references.txt b/references.txt index 01457936474..1c57c4cb3d3 100644 --- a/references.txt +++ b/references.txt @@ -173,3 +173,4 @@ d216fff1d56706c8f7cb20b8c9d10b917b8f7781 580c5cde461a20eb43322d6bb592ac2de30eb61f abf2e5abe5909b6f2f44aa192852d2a12c5aa519 d54ef63fe5ba7eac24c714f805b0a0dbe4315fb7 +281ab8a36f5fd144e39212855c2991eaeb29407a From fb3891d7f4051faf5536b09bfaaeeee1a4900929 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 09:30:49 +0000 Subject: [PATCH 2/8] build(codegen): updating SDK --- .../main/resources/graphql/schema.graphqls | 109 +++++++++--------- references.txt | 1 + 2 files changed, 54 insertions(+), 56 deletions(-) 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 399b18cbfec..6280023d8a4 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -726,10 +726,10 @@ type ApprovalFlowRejection { } input ApprovalFlowUpdateAction { - approve: ApproveApprovalFlow reject: RejectApprovalFlow setCustomField: SetApprovalFlowCustomField setCustomType: SetApprovalFlowCustomType + approve: ApproveApprovalFlow } type ApprovalRule implements Versioned { @@ -821,13 +821,13 @@ type ApprovalRuleStatusSet implements MessagePayload { } input ApprovalRuleUpdateAction { - setApprovers: SetApprovalRuleApprovers setKey: SetApprovalRuleKey setName: SetApprovalRuleName setDescription: SetApprovalRuleDescription setPredicate: SetApprovalRulePredicate setRequesters: SetApprovalRuleRequesters setStatus: SetApprovalRuleStatus + setApprovers: SetApprovalRuleApprovers } input ApproveApprovalFlow { @@ -1213,7 +1213,7 @@ input AttributeTypeDraft { ltext: SimpleAttributeTypeDraft } -"AuthenticationMode values. BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +"AuthenticationMode values." enum AuthenticationMode { ExternalAuth Password @@ -1251,17 +1251,6 @@ input AzureServiceBusDestinationInput { connectionString: String! } -input CartDiscountValueBaseMoneyInput { - centPrecision: MoneyInput - highPrecision: HighPrecisionMoneyInput - - "CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)." - currencyCode: Currency - - "CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)." - centAmount: Long -} - interface BaseMoney { type: String! currencyCode: Currency! @@ -1825,6 +1814,17 @@ interface CartDiscountValue { type: String! } +input CartDiscountValueBaseMoneyInput { + centPrecision: MoneyInput + highPrecision: HighPrecisionMoneyInput + + "CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)." + currencyCode: Currency + + "CurrencyCode and centAmount are deprecated. Please use `Money`(centPrecision) or `HighPrecisionMoney`(highPrecision)." + centAmount: Long +} + input CartDiscountValueInput { relative: RelativeDiscountValueInput absolute: AbsoluteDiscountValueInput @@ -1874,14 +1874,14 @@ type CartLimitsProjection { } enum CartOrigin { - "The cart was created by our platform and belongs to a Quote." - Quote + "The cart was created by the customer. This is the default value" + Customer "The cart was created by the merchant on behalf of the customer" Merchant - "The cart was created by the customer. This is the default value" - Customer + "The cart was created by our platform and belongs to a Quote." + Quote } "Fields to access carts. Includes direct access to a single cart and searching for carts." @@ -3665,8 +3665,6 @@ input CustomerSignUpDraft { customerGroup: ResourceIdentifierInput isEmailVerified: Boolean anonymousId: String - - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" authenticationMode: AuthenticationMode } @@ -3957,6 +3955,13 @@ input DiscountCodeUpdateAction { setValidUntil: SetDiscountCodeValidUntil } +type DiscountOnTotalPrice { + discountedAmount: BaseMoney! + includedDiscounts: [DiscountedTotalPricePortion!]! + discountedNetAmount: BaseMoney + discountedGrossAmount: BaseMoney +} + type DiscountedLineItemPortion { discount: CartDiscount discountRef: Reference! @@ -4273,8 +4278,8 @@ input FieldTypeSetTypeDraft { } type FixedPriceDiscountValue implements CartDiscountValue { - money: [BaseMoney!]! type: String! + money: [BaseMoney!]! } input FixedPriceDiscountValueInput { @@ -5395,9 +5400,15 @@ type Mutation { createDiscountCode(draft: DiscountCodeDraft!): DiscountCode updateDiscountCode(id: String!, version: Long!, actions: [DiscountCodeUpdateAction!]!): DiscountCode deleteDiscountCode(id: String!, version: Long!): DiscountCode - createCartDiscount(draft: CartDiscountDraft!): CartDiscount + createCartDiscount(draft: CartDiscountDraft!, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): CartDiscount updateCartDiscount(version: Long!, actions: [CartDiscountUpdateAction!]!, + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + "Queries with specified ID" id: String, @@ -5405,6 +5416,9 @@ type Mutation { key: String): CartDiscount deleteCartDiscount(version: Long!, + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + "Queries with specified ID" id: String, @@ -6439,17 +6453,6 @@ type OrderCustomFieldRemoved implements MessagePayload & OrderMessagePayload { type: String! } -type OrderCustomTypeRemoved implements MessagePayload & OrderMessagePayload { - previousTypeId: String - type: String! -} - -type OrderCustomTypeSet implements MessagePayload & OrderMessagePayload { - customFields: CustomFieldsType! - previousTypeId: String - type: String! -} - type OrderCustomLineItemAdded implements MessagePayload & OrderMessagePayload { customLineItem: CustomLineItem! type: String! @@ -6478,6 +6481,17 @@ type OrderCustomLineItemRemoved implements MessagePayload & OrderMessagePayload type: String! } +type OrderCustomTypeRemoved implements MessagePayload & OrderMessagePayload { + previousTypeId: String + type: String! +} + +type OrderCustomTypeSet implements MessagePayload & OrderMessagePayload { + customFields: CustomFieldsType! + previousTypeId: String + type: String! +} + type OrderCustomerEmailSet implements MessagePayload & OrderMessagePayload { email: String oldEmail: String @@ -7218,8 +7232,6 @@ type ProductAssignment { productSelectionRef: Reference! productSelection: ProductSelection variantSelection: ProductVariantSelection - - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" variantExclusion: ProductVariantExclusion } @@ -7487,8 +7499,6 @@ type ProductOfSelection { productRef: Reference! product: Product variantSelection: ProductVariantSelection - - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" variantExclusion: ProductVariantExclusion } @@ -7904,7 +7914,7 @@ enum ProductSelectionMode { "Mode of Product Selection used to include a specific list of individual Products" Individual - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta. Mode of Product Selection used to exclude a specific list of individual Products" + "Mode of Product Selection used to exclude a specific list of individual Products" IndividualExclusion } @@ -7915,7 +7925,6 @@ type ProductSelectionProductAdded implements MessagePayload { type: String! } -"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" type ProductSelectionProductExcluded implements MessagePayload { variantExclusion: ProductVariantExclusion product: Product @@ -7961,20 +7970,15 @@ input ProductSelectionSettingInActionInput { input ProductSelectionUpdateAction { addProduct: AddProductSelectionProduct changeName: ChangeProductSelectionName - - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" excludeProduct: ExcludeProductSelectionProduct removeProduct: RemoveProductSelectionProduct setCustomField: SetProductSelectionCustomField setCustomType: SetProductSelectionCustomType setKey: SetProductSelectionKey - - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" setVariantExclusion: SetProductSelectionVariantExclusion setVariantSelection: SetProductSelectionVariantSelection } -"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" type ProductSelectionVariantExclusionChanged implements MessagePayload { oldVariantExclusion: ProductVariantExclusion newVariantExclusion: ProductVariantExclusion @@ -8227,12 +8231,10 @@ type ProductVariantDeleted implements MessagePayload { type: String! } -"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" type ProductVariantExclusion { skus: [String!]! } -"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" input ProductVariantExclusionDraft { skus: [String!] } @@ -8280,6 +8282,7 @@ type ProjectCustomLimitsProjection { products: ProductLimitsProjection! shoppingLists: ShoppingListLimitsProjection! extensions: ExtensionLimitsProjection! + subscriptions: SubscriptionsLimitsProjection! productDiscounts: ProductDiscountLimitsProjection! cartDiscounts: CartDiscountLimitsProjection! orderEdits: OrderEditLimitsProjection! @@ -9662,7 +9665,6 @@ type ScoreShippingRateInputDraftOutput implements ShippingRateInputDraftOutput { } input SearchFacetInput { - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" model: SearchFacetModelInput string: String } @@ -9673,7 +9675,6 @@ input SearchFacetModelInput { } input SearchFilterInput { - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" model: SearchFilterModelInput string: String } @@ -9752,7 +9753,6 @@ type SelectionOfProduct { productSelectionRef: Reference! productSelection: ProductSelection variantSelection: ProductVariantSelection - "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" variantExclusion: ProductVariantExclusion createdAt: DateTime! } @@ -13231,6 +13231,10 @@ input SubscriptionUpdateAction { setMessages: SetSubscriptionMessages } +type SubscriptionsLimitsProjection { + maxSubscriptions: Limit! +} + type SuggestResult { searchKeywords: [SuggestResultEntry!]! } @@ -13528,13 +13532,6 @@ type TimeType implements FieldType { name: String! } -type DiscountOnTotalPrice { - discountedAmount: BaseMoney! - includedDiscounts: [DiscountedTotalPricePortion!]! - discountedNetAmount: BaseMoney - discountedGrossAmount: BaseMoney -} - type TrackingData { trackingId: String carrier: String diff --git a/references.txt b/references.txt index 1c57c4cb3d3..7ad553044f4 100644 --- a/references.txt +++ b/references.txt @@ -174,3 +174,4 @@ d216fff1d56706c8f7cb20b8c9d10b917b8f7781 abf2e5abe5909b6f2f44aa192852d2a12c5aa519 d54ef63fe5ba7eac24c714f805b0a0dbe4315fb7 281ab8a36f5fd144e39212855c2991eaeb29407a +5804c065e8051fa2b49be3dc0e9393bc280a7bdc From 244c712c4c4ffa188cb2265d95da6566cb466e83 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 12 Jan 2024 13:11:52 +0000 Subject: [PATCH 3/8] build(codegen): updating SDK --- changes.md | 91 +--- .../main/resources/graphql/schema.graphqls | 27 + .../ByProjectKeyCartDiscountsByIDDelete.java | 2 +- ...ProjectKeyCartDiscountsKeyByKeyDelete.java | 2 +- .../client/ByProjectKeyCartDiscountsPost.java | 2 +- .../ByProjectKeyCartDiscountsPostString.java | 2 +- ...eKeyByStoreKeyCartDiscountsByIDDelete.java | 1 + ...ByStoreKeyCartDiscountsKeyByKeyDelete.java | 1 + ...InStoreKeyByStoreKeyCartDiscountsPost.java | 1 + ...eKeyByStoreKeyCartDiscountsPostString.java | 1 + .../CartDiscountAddStoreAction.java | 1 + .../CartDiscountAddStoreActionImpl.java | 1 + .../CartDiscountRemoveStoreAction.java | 1 + .../CartDiscountRemoveStoreActionImpl.java | 1 + .../CartDiscountSetStoresAction.java | 1 + .../CartDiscountSetStoresActionImpl.java | 1 + .../message/CartDiscountCreatedMessage.java | 159 ++++++ .../CartDiscountCreatedMessageBuilder.java | 452 ++++++++++++++++ .../CartDiscountCreatedMessageImpl.java | 296 ++++++++++ .../CartDiscountCreatedMessagePayload.java | 131 +++++ ...tDiscountCreatedMessagePayloadBuilder.java | 108 ++++ ...CartDiscountCreatedMessagePayloadImpl.java | 95 ++++ .../message/CartDiscountDeletedMessage.java | 136 +++++ .../CartDiscountDeletedMessageBuilder.java | 402 ++++++++++++++ .../CartDiscountDeletedMessageImpl.java | 276 ++++++++++ .../CartDiscountDeletedMessagePayload.java | 108 ++++ ...tDiscountDeletedMessagePayloadBuilder.java | 57 ++ ...CartDiscountDeletedMessagePayloadImpl.java | 65 +++ .../CartDiscountStoreAddedMessage.java | 158 ++++++ .../CartDiscountStoreAddedMessageBuilder.java | 452 ++++++++++++++++ .../CartDiscountStoreAddedMessageImpl.java | 296 ++++++++++ .../CartDiscountStoreAddedMessagePayload.java | 131 +++++ ...scountStoreAddedMessagePayloadBuilder.java | 108 ++++ ...tDiscountStoreAddedMessagePayloadImpl.java | 95 ++++ .../CartDiscountStoreRemovedMessage.java | 158 ++++++ ...artDiscountStoreRemovedMessageBuilder.java | 453 ++++++++++++++++ .../CartDiscountStoreRemovedMessageImpl.java | 297 ++++++++++ ...artDiscountStoreRemovedMessagePayload.java | 132 +++++ ...ountStoreRemovedMessagePayloadBuilder.java | 109 ++++ ...iscountStoreRemovedMessagePayloadImpl.java | 95 ++++ .../message/CartDiscountStoresSetMessage.java | 171 ++++++ .../CartDiscountStoresSetMessageBuilder.java | 505 ++++++++++++++++++ .../CartDiscountStoresSetMessageImpl.java | 300 +++++++++++ .../CartDiscountStoresSetMessagePayload.java | 144 +++++ ...iscountStoresSetMessagePayloadBuilder.java | 161 ++++++ ...rtDiscountStoresSetMessagePayloadImpl.java | 99 ++++ .../api/models/message/Message.java | 65 +++ .../api/models/message/MessageBuilder.java | 20 + .../api/models/message/MessagePayload.java | 65 +++ .../models/message/MessagePayloadBuilder.java | 20 + ...tCreatedMessagePayloadQueryBuilderDsl.java | 32 ++ ...DiscountCreatedMessageQueryBuilderDsl.java | 104 ++++ ...tDeletedMessagePayloadQueryBuilderDsl.java | 20 + ...DiscountDeletedMessageQueryBuilderDsl.java | 94 ++++ ...oreAddedMessagePayloadQueryBuilderDsl.java | 30 ++ ...countStoreAddedMessageQueryBuilderDsl.java | 102 ++++ ...eRemovedMessagePayloadQueryBuilderDsl.java | 30 ++ ...untStoreRemovedMessageQueryBuilderDsl.java | 102 ++++ ...toresSetMessagePayloadQueryBuilderDsl.java | 35 ++ ...scountStoresSetMessageQueryBuilderDsl.java | 107 ++++ .../MessagePayloadQueryBuilderDsl.java | 38 ++ .../query/message/MessageQueryBuilderDsl.java | 36 ++ ...CartDiscountCreatedMessagePayloadTest.java | 38 ++ .../CartDiscountCreatedMessageTest.java | 38 ++ ...CartDiscountDeletedMessagePayloadTest.java | 13 + .../CartDiscountDeletedMessageTest.java | 13 + ...tDiscountStoreAddedMessagePayloadTest.java | 39 ++ .../CartDiscountStoreAddedMessageTest.java | 38 ++ ...iscountStoreRemovedMessagePayloadTest.java | 39 ++ .../CartDiscountStoreRemovedMessageTest.java | 38 ++ ...rtDiscountStoresSetMessagePayloadTest.java | 41 ++ .../CartDiscountStoresSetMessageTest.java | 40 ++ references.txt | 1 + 73 files changed, 7438 insertions(+), 85 deletions(-) create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountCreatedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountCreatedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountDeletedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountDeletedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoreAddedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoreAddedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoreRemovedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoreRemovedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoresSetMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/CartDiscountStoresSetMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessageTest.java diff --git a/changes.md b/changes.md index b79290f0c86..e925826e5fd 100644 --- a/changes.md +++ b/changes.md @@ -3,86 +3,15 @@Deleting a Cart Discount produces the CartDiscountDeleted Message.
* *Deleting a Cart Discount produces the CartDiscountDeleted Message.
* *Creating a Cart Discount produces the CartDiscountCreated Message.
* *Creating a Cart Discount produces the CartDiscountCreated Message.
* *To delete a CartDiscount, specify the manage_cart_discounts:{projectKey}:{storeKey}
scope for all Stores associated with the CartDiscount.
Deleting a Cart Discount produces the CartDiscountDeleted Message.
* *To delete a CartDiscount, specify the manage_cart_discounts:{projectKey}:{storeKey}
scope for all Stores associated with the CartDiscount.
Deleting a Cart Discount produces the CartDiscountDeleted Message.
* *When using the endpoint, the Store specified in the path and the Stores specified in the payload's stores
field are added to the CartDiscount.
Creating a Cart Discount produces the CartDiscountCreated Message.
* *When using the endpoint, the Store specified in the path and the Stores specified in the payload's stores
field are added to the CartDiscount.
Creating a Cart Discount produces the CartDiscountCreated Message.
* *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoreAdded Message.
* *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoreAdded Message.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartDiscountAddStoreActionImpl implements CartDiscountAddStoreAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountRemoveStoreAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountRemoveStoreAction.java index e9109d8be70..9a5a1556875 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountRemoveStoreAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountRemoveStoreAction.java @@ -17,6 +17,7 @@ /** *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoreRemoved Message.
* *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoreRemoved Message.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartDiscountRemoveStoreActionImpl implements CartDiscountRemoveStoreAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountSetStoresAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountSetStoresAction.java index b89a112e0d5..9c0adcb03c9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountSetStoresAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountSetStoresAction.java @@ -17,6 +17,7 @@ /** *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoresSet Message.
* *If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
+ *This action generates a CartDiscountStoresSet Message.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class CartDiscountSetStoresActionImpl implements CartDiscountSetStoresAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessage.java new file mode 100644 index 00000000000..d9d61a1a991 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessage.java @@ -0,0 +1,159 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.cart_discount.CartDiscount; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Create CartDiscount request.
+ * + *
+ * CartDiscountCreatedMessage cartDiscountCreatedMessage = CartDiscountCreatedMessage.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)
+ * .cartDiscount(cartDiscountBuilder -> cartDiscountBuilder)
+ * .build()
+ *
+ * The Cart Discount that was created.
+ * @return cartDiscount + */ + @NotNull + @Valid + @JsonProperty("cartDiscount") + public CartDiscount getCartDiscount(); + + /** + *The Cart Discount that was created.
+ * @param cartDiscount value to be set + */ + + public void setCartDiscount(final CartDiscount cartDiscount); + + /** + * factory method + * @return instance of CartDiscountCreatedMessage + */ + public static CartDiscountCreatedMessage of() { + return new CartDiscountCreatedMessageImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountCreatedMessage of(final CartDiscountCreatedMessage template) { + CartDiscountCreatedMessageImpl instance = new CartDiscountCreatedMessageImpl(); + 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.setCartDiscount(template.getCartDiscount()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountCreatedMessage deepCopy(@Nullable final CartDiscountCreatedMessage template) { + if (template == null) { + return null; + } + CartDiscountCreatedMessageImpl instance = new CartDiscountCreatedMessageImpl(); + 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.setCartDiscount( + com.commercetools.api.models.cart_discount.CartDiscount.deepCopy(template.getCartDiscount())); + return instance; + } + + /** + * builder factory method for CartDiscountCreatedMessage + * @return builder + */ + public static CartDiscountCreatedMessageBuilder builder() { + return CartDiscountCreatedMessageBuilder.of(); + } + + /** + * create builder for CartDiscountCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountCreatedMessageBuilder builder(final CartDiscountCreatedMessage template) { + return CartDiscountCreatedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountCreatedMessage cartDiscountCreatedMessage = CartDiscountCreatedMessage.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)
+ * .cartDiscount(cartDiscountBuilder -> cartDiscountBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder 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.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder 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 CartDiscountCreatedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder 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.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Cart Discount that was created.
+ * @param builder function to build the cartDiscount value + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder cartDiscount( + FunctionThe Cart Discount that was created.
+ * @param builder function to build the cartDiscount value + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder withCartDiscount( + FunctionThe Cart Discount that was created.
+ * @param cartDiscount value to be set + * @return Builder + */ + + public CartDiscountCreatedMessageBuilder cartDiscount( + final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + this.cartDiscount = cartDiscount; + 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
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @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.
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.
The Cart Discount that was created.
+ * @return cartDiscount + */ + + public com.commercetools.api.models.cart_discount.CartDiscount getCartDiscount() { + return this.cartDiscount; + } + + /** + * builds CartDiscountCreatedMessage with checking for non-null required values + * @return CartDiscountCreatedMessage + */ + public CartDiscountCreatedMessage build() { + Objects.requireNonNull(id, CartDiscountCreatedMessage.class + ": id is missing"); + Objects.requireNonNull(version, CartDiscountCreatedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CartDiscountCreatedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CartDiscountCreatedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CartDiscountCreatedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CartDiscountCreatedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CartDiscountCreatedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(cartDiscount, CartDiscountCreatedMessage.class + ": cartDiscount is missing"); + return new CartDiscountCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, cartDiscount); + } + + /** + * builds CartDiscountCreatedMessage without checking for non-null required values + * @return CartDiscountCreatedMessage + */ + public CartDiscountCreatedMessage buildUnchecked() { + return new CartDiscountCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, cartDiscount); + } + + /** + * factory method for an instance of CartDiscountCreatedMessageBuilder + * @return builder + */ + public static CartDiscountCreatedMessageBuilder of() { + return new CartDiscountCreatedMessageBuilder(); + } + + /** + * create builder for CartDiscountCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountCreatedMessageBuilder of(final CartDiscountCreatedMessage template) { + CartDiscountCreatedMessageBuilder builder = new CartDiscountCreatedMessageBuilder(); + 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.cartDiscount = template.getCartDiscount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageImpl.java new file mode 100644 index 00000000000..47bf1d837fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessageImpl.java @@ -0,0 +1,296 @@ + +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 Create CartDiscount request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountCreatedMessageImpl implements CartDiscountCreatedMessage, 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.cart_discount.CartDiscount cartDiscount; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountCreatedMessageImpl(@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("cartDiscount") final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + 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.cartDiscount = cartDiscount; + this.type = CART_DISCOUNT_CREATED; + } + + /** + * create empty instance + */ + public CartDiscountCreatedMessageImpl() { + this.type = CART_DISCOUNT_CREATED; + } + + /** + *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
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + 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.
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.
The Cart Discount that was created.
+ */ + + public com.commercetools.api.models.cart_discount.CartDiscount getCartDiscount() { + return this.cartDiscount; + } + + 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 setCartDiscount(final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + this.cartDiscount = cartDiscount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountCreatedMessageImpl that = (CartDiscountCreatedMessageImpl) 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(cartDiscount, that.cartDiscount) + .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(cartDiscount, that.cartDiscount) + .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(cartDiscount) + .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("cartDiscount", cartDiscount) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayload.java new file mode 100644 index 00000000000..91663c79620 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayload.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.cart_discount.CartDiscount; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Create CartDiscount request.
+ * + *
+ * CartDiscountCreatedMessagePayload cartDiscountCreatedMessagePayload = CartDiscountCreatedMessagePayload.builder()
+ * .cartDiscount(cartDiscountBuilder -> cartDiscountBuilder)
+ * .build()
+ *
+ * The Cart Discount that was created.
+ * @return cartDiscount + */ + @NotNull + @Valid + @JsonProperty("cartDiscount") + public CartDiscount getCartDiscount(); + + /** + *The Cart Discount that was created.
+ * @param cartDiscount value to be set + */ + + public void setCartDiscount(final CartDiscount cartDiscount); + + /** + * factory method + * @return instance of CartDiscountCreatedMessagePayload + */ + public static CartDiscountCreatedMessagePayload of() { + return new CartDiscountCreatedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountCreatedMessagePayload of(final CartDiscountCreatedMessagePayload template) { + CartDiscountCreatedMessagePayloadImpl instance = new CartDiscountCreatedMessagePayloadImpl(); + instance.setCartDiscount(template.getCartDiscount()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountCreatedMessagePayload deepCopy( + @Nullable final CartDiscountCreatedMessagePayload template) { + if (template == null) { + return null; + } + CartDiscountCreatedMessagePayloadImpl instance = new CartDiscountCreatedMessagePayloadImpl(); + instance.setCartDiscount( + com.commercetools.api.models.cart_discount.CartDiscount.deepCopy(template.getCartDiscount())); + return instance; + } + + /** + * builder factory method for CartDiscountCreatedMessagePayload + * @return builder + */ + public static CartDiscountCreatedMessagePayloadBuilder builder() { + return CartDiscountCreatedMessagePayloadBuilder.of(); + } + + /** + * create builder for CartDiscountCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountCreatedMessagePayloadBuilder builder(final CartDiscountCreatedMessagePayload template) { + return CartDiscountCreatedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountCreatedMessagePayload cartDiscountCreatedMessagePayload = CartDiscountCreatedMessagePayload.builder()
+ * .cartDiscount(cartDiscountBuilder -> cartDiscountBuilder)
+ * .build()
+ *
+ * The Cart Discount that was created.
+ * @param builder function to build the cartDiscount value + * @return Builder + */ + + public CartDiscountCreatedMessagePayloadBuilder cartDiscount( + FunctionThe Cart Discount that was created.
+ * @param builder function to build the cartDiscount value + * @return Builder + */ + + public CartDiscountCreatedMessagePayloadBuilder withCartDiscount( + FunctionThe Cart Discount that was created.
+ * @param cartDiscount value to be set + * @return Builder + */ + + public CartDiscountCreatedMessagePayloadBuilder cartDiscount( + final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + this.cartDiscount = cartDiscount; + return this; + } + + /** + *The Cart Discount that was created.
+ * @return cartDiscount + */ + + public com.commercetools.api.models.cart_discount.CartDiscount getCartDiscount() { + return this.cartDiscount; + } + + /** + * builds CartDiscountCreatedMessagePayload with checking for non-null required values + * @return CartDiscountCreatedMessagePayload + */ + public CartDiscountCreatedMessagePayload build() { + Objects.requireNonNull(cartDiscount, CartDiscountCreatedMessagePayload.class + ": cartDiscount is missing"); + return new CartDiscountCreatedMessagePayloadImpl(cartDiscount); + } + + /** + * builds CartDiscountCreatedMessagePayload without checking for non-null required values + * @return CartDiscountCreatedMessagePayload + */ + public CartDiscountCreatedMessagePayload buildUnchecked() { + return new CartDiscountCreatedMessagePayloadImpl(cartDiscount); + } + + /** + * factory method for an instance of CartDiscountCreatedMessagePayloadBuilder + * @return builder + */ + public static CartDiscountCreatedMessagePayloadBuilder of() { + return new CartDiscountCreatedMessagePayloadBuilder(); + } + + /** + * create builder for CartDiscountCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountCreatedMessagePayloadBuilder of(final CartDiscountCreatedMessagePayload template) { + CartDiscountCreatedMessagePayloadBuilder builder = new CartDiscountCreatedMessagePayloadBuilder(); + builder.cartDiscount = template.getCartDiscount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadImpl.java new file mode 100644 index 00000000000..1b6785eff7b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountCreatedMessagePayloadImpl.java @@ -0,0 +1,95 @@ + +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 Create CartDiscount request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountCreatedMessagePayloadImpl implements CartDiscountCreatedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.cart_discount.CartDiscount cartDiscount; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountCreatedMessagePayloadImpl( + @JsonProperty("cartDiscount") final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + this.cartDiscount = cartDiscount; + this.type = CART_DISCOUNT_CREATED; + } + + /** + * create empty instance + */ + public CartDiscountCreatedMessagePayloadImpl() { + this.type = CART_DISCOUNT_CREATED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *The Cart Discount that was created.
+ */ + + public com.commercetools.api.models.cart_discount.CartDiscount getCartDiscount() { + return this.cartDiscount; + } + + public void setCartDiscount(final com.commercetools.api.models.cart_discount.CartDiscount cartDiscount) { + this.cartDiscount = cartDiscount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountCreatedMessagePayloadImpl that = (CartDiscountCreatedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(cartDiscount, that.cartDiscount) + .append(type, that.type) + .append(cartDiscount, that.cartDiscount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(cartDiscount).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("cartDiscount", cartDiscount) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessage.java new file mode 100644 index 00000000000..aa466a92660 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountDeletedMessage.java @@ -0,0 +1,136 @@ + +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 Delete CartDiscount request.
+ * + *
+ * CartDiscountDeletedMessage cartDiscountDeletedMessage = CartDiscountDeletedMessage.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()
+ *
+ *
+ * CartDiscountDeletedMessage cartDiscountDeletedMessage = CartDiscountDeletedMessage.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()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder 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.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder 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 CartDiscountDeletedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public CartDiscountDeletedMessageBuilder 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.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
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
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @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.
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.
Generated after a successful Delete CartDiscount request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountDeletedMessageImpl implements CartDiscountDeletedMessage, 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 + CartDiscountDeletedMessageImpl(@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_DISCOUNT_DELETED; + } + + /** + * create empty instance + */ + public CartDiscountDeletedMessageImpl() { + this.type = CART_DISCOUNT_DELETED; + } + + /** + *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
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + 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.
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.
Generated after a successful Delete CartDiscount request.
+ * + *
+ * CartDiscountDeletedMessagePayload cartDiscountDeletedMessagePayload = CartDiscountDeletedMessagePayload.builder()
+ * .build()
+ *
+ *
+ * CartDiscountDeletedMessagePayload cartDiscountDeletedMessagePayload = CartDiscountDeletedMessagePayload.builder()
+ * .build()
+ *
+ * Generated after a successful Delete CartDiscount request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountDeletedMessagePayloadImpl implements CartDiscountDeletedMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountDeletedMessagePayloadImpl() { + this.type = CART_DISCOUNT_DELETED; + } + + /** + * + */ + + 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; + + CartDiscountDeletedMessagePayloadImpl that = (CartDiscountDeletedMessagePayloadImpl) 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(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessage.java new file mode 100644 index 00000000000..eff12768e7d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessage.java @@ -0,0 +1,158 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Add Store update action.
+ * + *
+ * CartDiscountStoreAddedMessage cartDiscountStoreAddedMessage = CartDiscountStoreAddedMessage.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)
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was added to the Cart Discount.
+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *The Store that was added to the Cart Discount.
+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + * factory method + * @return instance of CartDiscountStoreAddedMessage + */ + public static CartDiscountStoreAddedMessage of() { + return new CartDiscountStoreAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountStoreAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountStoreAddedMessage of(final CartDiscountStoreAddedMessage template) { + CartDiscountStoreAddedMessageImpl instance = new CartDiscountStoreAddedMessageImpl(); + 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.setStore(template.getStore()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountStoreAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountStoreAddedMessage deepCopy(@Nullable final CartDiscountStoreAddedMessage template) { + if (template == null) { + return null; + } + CartDiscountStoreAddedMessageImpl instance = new CartDiscountStoreAddedMessageImpl(); + 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.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + return instance; + } + + /** + * builder factory method for CartDiscountStoreAddedMessage + * @return builder + */ + public static CartDiscountStoreAddedMessageBuilder builder() { + return CartDiscountStoreAddedMessageBuilder.of(); + } + + /** + * create builder for CartDiscountStoreAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreAddedMessageBuilder builder(final CartDiscountStoreAddedMessage template) { + return CartDiscountStoreAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountStoreAddedMessage cartDiscountStoreAddedMessage = CartDiscountStoreAddedMessage.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)
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder 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.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder 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 CartDiscountStoreAddedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder 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.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Store that was added to the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder store( + FunctionThe Store that was added to the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder withStore( + FunctionThe Store that was added to the Cart Discount.
+ * @param store value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + 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
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @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.
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.
The Store that was added to the Cart Discount.
+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + * builds CartDiscountStoreAddedMessage with checking for non-null required values + * @return CartDiscountStoreAddedMessage + */ + public CartDiscountStoreAddedMessage build() { + Objects.requireNonNull(id, CartDiscountStoreAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, CartDiscountStoreAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CartDiscountStoreAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CartDiscountStoreAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CartDiscountStoreAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CartDiscountStoreAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CartDiscountStoreAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, CartDiscountStoreAddedMessage.class + ": store is missing"); + return new CartDiscountStoreAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store); + } + + /** + * builds CartDiscountStoreAddedMessage without checking for non-null required values + * @return CartDiscountStoreAddedMessage + */ + public CartDiscountStoreAddedMessage buildUnchecked() { + return new CartDiscountStoreAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store); + } + + /** + * factory method for an instance of CartDiscountStoreAddedMessageBuilder + * @return builder + */ + public static CartDiscountStoreAddedMessageBuilder of() { + return new CartDiscountStoreAddedMessageBuilder(); + } + + /** + * create builder for CartDiscountStoreAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreAddedMessageBuilder of(final CartDiscountStoreAddedMessage template) { + CartDiscountStoreAddedMessageBuilder builder = new CartDiscountStoreAddedMessageBuilder(); + 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.store = template.getStore(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageImpl.java new file mode 100644 index 00000000000..09481bc7ba0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessageImpl.java @@ -0,0 +1,296 @@ + +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 Add Store update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoreAddedMessageImpl implements CartDiscountStoreAddedMessage, 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.store.StoreKeyReference store; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountStoreAddedMessageImpl(@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("store") final com.commercetools.api.models.store.StoreKeyReference store) { + 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.store = store; + this.type = CART_DISCOUNT_STORE_ADDED; + } + + /** + * create empty instance + */ + public CartDiscountStoreAddedMessageImpl() { + this.type = CART_DISCOUNT_STORE_ADDED; + } + + /** + *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
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + 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.
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.
The Store that was added to the Cart Discount.
+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + 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 setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountStoreAddedMessageImpl that = (CartDiscountStoreAddedMessageImpl) 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(store, that.store) + .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(store, that.store) + .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(store) + .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("store", store) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayload.java new file mode 100644 index 00000000000..54f02982c96 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayload.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Add Store update action.
+ * + *
+ * CartDiscountStoreAddedMessagePayload cartDiscountStoreAddedMessagePayload = CartDiscountStoreAddedMessagePayload.builder()
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was added to the Cart Discount.
+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *The Store that was added to the Cart Discount.
+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + * factory method + * @return instance of CartDiscountStoreAddedMessagePayload + */ + public static CartDiscountStoreAddedMessagePayload of() { + return new CartDiscountStoreAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountStoreAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountStoreAddedMessagePayload of(final CartDiscountStoreAddedMessagePayload template) { + CartDiscountStoreAddedMessagePayloadImpl instance = new CartDiscountStoreAddedMessagePayloadImpl(); + instance.setStore(template.getStore()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountStoreAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountStoreAddedMessagePayload deepCopy( + @Nullable final CartDiscountStoreAddedMessagePayload template) { + if (template == null) { + return null; + } + CartDiscountStoreAddedMessagePayloadImpl instance = new CartDiscountStoreAddedMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + return instance; + } + + /** + * builder factory method for CartDiscountStoreAddedMessagePayload + * @return builder + */ + public static CartDiscountStoreAddedMessagePayloadBuilder builder() { + return CartDiscountStoreAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for CartDiscountStoreAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreAddedMessagePayloadBuilder builder( + final CartDiscountStoreAddedMessagePayload template) { + return CartDiscountStoreAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountStoreAddedMessagePayload cartDiscountStoreAddedMessagePayload = CartDiscountStoreAddedMessagePayload.builder()
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was added to the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreAddedMessagePayloadBuilder store( + FunctionThe Store that was added to the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreAddedMessagePayloadBuilder withStore( + FunctionThe Store that was added to the Cart Discount.
+ * @param store value to be set + * @return Builder + */ + + public CartDiscountStoreAddedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *The Store that was added to the Cart Discount.
+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + * builds CartDiscountStoreAddedMessagePayload with checking for non-null required values + * @return CartDiscountStoreAddedMessagePayload + */ + public CartDiscountStoreAddedMessagePayload build() { + Objects.requireNonNull(store, CartDiscountStoreAddedMessagePayload.class + ": store is missing"); + return new CartDiscountStoreAddedMessagePayloadImpl(store); + } + + /** + * builds CartDiscountStoreAddedMessagePayload without checking for non-null required values + * @return CartDiscountStoreAddedMessagePayload + */ + public CartDiscountStoreAddedMessagePayload buildUnchecked() { + return new CartDiscountStoreAddedMessagePayloadImpl(store); + } + + /** + * factory method for an instance of CartDiscountStoreAddedMessagePayloadBuilder + * @return builder + */ + public static CartDiscountStoreAddedMessagePayloadBuilder of() { + return new CartDiscountStoreAddedMessagePayloadBuilder(); + } + + /** + * create builder for CartDiscountStoreAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreAddedMessagePayloadBuilder of(final CartDiscountStoreAddedMessagePayload template) { + CartDiscountStoreAddedMessagePayloadBuilder builder = new CartDiscountStoreAddedMessagePayloadBuilder(); + builder.store = template.getStore(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadImpl.java new file mode 100644 index 00000000000..0e6952dd7c5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreAddedMessagePayloadImpl.java @@ -0,0 +1,95 @@ + +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 Add Store update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoreAddedMessagePayloadImpl implements CartDiscountStoreAddedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountStoreAddedMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + this.type = CART_DISCOUNT_STORE_ADDED; + } + + /** + * create empty instance + */ + public CartDiscountStoreAddedMessagePayloadImpl() { + this.type = CART_DISCOUNT_STORE_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *The Store that was added to the Cart Discount.
+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountStoreAddedMessagePayloadImpl that = (CartDiscountStoreAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(type, that.type) + .append(store, that.store) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(store).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessage.java new file mode 100644 index 00000000000..9a5dc184eee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessage.java @@ -0,0 +1,158 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Remove Store update action.
+ * + *
+ * CartDiscountStoreRemovedMessage cartDiscountStoreRemovedMessage = CartDiscountStoreRemovedMessage.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)
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was removed from the Cart Discount.
+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *The Store that was removed from the Cart Discount.
+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + * factory method + * @return instance of CartDiscountStoreRemovedMessage + */ + public static CartDiscountStoreRemovedMessage of() { + return new CartDiscountStoreRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountStoreRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountStoreRemovedMessage of(final CartDiscountStoreRemovedMessage template) { + CartDiscountStoreRemovedMessageImpl instance = new CartDiscountStoreRemovedMessageImpl(); + 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.setStore(template.getStore()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountStoreRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountStoreRemovedMessage deepCopy(@Nullable final CartDiscountStoreRemovedMessage template) { + if (template == null) { + return null; + } + CartDiscountStoreRemovedMessageImpl instance = new CartDiscountStoreRemovedMessageImpl(); + 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.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + return instance; + } + + /** + * builder factory method for CartDiscountStoreRemovedMessage + * @return builder + */ + public static CartDiscountStoreRemovedMessageBuilder builder() { + return CartDiscountStoreRemovedMessageBuilder.of(); + } + + /** + * create builder for CartDiscountStoreRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreRemovedMessageBuilder builder(final CartDiscountStoreRemovedMessage template) { + return CartDiscountStoreRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountStoreRemovedMessage cartDiscountStoreRemovedMessage = CartDiscountStoreRemovedMessage.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)
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder 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.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder 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 CartDiscountStoreRemovedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder 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.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Store that was removed from the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder store( + FunctionThe Store that was removed from the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder withStore( + FunctionThe Store that was removed from the Cart Discount.
+ * @param store value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + 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
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @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.
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.
The Store that was removed from the Cart Discount.
+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + * builds CartDiscountStoreRemovedMessage with checking for non-null required values + * @return CartDiscountStoreRemovedMessage + */ + public CartDiscountStoreRemovedMessage build() { + Objects.requireNonNull(id, CartDiscountStoreRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, CartDiscountStoreRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, CartDiscountStoreRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, CartDiscountStoreRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, CartDiscountStoreRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, CartDiscountStoreRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, CartDiscountStoreRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, CartDiscountStoreRemovedMessage.class + ": store is missing"); + return new CartDiscountStoreRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store); + } + + /** + * builds CartDiscountStoreRemovedMessage without checking for non-null required values + * @return CartDiscountStoreRemovedMessage + */ + public CartDiscountStoreRemovedMessage buildUnchecked() { + return new CartDiscountStoreRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store); + } + + /** + * factory method for an instance of CartDiscountStoreRemovedMessageBuilder + * @return builder + */ + public static CartDiscountStoreRemovedMessageBuilder of() { + return new CartDiscountStoreRemovedMessageBuilder(); + } + + /** + * create builder for CartDiscountStoreRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreRemovedMessageBuilder of(final CartDiscountStoreRemovedMessage template) { + CartDiscountStoreRemovedMessageBuilder builder = new CartDiscountStoreRemovedMessageBuilder(); + 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.store = template.getStore(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageImpl.java new file mode 100644 index 00000000000..c5dd3483531 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessageImpl.java @@ -0,0 +1,297 @@ + +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 Store update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoreRemovedMessageImpl implements CartDiscountStoreRemovedMessage, 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.store.StoreKeyReference store; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountStoreRemovedMessageImpl(@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("store") final com.commercetools.api.models.store.StoreKeyReference store) { + 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.store = store; + this.type = CART_DISCOUNT_STORE_REMOVED; + } + + /** + * create empty instance + */ + public CartDiscountStoreRemovedMessageImpl() { + this.type = CART_DISCOUNT_STORE_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
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + 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.
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.
The Store that was removed from the Cart Discount.
+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + 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 setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountStoreRemovedMessageImpl that = (CartDiscountStoreRemovedMessageImpl) 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(store, that.store) + .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(store, that.store) + .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(store) + .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("store", store) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayload.java new file mode 100644 index 00000000000..ca8a4bbcd86 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayload.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Remove Store update action.
+ * + *
+ * CartDiscountStoreRemovedMessagePayload cartDiscountStoreRemovedMessagePayload = CartDiscountStoreRemovedMessagePayload.builder()
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was removed from the Cart Discount.
+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *The Store that was removed from the Cart Discount.
+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + * factory method + * @return instance of CartDiscountStoreRemovedMessagePayload + */ + public static CartDiscountStoreRemovedMessagePayload of() { + return new CartDiscountStoreRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy CartDiscountStoreRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static CartDiscountStoreRemovedMessagePayload of(final CartDiscountStoreRemovedMessagePayload template) { + CartDiscountStoreRemovedMessagePayloadImpl instance = new CartDiscountStoreRemovedMessagePayloadImpl(); + instance.setStore(template.getStore()); + return instance; + } + + /** + * factory method to create a deep copy of CartDiscountStoreRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CartDiscountStoreRemovedMessagePayload deepCopy( + @Nullable final CartDiscountStoreRemovedMessagePayload template) { + if (template == null) { + return null; + } + CartDiscountStoreRemovedMessagePayloadImpl instance = new CartDiscountStoreRemovedMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + return instance; + } + + /** + * builder factory method for CartDiscountStoreRemovedMessagePayload + * @return builder + */ + public static CartDiscountStoreRemovedMessagePayloadBuilder builder() { + return CartDiscountStoreRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for CartDiscountStoreRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreRemovedMessagePayloadBuilder builder( + final CartDiscountStoreRemovedMessagePayload template) { + return CartDiscountStoreRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * CartDiscountStoreRemovedMessagePayload cartDiscountStoreRemovedMessagePayload = CartDiscountStoreRemovedMessagePayload.builder()
+ * .store(storeBuilder -> storeBuilder)
+ * .build()
+ *
+ * The Store that was removed from the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreRemovedMessagePayloadBuilder store( + FunctionThe Store that was removed from the Cart Discount.
+ * @param builder function to build the store value + * @return Builder + */ + + public CartDiscountStoreRemovedMessagePayloadBuilder withStore( + FunctionThe Store that was removed from the Cart Discount.
+ * @param store value to be set + * @return Builder + */ + + public CartDiscountStoreRemovedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *The Store that was removed from the Cart Discount.
+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + * builds CartDiscountStoreRemovedMessagePayload with checking for non-null required values + * @return CartDiscountStoreRemovedMessagePayload + */ + public CartDiscountStoreRemovedMessagePayload build() { + Objects.requireNonNull(store, CartDiscountStoreRemovedMessagePayload.class + ": store is missing"); + return new CartDiscountStoreRemovedMessagePayloadImpl(store); + } + + /** + * builds CartDiscountStoreRemovedMessagePayload without checking for non-null required values + * @return CartDiscountStoreRemovedMessagePayload + */ + public CartDiscountStoreRemovedMessagePayload buildUnchecked() { + return new CartDiscountStoreRemovedMessagePayloadImpl(store); + } + + /** + * factory method for an instance of CartDiscountStoreRemovedMessagePayloadBuilder + * @return builder + */ + public static CartDiscountStoreRemovedMessagePayloadBuilder of() { + return new CartDiscountStoreRemovedMessagePayloadBuilder(); + } + + /** + * create builder for CartDiscountStoreRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CartDiscountStoreRemovedMessagePayloadBuilder of( + final CartDiscountStoreRemovedMessagePayload template) { + CartDiscountStoreRemovedMessagePayloadBuilder builder = new CartDiscountStoreRemovedMessagePayloadBuilder(); + builder.store = template.getStore(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadImpl.java new file mode 100644 index 00000000000..634c329e298 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoreRemovedMessagePayloadImpl.java @@ -0,0 +1,95 @@ + +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 Store update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoreRemovedMessagePayloadImpl implements CartDiscountStoreRemovedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + /** + * create instance with all properties + */ + @JsonCreator + CartDiscountStoreRemovedMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + this.type = CART_DISCOUNT_STORE_REMOVED; + } + + /** + * create empty instance + */ + public CartDiscountStoreRemovedMessagePayloadImpl() { + this.type = CART_DISCOUNT_STORE_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *The Store that was removed from the Cart Discount.
+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CartDiscountStoreRemovedMessagePayloadImpl that = (CartDiscountStoreRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(type, that.type) + .append(store, that.store) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(store).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessage.java new file mode 100644 index 00000000000..af9f2e5fe52 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/CartDiscountStoresSetMessage.java @@ -0,0 +1,171 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.store.StoreKeyReference; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Set Stores update action.
+ * + *
+ * CartDiscountStoresSetMessage cartDiscountStoresSetMessage = CartDiscountStoresSetMessage.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)
+ * .plusStores(storesBuilder -> storesBuilder)
+ * .build()
+ *
+ * Stores of the Cart Discount after the Set Stores update action.
+ * @return stores + */ + @NotNull + @Valid + @JsonProperty("stores") + public ListStores of the Cart Discount after the Set Stores update action.
+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param stores values to be set + */ + + public void setStores(final List
+ * CartDiscountStoresSetMessage cartDiscountStoresSetMessage = CartDiscountStoresSetMessage.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)
+ * .plusStores(storesBuilder -> storesBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder 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.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder 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 CartDiscountStoresSetMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder 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.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Stores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder stores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + return this; + } + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder stores( + final java.util.ListStores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder plusStores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder plusStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder withStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder addStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessageBuilder setStores( + FunctionUnique 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
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @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.
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.
Stores of the Cart Discount after the Set Stores update action.
+ * @return stores + */ + + public java.util.ListGenerated after a successful Set Stores update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoresSetMessageImpl implements CartDiscountStoresSetMessage, 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 java.util.ListUnique 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
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + 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.
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.
Stores of the Cart Discount after the Set Stores update action.
+ */ + + public java.util.ListGenerated after a successful Set Stores update action.
+ * + *
+ * CartDiscountStoresSetMessagePayload cartDiscountStoresSetMessagePayload = CartDiscountStoresSetMessagePayload.builder()
+ * .plusStores(storesBuilder -> storesBuilder)
+ * .build()
+ *
+ * Stores of the Cart Discount after the Set Stores update action.
+ * @return stores + */ + @NotNull + @Valid + @JsonProperty("stores") + public ListStores of the Cart Discount after the Set Stores update action.
+ * @param stores values to be set + */ + + @JsonIgnore + public void setStores(final StoreKeyReference... stores); + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param stores values to be set + */ + + public void setStores(final List
+ * CartDiscountStoresSetMessagePayload cartDiscountStoresSetMessagePayload = CartDiscountStoresSetMessagePayload.builder()
+ * .plusStores(storesBuilder -> storesBuilder)
+ * .build()
+ *
+ * Stores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder stores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + this.stores = new ArrayList<>(Arrays.asList(stores)); + return this; + } + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder stores( + final java.util.ListStores of the Cart Discount after the Set Stores update action.
+ * @param stores value to be set + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder plusStores( + final com.commercetools.api.models.store.StoreKeyReference... stores) { + if (this.stores == null) { + this.stores = new ArrayList<>(); + } + this.stores.addAll(Arrays.asList(stores)); + return this; + } + + /** + *Stores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder plusStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder withStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder addStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @param builder function to build the stores value + * @return Builder + */ + + public CartDiscountStoresSetMessagePayloadBuilder setStores( + FunctionStores of the Cart Discount after the Set Stores update action.
+ * @return stores + */ + + public java.util.ListGenerated after a successful Set Stores update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CartDiscountStoresSetMessagePayloadImpl implements CartDiscountStoresSetMessagePayload, ModelBase { + + private String type; + + private java.util.ListStores of the Cart Discount after the Set Stores update action.
+ */ + + public java.util.List