From e0d51ae5b393465847eb705dfc39a33ae5c0afb5 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 07:37:19 +0000 Subject: [PATCH 1/3] build(codegen): updating SDK --- changes.md | 48 ++ .../main/resources/graphql/schema.graphqls | 248 ++++++ ...ByProductIDProductTailoringImagesPost.java | 538 +++++++++++++ ...uctIDProductTailoringImagesPostString.java | 529 ++++++++++++ ...DProductTailoringImagesRequestBuilder.java | 28 + ...oductIDProductTailoringRequestBuilder.java | 5 + ...yProductKeyProductTailoringImagesPost.java | 539 +++++++++++++ ...ctKeyProductTailoringImagesPostString.java | 530 ++++++++++++ ...yProductTailoringImagesRequestBuilder.java | 29 + ...ductKeyProductTailoringRequestBuilder.java | 5 + .../api/models/message/Message.java | 52 ++ .../api/models/message/MessageBuilder.java | 16 + .../api/models/message/MessagePayload.java | 52 ++ .../models/message/MessagePayloadBuilder.java | 16 + .../ProductTailoringCreatedMessage.java | 84 ++ ...ProductTailoringCreatedMessageBuilder.java | 261 +++++- .../ProductTailoringCreatedMessageImpl.java | 85 ++ ...ProductTailoringCreatedMessagePayload.java | 84 ++ ...TailoringCreatedMessagePayloadBuilder.java | 261 +++++- ...uctTailoringCreatedMessagePayloadImpl.java | 85 ++ .../ProductTailoringImageAddedMessage.java | 235 ++++++ ...ductTailoringImageAddedMessageBuilder.java | 605 ++++++++++++++ ...ProductTailoringImageAddedMessageImpl.java | 377 +++++++++ ...ductTailoringImageAddedMessagePayload.java | 208 +++++ ...loringImageAddedMessagePayloadBuilder.java | 262 ++++++ ...TailoringImageAddedMessagePayloadImpl.java | 178 ++++ .../ProductTailoringImagesSetMessage.java | 274 +++++++ ...oductTailoringImagesSetMessageBuilder.java | 762 ++++++++++++++++++ .../ProductTailoringImagesSetMessageImpl.java | 405 ++++++++++ ...oductTailoringImagesSetMessagePayload.java | 248 ++++++ ...iloringImagesSetMessagePayloadBuilder.java | 420 ++++++++++ ...tTailoringImagesSetMessagePayloadImpl.java | 205 +++++ .../ProductVariantTailoringAddedMessage.java | 237 ++++++ ...ctVariantTailoringAddedMessageBuilder.java | 610 ++++++++++++++ ...oductVariantTailoringAddedMessageImpl.java | 377 +++++++++ ...ctVariantTailoringAddedMessagePayload.java | 210 +++++ ...ntTailoringAddedMessagePayloadBuilder.java | 264 ++++++ ...riantTailoringAddedMessagePayloadImpl.java | 178 ++++ ...ProductVariantTailoringRemovedMessage.java | 237 ++++++ ...VariantTailoringRemovedMessageBuilder.java | 611 ++++++++++++++ ...uctVariantTailoringRemovedMessageImpl.java | 377 +++++++++ ...VariantTailoringRemovedMessagePayload.java | 210 +++++ ...TailoringRemovedMessagePayloadBuilder.java | 265 ++++++ ...antTailoringRemovedMessagePayloadImpl.java | 178 ++++ .../ProductTailoringAddAssetAction.java | 198 +++++ ...ProductTailoringAddAssetActionBuilder.java | 209 +++++ .../ProductTailoringAddAssetActionImpl.java | 175 ++++ ...roductTailoringAddExternalImageAction.java | 184 +++++ ...ailoringAddExternalImageActionBuilder.java | 185 +++++ ...ctTailoringAddExternalImageActionImpl.java | 156 ++++ .../ProductTailoringAddVariantAction.java | 221 +++++ ...oductTailoringAddVariantActionBuilder.java | 341 ++++++++ .../ProductTailoringAddVariantActionImpl.java | 183 +++++ ...ProductTailoringChangeAssetNameAction.java | 217 +++++ ...TailoringChangeAssetNameActionBuilder.java | 236 ++++++ ...uctTailoringChangeAssetNameActionImpl.java | 194 +++++ ...roductTailoringChangeAssetOrderAction.java | 189 +++++ ...ailoringChangeAssetOrderActionBuilder.java | 185 +++++ ...ctTailoringChangeAssetOrderActionImpl.java | 159 ++++ .../ProductTailoringData.java | 30 + .../ProductTailoringDataBuilder.java | 113 ++- .../ProductTailoringDataImpl.java | 27 +- .../ProductTailoringDraft.java | 30 + .../ProductTailoringDraftBuilder.java | 113 ++- .../ProductTailoringDraftImpl.java | 28 +- .../ProductTailoringInStoreDraft.java | 30 + .../ProductTailoringInStoreDraftBuilder.java | 113 ++- .../ProductTailoringInStoreDraftImpl.java | 28 +- ...uctTailoringMoveImageToPositionAction.java | 200 +++++ ...oringMoveImageToPositionActionBuilder.java | 186 +++++ ...ailoringMoveImageToPositionActionImpl.java | 175 ++++ .../ProductTailoringRemoveAssetAction.java | 193 +++++ ...ductTailoringRemoveAssetActionBuilder.java | 184 +++++ ...ProductTailoringRemoveAssetActionImpl.java | 174 ++++ .../ProductTailoringRemoveImageAction.java | 179 ++++ ...ductTailoringRemoveImageActionBuilder.java | 159 ++++ ...ProductTailoringRemoveImageActionImpl.java | 155 ++++ .../ProductTailoringRemoveVariantAction.java | 160 ++++ ...ctTailoringRemoveVariantActionBuilder.java | 134 +++ ...oductTailoringRemoveVariantActionImpl.java | 131 +++ ...uctTailoringSetAssetCustomFieldAction.java | 233 ++++++ ...oringSetAssetCustomFieldActionBuilder.java | 238 ++++++ ...ailoringSetAssetCustomFieldActionImpl.java | 214 +++++ ...ductTailoringSetAssetCustomTypeAction.java | 233 ++++++ ...loringSetAssetCustomTypeActionBuilder.java | 289 +++++++ ...TailoringSetAssetCustomTypeActionImpl.java | 215 +++++ ...uctTailoringSetAssetDescriptionAction.java | 217 +++++ ...oringSetAssetDescriptionActionBuilder.java | 239 ++++++ ...ailoringSetAssetDescriptionActionImpl.java | 195 +++++ .../ProductTailoringSetAssetKeyAction.java | 196 +++++ ...ductTailoringSetAssetKeyActionBuilder.java | 184 +++++ ...ProductTailoringSetAssetKeyActionImpl.java | 174 ++++ ...ProductTailoringSetAssetSourcesAction.java | 230 ++++++ ...TailoringSetAssetSourcesActionBuilder.java | 289 +++++++ ...uctTailoringSetAssetSourcesActionImpl.java | 198 +++++ .../ProductTailoringSetAssetTagsAction.java | 218 +++++ ...uctTailoringSetAssetTagsActionBuilder.java | 234 ++++++ ...roductTailoringSetAssetTagsActionImpl.java | 198 +++++ ...oductTailoringSetExternalImagesAction.java | 197 +++++ ...iloringSetExternalImagesActionBuilder.java | 240 ++++++ ...tTailoringSetExternalImagesActionImpl.java | 160 ++++ .../ProductTailoringSetImageLabelAction.java | 197 +++++ ...ctTailoringSetImageLabelActionBuilder.java | 184 +++++ ...oductTailoringSetImageLabelActionImpl.java | 174 ++++ .../ProductTailoringUpdateAction.java | 224 ++++- .../ProductTailoringUpdateActionBuilder.java | 68 ++ .../ProductVariantTailoring.java | 184 +++++ .../ProductVariantTailoringBuilder.java | 289 +++++++ .../ProductVariantTailoringDraft.java | 199 +++++ .../ProductVariantTailoringDraftBuilder.java | 316 ++++++++ .../ProductVariantTailoringDraftImpl.java | 143 ++++ .../ProductVariantTailoringImpl.java | 125 +++ ...gImageAddedMessageExpansionBuilderDsl.java | 51 ++ ...ngImagesSetMessageExpansionBuilderDsl.java | 51 ++ ...loringAddedMessageExpansionBuilderDsl.java | 51 ++ ...ringRemovedMessageExpansionBuilderDsl.java | 51 ++ .../MessagePayloadQueryBuilderDsl.java | 31 + .../query/message/MessageQueryBuilderDsl.java | 31 + ...gCreatedMessagePayloadQueryBuilderDsl.java | 42 + ...ailoringCreatedMessageQueryBuilderDsl.java | 42 + ...ageAddedMessagePayloadQueryBuilderDsl.java | 59 ++ ...oringImageAddedMessageQueryBuilderDsl.java | 131 +++ ...magesSetMessagePayloadQueryBuilderDsl.java | 78 ++ ...loringImagesSetMessageQueryBuilderDsl.java | 150 ++++ ...ingAddedMessagePayloadQueryBuilderDsl.java | 60 ++ ...tTailoringAddedMessageQueryBuilderDsl.java | 132 +++ ...gRemovedMessagePayloadQueryBuilderDsl.java | 60 ++ ...ailoringRemovedMessageQueryBuilderDsl.java | 132 +++ ...ailoringAddAssetActionQueryBuilderDsl.java | 54 ++ ...AddExternalImageActionQueryBuilderDsl.java | 48 ++ ...loringAddVariantActionQueryBuilderDsl.java | 66 ++ ...gChangeAssetNameActionQueryBuilderDsl.java | 60 ++ ...ChangeAssetOrderActionQueryBuilderDsl.java | 43 + .../ProductTailoringDataQueryBuilderDsl.java | 15 + .../ProductTailoringDraftQueryBuilderDsl.java | 15 + ...tTailoringInStoreDraftQueryBuilderDsl.java | 15 + ...eImageToPositionActionQueryBuilderDsl.java | 49 ++ ...oringRemoveAssetActionQueryBuilderDsl.java | 49 ++ ...oringRemoveImageActionQueryBuilderDsl.java | 43 + ...ingRemoveVariantActionQueryBuilderDsl.java | 36 + ...AssetCustomFieldActionQueryBuilderDsl.java | 61 ++ ...tAssetCustomTypeActionQueryBuilderDsl.java | 70 ++ ...AssetDescriptionActionQueryBuilderDsl.java | 60 ++ ...oringSetAssetKeyActionQueryBuilderDsl.java | 49 ++ ...gSetAssetSourcesActionQueryBuilderDsl.java | 65 ++ ...ringSetAssetTagsActionQueryBuilderDsl.java | 55 ++ ...etExternalImagesActionQueryBuilderDsl.java | 53 ++ ...ingSetImageLabelActionQueryBuilderDsl.java | 49 ++ ...tTailoringUpdateActionQueryBuilderDsl.java | 136 ++++ ...tVariantTailoringDraftQueryBuilderDsl.java | 54 ++ ...roductVariantTailoringQueryBuilderDsl.java | 49 ++ ...ByProductIDProductTailoringImagesTest.java | 172 ++++ ...yProductKeyProductTailoringImagesTest.java | 172 ++++ ...uctTailoringCreatedMessagePayloadTest.java | 45 ++ .../ProductTailoringCreatedMessageTest.java | 45 ++ ...TailoringImageAddedMessagePayloadTest.java | 75 ++ ...ProductTailoringImageAddedMessageTest.java | 74 ++ ...tTailoringImagesSetMessagePayloadTest.java | 88 ++ .../ProductTailoringImagesSetMessageTest.java | 87 ++ ...riantTailoringAddedMessagePayloadTest.java | 77 ++ ...oductVariantTailoringAddedMessageTest.java | 76 ++ ...antTailoringRemovedMessagePayloadTest.java | 77 ++ ...uctVariantTailoringRemovedMessageTest.java | 76 ++ .../ProductTailoringAddAssetActionTest.java | 69 ++ ...ctTailoringAddExternalImageActionTest.java | 62 ++ .../ProductTailoringAddVariantActionTest.java | 74 ++ ...uctTailoringChangeAssetNameActionTest.java | 78 ++ ...ctTailoringChangeAssetOrderActionTest.java | 64 ++ .../ProductTailoringDataTest.java | 17 +- .../ProductTailoringDraftTest.java | 17 +- .../ProductTailoringInStoreDraftTest.java | 17 +- ...ailoringMoveImageToPositionActionTest.java | 69 ++ ...ProductTailoringRemoveAssetActionTest.java | 68 ++ ...ProductTailoringRemoveImageActionTest.java | 60 ++ ...oductTailoringRemoveVariantActionTest.java | 53 ++ ...ailoringSetAssetCustomFieldActionTest.java | 85 ++ ...TailoringSetAssetCustomTypeActionTest.java | 88 ++ ...ailoringSetAssetDescriptionActionTest.java | 79 ++ ...ProductTailoringSetAssetKeyActionTest.java | 68 ++ ...uctTailoringSetAssetSourcesActionTest.java | 82 ++ ...roductTailoringSetAssetTagsActionTest.java | 79 ++ ...tTailoringSetExternalImagesActionTest.java | 65 ++ ...oductTailoringSetImageLabelActionTest.java | 69 ++ .../ProductVariantTailoringDraftTest.java | 66 ++ .../ProductVariantTailoringTest.java | 58 ++ references.txt | 1 + 186 files changed, 28477 insertions(+), 17 deletions(-) create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessage.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayload.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImageAddedMessageExpansionBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImagesSetMessageExpansionBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringAddedMessageExpansionBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringRemovedMessageExpansionBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessageQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddAssetActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddExternalImageActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetNameActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetOrderActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringMoveImageToPositionActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveAssetActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveImageActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveVariantActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetDescriptionActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetKeyActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetSourcesActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetTagsActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetExternalImagesActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetImageLabelActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java diff --git a/changes.md b/changes.md index 0ffdef77b3b..76bc3a99a1e 100644 --- a/changes.md +++ b/changes.md @@ -3,6 +3,17 @@
Added Property(s) +- added property `metaTitle` to type `ProductTailoringCreatedMessage` +- added property `metaDescription` to type `ProductTailoringCreatedMessage` +- added property `metaKeywords` to type `ProductTailoringCreatedMessage` +- added property `variants` to type `ProductTailoringCreatedMessage` +- added property `metaTitle` to type `ProductTailoringCreatedMessagePayload` +- added property `metaDescription` to type `ProductTailoringCreatedMessagePayload` +- added property `metaKeywords` to type `ProductTailoringCreatedMessagePayload` +- added property `variants` to type `ProductTailoringCreatedMessagePayload` +- added property `variants` to type `ProductTailoringData` +- added property `variants` to type `ProductTailoringDraft` +- added property `variants` to type `ProductTailoringInStoreDraft` - added property `store` to type `StagedQuote`
@@ -14,6 +25,8 @@ - added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes` - added resource `/{projectKey}/in-store/key={storeKey}/quotes` - added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes` +- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring/images` +- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring/images` - added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}` - added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}` - added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}` @@ -51,6 +64,8 @@ - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().head()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().post()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().orders().orderQuote().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().images().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().images().post()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().get()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().head()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().post()` @@ -78,6 +93,39 @@ +
+Added Type(s) + +- added type `ProductTailoringImageAddedMessage` +- added type `ProductTailoringImagesSetMessage` +- added type `ProductVariantTailoringAddedMessage` +- added type `ProductVariantTailoringRemovedMessage` +- added type `ProductTailoringImageAddedMessagePayload` +- added type `ProductTailoringImagesSetMessagePayload` +- added type `ProductVariantTailoringAddedMessagePayload` +- added type `ProductVariantTailoringRemovedMessagePayload` +- added type `ProductVariantTailoring` +- added type `ProductVariantTailoringDraft` +- added type `ProductTailoringAddAssetAction` +- added type `ProductTailoringAddExternalImageAction` +- added type `ProductTailoringAddVariantAction` +- added type `ProductTailoringChangeAssetNameAction` +- added type `ProductTailoringChangeAssetOrderAction` +- added type `ProductTailoringMoveImageToPositionAction` +- added type `ProductTailoringRemoveAssetAction` +- added type `ProductTailoringRemoveImageAction` +- added type `ProductTailoringRemoveVariantAction` +- added type `ProductTailoringSetAssetCustomFieldAction` +- added type `ProductTailoringSetAssetCustomTypeAction` +- added type `ProductTailoringSetAssetDescriptionAction` +- added type `ProductTailoringSetAssetKeyAction` +- added type `ProductTailoringSetAssetSourcesAction` +- added type `ProductTailoringSetAssetTagsAction` +- added type `ProductTailoringSetExternalImagesAction` +- added type `ProductTailoringSetImageLabelAction` +
+ +
Removed QueryParameter(s) 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 ae9efc4660f..4cfafb31319 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -306,6 +306,23 @@ input AddProductSelectionProduct { variantSelection: ProductVariantSelectionDraft } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input AddProductTailoringAsset { + variantId: Int + sku: String + staged: Boolean = true + position: Int + asset: AssetDraftInput! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input AddProductTailoringExternalImage { + variantId: Int + sku: String + image: ImageInput! + staged: Boolean = true +} + input AddProductToCategory { category: ResourceIdentifierInput! orderHint: String @@ -322,6 +339,15 @@ input AddProductVariant { staged: Boolean = true } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input AddProductVariantTailoring { + id: Int + sku: String + images: [ImageInput!] = [] + assets: [AssetDraftInput!] = [] + staged: Boolean = true +} + input AddShippingMethodShippingRate { zone: ResourceIdentifierInput! shippingRate: ShippingRateDraft! @@ -2521,6 +2547,24 @@ input ChangeProductSlug { staged: Boolean = true } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input ChangeProductTailoringAssetName { + variantId: Int + sku: String + staged: Boolean = true + name: [LocalizedStringItemInputType!]! + assetKey: String + assetId: 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 ChangeProductTailoringAssetOrder { + variantId: Int + sku: String + staged: Boolean = true + assetOrder: [String!]! +} + input ChangeProjectSettingsCartsConfiguration { cartsConfiguration: CartsConfigurationInput! } @@ -4433,6 +4477,9 @@ interface HasProductTailoringData { "List of languages the client is able to understand, and which locale variant is preferred." acceptLanguage: [Locale!]): String metaKeywordsAllLocales: [LocalizedString!] + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + variants: [ProductVariantTailoring!]! } type HighPrecisionMoney implements BaseMoney { @@ -5382,6 +5429,15 @@ input MoveProductImageToPosition { staged: Boolean } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input MoveProductTailoringImageToPosition { + variantId: Int + sku: String + imageUrl: String! + position: Int! + staged: Boolean = true +} + type MultiBuyCustomLineItemsTarget implements CartDiscountTarget { predicate: String! triggerQuantity: Long! @@ -8299,6 +8355,9 @@ type ProductTailoringCreated implements MessagePayload & HasProductTailoringData "List of languages the client is able to understand, and which locale variant is preferred." acceptLanguage: [Locale!]): String metaKeywordsAllLocales: [LocalizedString!] + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + variants: [ProductVariantTailoring!]! } type ProductTailoringData implements HasProductTailoringData { @@ -8344,6 +8403,9 @@ type ProductTailoringData implements HasProductTailoringData { "List of languages the client is able to understand, and which locale variant is preferred." acceptLanguage: [Locale!]): String metaKeywordsAllLocales: [LocalizedString!] + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + variants: [ProductVariantTailoring!]! } type ProductTailoringDeleted implements MessagePayload { @@ -8374,6 +8436,27 @@ type ProductTailoringDescriptionSet 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 ProductTailoringImageAdded implements MessagePayload { + variantId: Int! + storeRef: KeyReference! + productRef: Reference! + productKey: String + image: Image! + 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 ProductTailoringImagesSet implements MessagePayload { + variantId: Int! + storeRef: KeyReference! + productRef: Reference! + productKey: String + oldImages: [Image!]! + images: [Image!]! + type: String! +} + input ProductTailoringDraft { product: ResourceIdentifierInput! name: [LocalizedStringItemInputType!] @@ -8384,6 +8467,9 @@ input ProductTailoringDraft { metaDescription: [LocalizedStringItemInputType!] metaKeywords: [LocalizedStringItemInputType!] publish: Boolean + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + variants: [ProductVariantTailoringInput!] = [] } type ProductTailoringNameSet implements MessagePayload { @@ -8451,9 +8537,26 @@ type ProductTailoringUnpublished implements MessagePayload { } input ProductTailoringUpdateAction { + moveImageToPosition: MoveProductTailoringImageToPosition + addVariant: AddProductVariantTailoring + removeVariant: RemoveProductVariantTailoring publish: PublishTailoring unpublish: UnpublishTailoring + addAsset: AddProductTailoringAsset + addExternalImage: AddProductTailoringExternalImage + changeAssetName: ChangeProductTailoringAssetName + changeAssetOrder: ChangeProductTailoringAssetOrder + removeAsset: RemoveProductTailoringAsset + removeImage: RemoveProductTailoringImage + setAssetCustomField: SetProductTailoringAssetCustomField + setAssetCustomType: SetProductTailoringAssetCustomType + setAssetDescription: SetProductTailoringAssetDescription + setAssetKey: SetProductTailoringAssetKey + setAssetSources: SetProductTailoringAssetSources + setAssetTags: SetProductTailoringAssetTags + setImages: SetProductTailoringImages setDescription: SetProductTailoringDescription + setImageLabel: SetProductTailoringImageLabel setMetaAttributes: SetProductTailoringMetaAttributes setMetaDescription: SetProductTailoringMetaDescription setMetaKeywords: SetProductTailoringMetaKeywords @@ -8718,6 +8821,41 @@ type ProductVariantSelectionIncludeOnly implements ProductVariantSelection { 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" +type ProductVariantTailoring { + id: Int! + images: [Image!]! + assets: [Asset!]! +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductVariantTailoringAdded implements MessagePayload { + variantId: Int! + variant: VariantTailoring! + storeRef: KeyReference! + productRef: Reference! + productKey: String + 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" +input ProductVariantTailoringInput { + id: Int + sku: String + images: [ImageInput!]! = [] + assets: [AssetDraftInput!] = [] +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +type ProductVariantTailoringRemoved implements MessagePayload { + variantId: Int! + variant: VariantTailoring! + storeRef: KeyReference! + productRef: Reference! + productKey: String + type: String! +} + "Contains information about the limits of your project." type ProjectCustomLimitsProjection { query: QueryLimitsProjection! @@ -9690,12 +9828,36 @@ input RemoveProductSelectionProduct { product: ResourceIdentifierInput! } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input RemoveProductTailoringAsset { + variantId: Int + sku: String + staged: Boolean = true + assetKey: String + assetId: 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 RemoveProductTailoringImage { + variantId: Int + sku: String + imageUrl: String! + staged: Boolean = true +} + input RemoveProductVariant { id: Int sku: String staged: Boolean = true } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input RemoveProductVariantTailoring { + id: Int + sku: String + staged: Boolean = true +} + input RemoveShippingMethodShippingRate { zone: ResourceIdentifierInput! shippingRate: ShippingRateDraft! @@ -11564,11 +11726,91 @@ input SetProductSku { staged: Boolean = true } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetProductTailoringAssetCustomField { + variantId: Int + sku: String + staged: Boolean = true + value: String + name: String! + assetKey: String + assetId: 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 SetProductTailoringAssetCustomType { + variantId: Int + sku: String + staged: Boolean = true + typeId: String + typeKey: String + type: ResourceIdentifierInput + fields: [CustomFieldInput!] + assetKey: String + assetId: 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 SetProductTailoringAssetDescription { + variantId: Int + sku: String + staged: Boolean = true + description: [LocalizedStringItemInputType!] + assetKey: String + assetId: 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 SetProductTailoringAssetKey { + variantId: Int + sku: String + staged: Boolean = true + assetKey: String + assetId: 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 SetProductTailoringAssetSources { + variantId: Int + sku: String + staged: Boolean = true + sources: [AssetSourceInput!] = [] + assetKey: String + assetId: 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 SetProductTailoringAssetTags { + variantId: Int + sku: String + staged: Boolean = true + tags: [String!] = [] + assetKey: String + assetId: String +} + input SetProductTailoringDescription { description: [LocalizedStringItemInputType!] staged: Boolean = true } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetProductTailoringImageLabel { + variantId: Int + sku: String + imageUrl: String! + label: String + staged: Boolean = true +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetProductTailoringImages { + variantId: Int + sku: String + images: [ImageInput!]! + staged: Boolean = true +} + input SetProductTailoringMetaAttributes { metaDescription: [LocalizedStringItemInputType!] metaKeywords: [LocalizedStringItemInputType!] @@ -14357,6 +14599,12 @@ input ValueFilterInput { values: [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 VariantTailoring { + images: [Image!]! + assets: [Asset!]! +} + "Versioned object have an ID and version and modification. Every update of this object changes it's version." interface Versioned { id: String! diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost.java new file mode 100644 index 00000000000..c67a06e3b64 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost.java @@ -0,0 +1,538 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.net.URLConnection; +import java.nio.file.Files; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. variant or sku is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the Small version of the image has been uploaded to the CDN.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .images()
+ *            .post(file)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost extends + TypeBodyApiMethod { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + private java.io.File file; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productID, + java.io.File file) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + this.file = file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + this.file = t.file; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring/images", + this.projectKey, this.storeKey, this.productID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + ApiHttpHeaders headers = getHeaders(); + if (headers.getFirst(ApiHttpHeaders.CONTENT_TYPE) == null) { + final String mimeType = Optional.ofNullable(URLConnection.guessContentTypeFromName(file.getName())) + .orElse("application/octet-stream"); + headers = headers.withHeader(ApiHttpHeaders.CONTENT_TYPE, mimeType); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), headers, + io.vrap.rmf.base.client.utils.FileUtils.executing(() -> Files.readAllBytes(file.toPath()))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getProductID() { + return this.productID; + } + + public List getFilename() { + return this.getQueryParam("filename"); + } + + public List getVariant() { + return this.getQueryParam("variant"); + } + + public List getSku() { + return this.getQueryParam("sku"); + } + + public List getStaged() { + return this.getQueryParam("staged"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setProductID(final String productID) { + this.productID = productID; + } + + /** + * set filename with the specified value + * @param filename value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withFilename( + final TValue filename) { + return copy().withQueryParam("filename", filename); + } + + /** + * add additional filename query parameter + * @param filename value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addFilename( + final TValue filename) { + return copy().addQueryParam("filename", filename); + } + + /** + * set filename with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withFilename( + final Supplier supplier) { + return copy().withQueryParam("filename", supplier.get()); + } + + /** + * add additional filename query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addFilename( + final Supplier supplier) { + return copy().addQueryParam("filename", supplier.get()); + } + + /** + * set filename with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withFilename( + final Function op) { + return copy().withQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * add additional filename query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addFilename( + final Function op) { + return copy().addQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * set filename with the specified values + * @param filename values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withFilename( + final Collection filename) { + return copy().withoutQueryParam("filename") + .addQueryParams(filename.stream() + .map(s -> new ParamEntry<>("filename", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional filename query parameters + * @param filename values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addFilename( + final Collection filename) { + return copy().addQueryParams( + filename.stream().map(s -> new ParamEntry<>("filename", s.toString())).collect(Collectors.toList())); + } + + /** + * set variant with the specified value + * @param variant value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withVariant( + final TValue variant) { + return copy().withQueryParam("variant", variant); + } + + /** + * add additional variant query parameter + * @param variant value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addVariant( + final TValue variant) { + return copy().addQueryParam("variant", variant); + } + + /** + * set variant with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withVariant( + final Supplier supplier) { + return copy().withQueryParam("variant", supplier.get()); + } + + /** + * add additional variant query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addVariant( + final Supplier supplier) { + return copy().addQueryParam("variant", supplier.get()); + } + + /** + * set variant with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withVariant( + final Function op) { + return copy().withQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * add additional variant query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addVariant( + final Function op) { + return copy().addQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * set variant with the specified values + * @param variant values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withVariant( + final Collection variant) { + return copy().withoutQueryParam("variant") + .addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional variant query parameters + * @param variant values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addVariant( + final Collection variant) { + return copy().addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * set sku with the specified value + * @param sku value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withSku( + final TValue sku) { + return copy().withQueryParam("sku", sku); + } + + /** + * add additional sku query parameter + * @param sku value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addSku( + final TValue sku) { + return copy().addQueryParam("sku", sku); + } + + /** + * set sku with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withSku( + final Supplier supplier) { + return copy().withQueryParam("sku", supplier.get()); + } + + /** + * add additional sku query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addSku( + final Supplier supplier) { + return copy().addQueryParam("sku", supplier.get()); + } + + /** + * set sku with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withSku( + final Function op) { + return copy().withQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * add additional sku query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addSku( + final Function op) { + return copy().addQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * set sku with the specified values + * @param sku values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withSku( + final Collection sku) { + return copy().withoutQueryParam("sku") + .addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sku query parameters + * @param sku values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addSku( + final Collection sku) { + return copy().addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * set staged with the specified value + * @param staged value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withStaged( + final TValue staged) { + return copy().withQueryParam("staged", staged); + } + + /** + * add additional staged query parameter + * @param staged value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addStaged( + final TValue staged) { + return copy().addQueryParam("staged", staged); + } + + /** + * set staged with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withStaged( + final Supplier supplier) { + return copy().withQueryParam("staged", supplier.get()); + } + + /** + * add additional staged query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addStaged( + final Supplier supplier) { + return copy().addQueryParam("staged", supplier.get()); + } + + /** + * set staged with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withStaged( + final Function op) { + return copy().withQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * add additional staged query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addStaged( + final Function op) { + return copy().addQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * set staged with the specified values + * @param staged values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withStaged( + final Collection staged) { + return copy().withoutQueryParam("staged") + .addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional staged query parameters + * @param staged values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost addStaged( + final Collection staged) { + return copy().addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + public java.io.File getBody() { + return file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost withBody(java.io.File file) { + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost t = copy(); + t.file = file; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .append(file, that.file) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productID) + .append(file) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString.java new file mode 100644 index 00000000000..4e8dff98b18 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString.java @@ -0,0 +1,529 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. variant or sku is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the Small version of the image has been uploaded to the CDN.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductId("{productID}")
+ *            .productTailoring()
+ *            .images()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString extends + StringBodyApiMethod { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productID; + + private String file; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productID, String file) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + this.file = file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productID = t.productID; + this.file = t.file; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/%s/product-tailoring/images", + this.projectKey, this.storeKey, this.productID); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + file.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getProductID() { + return this.productID; + } + + public List getFilename() { + return this.getQueryParam("filename"); + } + + public List getVariant() { + return this.getQueryParam("variant"); + } + + public List getSku() { + return this.getQueryParam("sku"); + } + + public List getStaged() { + return this.getQueryParam("staged"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setProductID(final String productID) { + this.productID = productID; + } + + /** + * set filename with the specified value + * @param value type + * @param filename value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withFilename( + final TValue filename) { + return copy().withQueryParam("filename", filename); + } + + /** + * add additional filename query parameter + * @param value type + * @param filename value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addFilename( + final TValue filename) { + return copy().addQueryParam("filename", filename); + } + + /** + * set filename with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withFilename( + final Supplier supplier) { + return copy().withQueryParam("filename", supplier.get()); + } + + /** + * add additional filename query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addFilename( + final Supplier supplier) { + return copy().addQueryParam("filename", supplier.get()); + } + + /** + * set filename with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withFilename( + final Function op) { + return copy().withQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * add additional filename query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addFilename( + final Function op) { + return copy().addQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * set filename with the specified values + * @param value type + * @param filename values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withFilename( + final Collection filename) { + return copy().withoutQueryParam("filename") + .addQueryParams(filename.stream() + .map(s -> new ParamEntry<>("filename", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional filename query parameters + * @param value type + * @param filename values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addFilename( + final Collection filename) { + return copy().addQueryParams( + filename.stream().map(s -> new ParamEntry<>("filename", s.toString())).collect(Collectors.toList())); + } + + /** + * set variant with the specified value + * @param value type + * @param variant value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withVariant( + final TValue variant) { + return copy().withQueryParam("variant", variant); + } + + /** + * add additional variant query parameter + * @param value type + * @param variant value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addVariant( + final TValue variant) { + return copy().addQueryParam("variant", variant); + } + + /** + * set variant with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withVariant( + final Supplier supplier) { + return copy().withQueryParam("variant", supplier.get()); + } + + /** + * add additional variant query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addVariant( + final Supplier supplier) { + return copy().addQueryParam("variant", supplier.get()); + } + + /** + * set variant with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withVariant( + final Function op) { + return copy().withQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * add additional variant query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addVariant( + final Function op) { + return copy().addQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * set variant with the specified values + * @param value type + * @param variant values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withVariant( + final Collection variant) { + return copy().withoutQueryParam("variant") + .addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional variant query parameters + * @param value type + * @param variant values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addVariant( + final Collection variant) { + return copy().addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * set sku with the specified value + * @param value type + * @param sku value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withSku( + final TValue sku) { + return copy().withQueryParam("sku", sku); + } + + /** + * add additional sku query parameter + * @param value type + * @param sku value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addSku( + final TValue sku) { + return copy().addQueryParam("sku", sku); + } + + /** + * set sku with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withSku( + final Supplier supplier) { + return copy().withQueryParam("sku", supplier.get()); + } + + /** + * add additional sku query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addSku( + final Supplier supplier) { + return copy().addQueryParam("sku", supplier.get()); + } + + /** + * set sku with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withSku( + final Function op) { + return copy().withQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * add additional sku query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addSku( + final Function op) { + return copy().addQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * set sku with the specified values + * @param value type + * @param sku values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withSku( + final Collection sku) { + return copy().withoutQueryParam("sku") + .addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sku query parameters + * @param value type + * @param sku values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addSku( + final Collection sku) { + return copy().addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * set staged with the specified value + * @param value type + * @param staged value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withStaged( + final TValue staged) { + return copy().withQueryParam("staged", staged); + } + + /** + * add additional staged query parameter + * @param value type + * @param staged value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addStaged( + final TValue staged) { + return copy().addQueryParam("staged", staged); + } + + /** + * set staged with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withStaged( + final Supplier supplier) { + return copy().withQueryParam("staged", supplier.get()); + } + + /** + * add additional staged query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addStaged( + final Supplier supplier) { + return copy().addQueryParam("staged", supplier.get()); + } + + /** + * set staged with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withStaged( + final Function op) { + return copy().withQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * add additional staged query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addStaged( + final Function op) { + return copy().addQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * set staged with the specified values + * @param value type + * @param staged values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withStaged( + final Collection staged) { + return copy().withoutQueryParam("staged") + .addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional staged query parameters + * @param value type + * @param staged values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString addStaged( + final Collection staged) { + return copy().addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString withBody(String file) { + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString t = copy(); + t.file = file; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString that = (ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productID, that.productID) + .append(file, that.file) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productID) + .append(file) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder.java new file mode 100644 index 00000000000..e237b9fb776 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder.java @@ -0,0 +1,28 @@ + +package com.commercetools.api.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productID; + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder( + final ApiHttpClient apiHttpClient, final String projectKey, final String storeKey, final String productID) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productID = productID; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost post(java.io.File file) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesPost(apiHttpClient, + projectKey, storeKey, productID, file); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java index 92225e0f9ec..1ad8d261bbe 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringRequestBuilder.java @@ -53,4 +53,9 @@ public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailor return delete().withVersion(version); } + public ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder images() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesRequestBuilder( + apiHttpClient, projectKey, storeKey, productID); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost.java new file mode 100644 index 00000000000..6abfab61302 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost.java @@ -0,0 +1,539 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.net.URLConnection; +import java.nio.file.Files; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. variant or sku is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the Small version of the image has been uploaded to the CDN.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .images()
+ *            .post(file)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost extends + TypeBodyApiMethod { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + private java.io.File file; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productKey, + java.io.File file) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + this.file = file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + this.file = t.file; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring/images", + this.projectKey, this.storeKey, this.productKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + ApiHttpHeaders headers = getHeaders(); + if (headers.getFirst(ApiHttpHeaders.CONTENT_TYPE) == null) { + final String mimeType = Optional.ofNullable(URLConnection.guessContentTypeFromName(file.getName())) + .orElse("application/octet-stream"); + headers = headers.withHeader(ApiHttpHeaders.CONTENT_TYPE, mimeType); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), headers, + io.vrap.rmf.base.client.utils.FileUtils.executing(() -> Files.readAllBytes(file.toPath()))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getProductKey() { + return this.productKey; + } + + public List getFilename() { + return this.getQueryParam("filename"); + } + + public List getVariant() { + return this.getQueryParam("variant"); + } + + public List getSku() { + return this.getQueryParam("sku"); + } + + public List getStaged() { + return this.getQueryParam("staged"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + /** + * set filename with the specified value + * @param filename value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withFilename( + final TValue filename) { + return copy().withQueryParam("filename", filename); + } + + /** + * add additional filename query parameter + * @param filename value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addFilename( + final TValue filename) { + return copy().addQueryParam("filename", filename); + } + + /** + * set filename with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withFilename( + final Supplier supplier) { + return copy().withQueryParam("filename", supplier.get()); + } + + /** + * add additional filename query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addFilename( + final Supplier supplier) { + return copy().addQueryParam("filename", supplier.get()); + } + + /** + * set filename with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withFilename( + final Function op) { + return copy().withQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * add additional filename query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addFilename( + final Function op) { + return copy().addQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * set filename with the specified values + * @param filename values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withFilename( + final Collection filename) { + return copy().withoutQueryParam("filename") + .addQueryParams(filename.stream() + .map(s -> new ParamEntry<>("filename", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional filename query parameters + * @param filename values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addFilename( + final Collection filename) { + return copy().addQueryParams( + filename.stream().map(s -> new ParamEntry<>("filename", s.toString())).collect(Collectors.toList())); + } + + /** + * set variant with the specified value + * @param variant value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withVariant( + final TValue variant) { + return copy().withQueryParam("variant", variant); + } + + /** + * add additional variant query parameter + * @param variant value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addVariant( + final TValue variant) { + return copy().addQueryParam("variant", variant); + } + + /** + * set variant with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withVariant( + final Supplier supplier) { + return copy().withQueryParam("variant", supplier.get()); + } + + /** + * add additional variant query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addVariant( + final Supplier supplier) { + return copy().addQueryParam("variant", supplier.get()); + } + + /** + * set variant with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withVariant( + final Function op) { + return copy().withQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * add additional variant query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addVariant( + final Function op) { + return copy().addQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * set variant with the specified values + * @param variant values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withVariant( + final Collection variant) { + return copy().withoutQueryParam("variant") + .addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional variant query parameters + * @param variant values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addVariant( + final Collection variant) { + return copy().addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * set sku with the specified value + * @param sku value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withSku( + final TValue sku) { + return copy().withQueryParam("sku", sku); + } + + /** + * add additional sku query parameter + * @param sku value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addSku( + final TValue sku) { + return copy().addQueryParam("sku", sku); + } + + /** + * set sku with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withSku( + final Supplier supplier) { + return copy().withQueryParam("sku", supplier.get()); + } + + /** + * add additional sku query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addSku( + final Supplier supplier) { + return copy().addQueryParam("sku", supplier.get()); + } + + /** + * set sku with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withSku( + final Function op) { + return copy().withQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * add additional sku query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addSku( + final Function op) { + return copy().addQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * set sku with the specified values + * @param sku values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withSku( + final Collection sku) { + return copy().withoutQueryParam("sku") + .addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sku query parameters + * @param sku values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addSku( + final Collection sku) { + return copy().addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * set staged with the specified value + * @param staged value to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withStaged( + final TValue staged) { + return copy().withQueryParam("staged", staged); + } + + /** + * add additional staged query parameter + * @param staged value to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addStaged( + final TValue staged) { + return copy().addQueryParam("staged", staged); + } + + /** + * set staged with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withStaged( + final Supplier supplier) { + return copy().withQueryParam("staged", supplier.get()); + } + + /** + * add additional staged query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addStaged( + final Supplier supplier) { + return copy().addQueryParam("staged", supplier.get()); + } + + /** + * set staged with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withStaged( + final Function op) { + return copy().withQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * add additional staged query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addStaged( + final Function op) { + return copy().addQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * set staged with the specified values + * @param staged values to be set + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withStaged( + final Collection staged) { + return copy().withoutQueryParam("staged") + .addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional staged query parameters + * @param staged values to be added + * @param value type + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost addStaged( + final Collection staged) { + return copy().addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + public java.io.File getBody() { + return file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost withBody( + java.io.File file) { + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost t = copy(); + t.file = file; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .append(file, that.file) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productKey) + .append(file) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString.java new file mode 100644 index 00000000000..7963bd5cc47 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString.java @@ -0,0 +1,530 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.concurrent.CompletableFuture; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Upload a JPEG, PNG and GIF file to a ProductTailoringVariant. The maximum file size of the image is 10MB. variant or sku is required to update a specific ProductVariant. Produces the ProductTailoringImageAdded Message when the Small version of the image has been uploaded to the CDN.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .inStoreKeyWithStoreKeyValue("{storeKey}")
+ *            .products()
+ *            .withProductKey("{productKey}")
+ *            .productTailoring()
+ *            .images()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString extends + StringBodyApiMethod { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String storeKey; + private String productKey; + + private String file; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString( + final ApiHttpClient apiHttpClient, String projectKey, String storeKey, String productKey, String file) { + super(apiHttpClient); + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + this.file = file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString t) { + super(t); + this.projectKey = t.projectKey; + this.storeKey = t.storeKey; + this.productKey = t.productKey; + this.file = t.file; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/in-store/key=%s/products/key=%s/product-tailoring/images", + this.projectKey, this.storeKey, this.productKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + file.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.product_tailoring.ProductTailoring.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getStoreKey() { + return this.storeKey; + } + + public String getProductKey() { + return this.productKey; + } + + public List getFilename() { + return this.getQueryParam("filename"); + } + + public List getVariant() { + return this.getQueryParam("variant"); + } + + public List getSku() { + return this.getQueryParam("sku"); + } + + public List getStaged() { + return this.getQueryParam("staged"); + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setStoreKey(final String storeKey) { + this.storeKey = storeKey; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + /** + * set filename with the specified value + * @param value type + * @param filename value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withFilename( + final TValue filename) { + return copy().withQueryParam("filename", filename); + } + + /** + * add additional filename query parameter + * @param value type + * @param filename value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addFilename( + final TValue filename) { + return copy().addQueryParam("filename", filename); + } + + /** + * set filename with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withFilename( + final Supplier supplier) { + return copy().withQueryParam("filename", supplier.get()); + } + + /** + * add additional filename query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addFilename( + final Supplier supplier) { + return copy().addQueryParam("filename", supplier.get()); + } + + /** + * set filename with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withFilename( + final Function op) { + return copy().withQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * add additional filename query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addFilename( + final Function op) { + return copy().addQueryParam("filename", op.apply(new StringBuilder())); + } + + /** + * set filename with the specified values + * @param value type + * @param filename values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withFilename( + final Collection filename) { + return copy().withoutQueryParam("filename") + .addQueryParams(filename.stream() + .map(s -> new ParamEntry<>("filename", s.toString())) + .collect(Collectors.toList())); + } + + /** + * add additional filename query parameters + * @param value type + * @param filename values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addFilename( + final Collection filename) { + return copy().addQueryParams( + filename.stream().map(s -> new ParamEntry<>("filename", s.toString())).collect(Collectors.toList())); + } + + /** + * set variant with the specified value + * @param value type + * @param variant value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withVariant( + final TValue variant) { + return copy().withQueryParam("variant", variant); + } + + /** + * add additional variant query parameter + * @param value type + * @param variant value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addVariant( + final TValue variant) { + return copy().addQueryParam("variant", variant); + } + + /** + * set variant with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withVariant( + final Supplier supplier) { + return copy().withQueryParam("variant", supplier.get()); + } + + /** + * add additional variant query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addVariant( + final Supplier supplier) { + return copy().addQueryParam("variant", supplier.get()); + } + + /** + * set variant with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withVariant( + final Function op) { + return copy().withQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * add additional variant query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addVariant( + final Function op) { + return copy().addQueryParam("variant", op.apply(new StringBuilder())); + } + + /** + * set variant with the specified values + * @param value type + * @param variant values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withVariant( + final Collection variant) { + return copy().withoutQueryParam("variant") + .addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional variant query parameters + * @param value type + * @param variant values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addVariant( + final Collection variant) { + return copy().addQueryParams( + variant.stream().map(s -> new ParamEntry<>("variant", s.toString())).collect(Collectors.toList())); + } + + /** + * set sku with the specified value + * @param value type + * @param sku value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withSku( + final TValue sku) { + return copy().withQueryParam("sku", sku); + } + + /** + * add additional sku query parameter + * @param value type + * @param sku value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addSku( + final TValue sku) { + return copy().addQueryParam("sku", sku); + } + + /** + * set sku with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withSku( + final Supplier supplier) { + return copy().withQueryParam("sku", supplier.get()); + } + + /** + * add additional sku query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addSku( + final Supplier supplier) { + return copy().addQueryParam("sku", supplier.get()); + } + + /** + * set sku with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withSku( + final Function op) { + return copy().withQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * add additional sku query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addSku( + final Function op) { + return copy().addQueryParam("sku", op.apply(new StringBuilder())); + } + + /** + * set sku with the specified values + * @param value type + * @param sku values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withSku( + final Collection sku) { + return copy().withoutQueryParam("sku") + .addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional sku query parameters + * @param value type + * @param sku values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addSku( + final Collection sku) { + return copy().addQueryParams( + sku.stream().map(s -> new ParamEntry<>("sku", s.toString())).collect(Collectors.toList())); + } + + /** + * set staged with the specified value + * @param value type + * @param staged value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withStaged( + final TValue staged) { + return copy().withQueryParam("staged", staged); + } + + /** + * add additional staged query parameter + * @param value type + * @param staged value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addStaged( + final TValue staged) { + return copy().addQueryParam("staged", staged); + } + + /** + * set staged with the specified value + * @param supplier supplier for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withStaged( + final Supplier supplier) { + return copy().withQueryParam("staged", supplier.get()); + } + + /** + * add additional staged query parameter + * @param supplier supplier for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addStaged( + final Supplier supplier) { + return copy().addQueryParam("staged", supplier.get()); + } + + /** + * set staged with the specified value + * @param op builder for the value to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withStaged( + final Function op) { + return copy().withQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * add additional staged query parameter + * @param op builder for the value to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addStaged( + final Function op) { + return copy().addQueryParam("staged", op.apply(new StringBuilder())); + } + + /** + * set staged with the specified values + * @param value type + * @param staged values to be set + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withStaged( + final Collection staged) { + return copy().withoutQueryParam("staged") + .addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + /** + * add additional staged query parameters + * @param value type + * @param staged values to be added + * @return ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString + */ + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString addStaged( + final Collection staged) { + return copy().addQueryParams( + staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); + } + + public String getBody() { + return file; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString withBody( + String file) { + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString t = copy(); + t.file = file; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString that = (ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(storeKey, that.storeKey) + .append(productKey, that.productKey) + .append(file, that.file) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(storeKey) + .append(productKey) + .append(file) + .toHashCode(); + } + + @Override + protected ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString copy() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder.java new file mode 100644 index 00000000000..1a44c60405d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder.java @@ -0,0 +1,29 @@ + +package com.commercetools.api.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String storeKey; + private final String productKey; + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder( + final ApiHttpClient apiHttpClient, final String projectKey, final String storeKey, + final String productKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.storeKey = storeKey; + this.productKey = productKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost post(java.io.File file) { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesPost(apiHttpClient, + projectKey, storeKey, productKey, file); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java index b379724fc36..4e14da52b3d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringRequestBuilder.java @@ -55,4 +55,9 @@ public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTa return delete().withVersion(version); } + public ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder images() { + return new ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesRequestBuilder( + apiHttpClient, projectKey, storeKey, productKey); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java index 904298c1b79..e3573b7d1ff 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java @@ -218,6 +218,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringCreatedMessageImpl.class, name = ProductTailoringCreatedMessage.PRODUCT_TAILORING_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringDeletedMessageImpl.class, name = ProductTailoringDeletedMessage.PRODUCT_TAILORING_DELETED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageImpl.class, name = ProductTailoringDescriptionSetMessage.PRODUCT_TAILORING_DESCRIPTION_SET), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringImageAddedMessageImpl.class, name = ProductTailoringImageAddedMessage.PRODUCT_TAILORING_IMAGE_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringImagesSetMessageImpl.class, name = ProductTailoringImagesSetMessage.PRODUCT_TAILORING_IMAGES_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringNameSetMessageImpl.class, name = ProductTailoringNameSetMessage.PRODUCT_TAILORING_NAME_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringPublishedMessageImpl.class, name = ProductTailoringPublishedMessage.PRODUCT_TAILORING_PUBLISHED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringSlugSetMessageImpl.class, name = ProductTailoringSlugSetMessage.PRODUCT_TAILORING_SLUG_SET), @@ -225,6 +227,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductUnpublishedMessageImpl.class, name = ProductUnpublishedMessage.PRODUCT_UNPUBLISHED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantAddedMessageImpl.class, name = ProductVariantAddedMessage.PRODUCT_VARIANT_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantDeletedMessageImpl.class, name = ProductVariantDeletedMessage.PRODUCT_VARIANT_DELETED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantTailoringAddedMessageImpl.class, name = ProductVariantTailoringAddedMessage.PRODUCT_VARIANT_TAILORING_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantTailoringRemovedMessageImpl.class, name = ProductVariantTailoringRemovedMessage.PRODUCT_VARIANT_TAILORING_REMOVED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteCreatedMessageImpl.class, name = QuoteCreatedMessage.QUOTE_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteCustomerChangedMessageImpl.class, name = QuoteCustomerChangedMessage.QUOTE_CUSTOMER_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteDeletedMessageImpl.class, name = QuoteDeletedMessage.QUOTE_DELETED), @@ -972,6 +976,14 @@ public static Message deepCopy(@Nullable final Message template) { return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessage .deepCopy((com.commercetools.api.models.message.ProductTailoringDescriptionSetMessage) template); } + if (template instanceof com.commercetools.api.models.message.ProductTailoringImageAddedMessage) { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringImageAddedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringImagesSetMessage) { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessage + .deepCopy((com.commercetools.api.models.message.ProductTailoringImagesSetMessage) template); + } if (template instanceof com.commercetools.api.models.message.ProductTailoringNameSetMessage) { return com.commercetools.api.models.message.ProductTailoringNameSetMessage .deepCopy((com.commercetools.api.models.message.ProductTailoringNameSetMessage) template); @@ -1000,6 +1012,14 @@ public static Message deepCopy(@Nullable final Message template) { return com.commercetools.api.models.message.ProductVariantDeletedMessage .deepCopy((com.commercetools.api.models.message.ProductVariantDeletedMessage) template); } + if (template instanceof com.commercetools.api.models.message.ProductVariantTailoringAddedMessage) { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessage + .deepCopy((com.commercetools.api.models.message.ProductVariantTailoringAddedMessage) template); + } + if (template instanceof com.commercetools.api.models.message.ProductVariantTailoringRemovedMessage) { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessage + .deepCopy((com.commercetools.api.models.message.ProductVariantTailoringRemovedMessage) template); + } if (template instanceof com.commercetools.api.models.message.QuoteCreatedMessage) { return com.commercetools.api.models.message.QuoteCreatedMessage .deepCopy((com.commercetools.api.models.message.QuoteCreatedMessage) template); @@ -2596,6 +2616,22 @@ public static com.commercetools.api.models.message.ProductTailoringDescriptionSe return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder.of(); } + /** + * builder for productTailoringImageAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringImageAddedMessageBuilder productTailoringImageAddedBuilder() { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessageBuilder.of(); + } + + /** + * builder for productTailoringImagesSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder productTailoringImagesSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder.of(); + } + /** * builder for productTailoringNameSet subtype * @return builder @@ -2652,6 +2688,22 @@ public static com.commercetools.api.models.message.ProductVariantDeletedMessageB return com.commercetools.api.models.message.ProductVariantDeletedMessageBuilder.of(); } + /** + * builder for productVariantTailoringAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductVariantTailoringAddedMessageBuilder productVariantTailoringAddedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessageBuilder.of(); + } + + /** + * builder for productVariantTailoringRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductVariantTailoringRemovedMessageBuilder productVariantTailoringRemovedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessageBuilder.of(); + } + /** * builder for quoteCreated subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java index 3f7a6165345..91b8ba275fd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java @@ -715,6 +715,14 @@ public com.commercetools.api.models.message.ProductTailoringDescriptionSetMessag return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessageBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringImageAddedMessageBuilder productTailoringImageAddedBuilder() { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder productTailoringImagesSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessageBuilder.of(); + } + public com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder productTailoringNameSetBuilder() { return com.commercetools.api.models.message.ProductTailoringNameSetMessageBuilder.of(); } @@ -743,6 +751,14 @@ public com.commercetools.api.models.message.ProductVariantDeletedMessageBuilder return com.commercetools.api.models.message.ProductVariantDeletedMessageBuilder.of(); } + public com.commercetools.api.models.message.ProductVariantTailoringAddedMessageBuilder productVariantTailoringAddedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessageBuilder.of(); + } + + public com.commercetools.api.models.message.ProductVariantTailoringRemovedMessageBuilder productVariantTailoringRemovedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessageBuilder.of(); + } + public com.commercetools.api.models.message.QuoteCreatedMessageBuilder quoteCreatedBuilder() { return com.commercetools.api.models.message.QuoteCreatedMessageBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java index 6cc4e0fd319..e351d8c5739 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java @@ -205,6 +205,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringCreatedMessagePayloadImpl.class, name = ProductTailoringCreatedMessagePayload.PRODUCT_TAILORING_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringDeletedMessagePayloadImpl.class, name = ProductTailoringDeletedMessagePayload.PRODUCT_TAILORING_DELETED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadImpl.class, name = ProductTailoringDescriptionSetMessagePayload.PRODUCT_TAILORING_DESCRIPTION_SET), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayloadImpl.class, name = ProductTailoringImageAddedMessagePayload.PRODUCT_TAILORING_IMAGE_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadImpl.class, name = ProductTailoringImagesSetMessagePayload.PRODUCT_TAILORING_IMAGES_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadImpl.class, name = ProductTailoringNameSetMessagePayload.PRODUCT_TAILORING_NAME_SET), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringPublishedMessagePayloadImpl.class, name = ProductTailoringPublishedMessagePayload.PRODUCT_TAILORING_PUBLISHED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductTailoringSlugSetMessagePayloadImpl.class, name = ProductTailoringSlugSetMessagePayload.PRODUCT_TAILORING_SLUG_SET), @@ -212,6 +214,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductUnpublishedMessagePayloadImpl.class, name = ProductUnpublishedMessagePayload.PRODUCT_UNPUBLISHED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantAddedMessagePayloadImpl.class, name = ProductVariantAddedMessagePayload.PRODUCT_VARIANT_ADDED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantDeletedMessagePayloadImpl.class, name = ProductVariantDeletedMessagePayload.PRODUCT_VARIANT_DELETED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayloadImpl.class, name = ProductVariantTailoringAddedMessagePayload.PRODUCT_VARIANT_TAILORING_ADDED), + @JsonSubTypes.Type(value = com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayloadImpl.class, name = ProductVariantTailoringRemovedMessagePayload.PRODUCT_VARIANT_TAILORING_REMOVED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteCreatedMessagePayloadImpl.class, name = QuoteCreatedMessagePayload.QUOTE_CREATED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteCustomerChangedMessagePayloadImpl.class, name = QuoteCustomerChangedMessagePayload.QUOTE_CUSTOMER_CHANGED), @JsonSubTypes.Type(value = com.commercetools.api.models.message.QuoteDeletedMessagePayloadImpl.class, name = QuoteDeletedMessagePayload.QUOTE_DELETED), @@ -809,6 +813,14 @@ public static MessagePayload deepCopy(@Nullable final MessagePayload template) { return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayload.deepCopy( (com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayload) template); } + if (template instanceof com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayload) { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayload + .deepCopy((com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayload) template); + } if (template instanceof com.commercetools.api.models.message.ProductTailoringNameSetMessagePayload) { return com.commercetools.api.models.message.ProductTailoringNameSetMessagePayload .deepCopy((com.commercetools.api.models.message.ProductTailoringNameSetMessagePayload) template); @@ -837,6 +849,14 @@ public static MessagePayload deepCopy(@Nullable final MessagePayload template) { return com.commercetools.api.models.message.ProductVariantDeletedMessagePayload .deepCopy((com.commercetools.api.models.message.ProductVariantDeletedMessagePayload) template); } + if (template instanceof com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayload) { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayload) template); + } + if (template instanceof com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayload) { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayload.deepCopy( + (com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayload) template); + } if (template instanceof com.commercetools.api.models.message.QuoteCreatedMessagePayload) { return com.commercetools.api.models.message.QuoteCreatedMessagePayload .deepCopy((com.commercetools.api.models.message.QuoteCreatedMessagePayload) template); @@ -2425,6 +2445,22 @@ public static com.commercetools.api.models.message.ProductTailoringDescriptionSe return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder.of(); } + /** + * builder for productTailoringImageAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayloadBuilder productTailoringImageAddedBuilder() { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayloadBuilder.of(); + } + + /** + * builder for productTailoringImagesSet subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder productTailoringImagesSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder.of(); + } + /** * builder for productTailoringNameSet subtype * @return builder @@ -2481,6 +2517,22 @@ public static com.commercetools.api.models.message.ProductVariantDeletedMessageP return com.commercetools.api.models.message.ProductVariantDeletedMessagePayloadBuilder.of(); } + /** + * builder for productVariantTailoringAdded subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayloadBuilder productVariantTailoringAddedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayloadBuilder.of(); + } + + /** + * builder for productVariantTailoringRemoved subtype + * @return builder + */ + public static com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayloadBuilder productVariantTailoringRemovedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayloadBuilder.of(); + } + /** * builder for quoteCreated subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java index 4fd55ad27e1..a9d689eaf11 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java @@ -715,6 +715,14 @@ public com.commercetools.api.models.message.ProductTailoringDescriptionSetMessag return com.commercetools.api.models.message.ProductTailoringDescriptionSetMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayloadBuilder productTailoringImageAddedBuilder() { + return com.commercetools.api.models.message.ProductTailoringImageAddedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder productTailoringImagesSetBuilder() { + return com.commercetools.api.models.message.ProductTailoringImagesSetMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder productTailoringNameSetBuilder() { return com.commercetools.api.models.message.ProductTailoringNameSetMessagePayloadBuilder.of(); } @@ -743,6 +751,14 @@ public com.commercetools.api.models.message.ProductVariantDeletedMessagePayloadB return com.commercetools.api.models.message.ProductVariantDeletedMessagePayloadBuilder.of(); } + public com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayloadBuilder productVariantTailoringAddedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringAddedMessagePayloadBuilder.of(); + } + + public com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayloadBuilder productVariantTailoringRemovedBuilder() { + return com.commercetools.api.models.message.ProductVariantTailoringRemovedMessagePayloadBuilder.of(); + } + public com.commercetools.api.models.message.QuoteCreatedMessagePayloadBuilder quoteCreatedBuilder() { return com.commercetools.api.models.message.QuoteCreatedMessagePayloadBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java index 5333d20a2c3..4970a215e08 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessage.java @@ -4,11 +4,13 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; import com.commercetools.api.models.store.StoreKeyReference; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -107,6 +109,38 @@ public interface ProductTailoringCreatedMessage extends Message { @JsonProperty("slug") public LocalizedString getSlug(); + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @return metaTitle + */ + @Valid + @JsonProperty("metaTitle") + public LocalizedString getMetaTitle(); + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @return metaDescription + */ + @Valid + @JsonProperty("metaDescription") + public LocalizedString getMetaDescription(); + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @return metaKeywords + */ + @Valid + @JsonProperty("metaKeywords") + public LocalizedString getMetaKeywords(); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @return variants + */ + @Valid + @JsonProperty("variants") + public List getVariants(); + /** *

true if the ProductTailoring is published.

* @return published @@ -164,6 +198,42 @@ public interface ProductTailoringCreatedMessage extends Message { public void setSlug(final LocalizedString slug); + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @param metaTitle value to be set + */ + + public void setMetaTitle(final LocalizedString metaTitle); + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @param metaDescription value to be set + */ + + public void setMetaDescription(final LocalizedString metaDescription); + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @param metaKeywords value to be set + */ + + public void setMetaKeywords(final LocalizedString metaKeywords); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param variants values to be set + */ + + @JsonIgnore + public void setVariants(final ProductVariantTailoring... variants); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param variants values to be set + */ + + public void setVariants(final List variants); + /** *

true if the ProductTailoring is published.

* @param published value to be set @@ -203,6 +273,10 @@ public static ProductTailoringCreatedMessage of(final ProductTailoringCreatedMes instance.setDescription(template.getDescription()); instance.setName(template.getName()); instance.setSlug(template.getSlug()); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setVariants(template.getVariants()); instance.setPublished(template.getPublished()); return instance; } @@ -238,6 +312,16 @@ public static ProductTailoringCreatedMessage deepCopy(@Nullable final ProductTai com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setMetaTitle(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaTitle())); + instance.setMetaDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaDescription())); + instance.setMetaKeywords( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); + instance.setVariants(Optional.ofNullable(template.getVariants()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductVariantTailoring::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); instance.setPublished(template.getPublished()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java index 335d55420e9..9720acfd119 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageBuilder.java @@ -75,6 +75,18 @@ public class ProductTailoringCreatedMessageBuilder implements Builder variants; + private Boolean published; /** @@ -480,6 +492,207 @@ public ProductTailoringCreatedMessageBuilder slug( return this; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

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

The metaTitle of the Product Tailoring at the time of creation.

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

The metaTitle of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

+ * @param variants value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder plusVariants( + @Nullable final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.addAll(Arrays.asList(variants)); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder plusVariants( + Function builder) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder withVariants( + Function builder) { + this.variants = new ArrayList<>(); + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder addVariants( + Function builder) { + return plusVariants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessageBuilder setVariants( + Function builder) { + return variants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + /** *

true if the ProductTailoring is published.

* @param published value to be set @@ -652,6 +865,46 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @return metaTitle + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaTitle() { + return this.metaTitle; + } + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @return metaDescription + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaDescription() { + return this.metaDescription; + } + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @return metaKeywords + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaKeywords() { + return this.metaKeywords; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @return variants + */ + + @Nullable + public java.util.List getVariants() { + return this.variants; + } + /** *

true if the ProductTailoring is published.

* @return published @@ -678,7 +931,7 @@ public ProductTailoringCreatedMessage build() { Objects.requireNonNull(published, ProductTailoringCreatedMessage.class + ": published is missing"); return new ProductTailoringCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, key, store, productKey, product, - description, name, slug, published); + description, name, slug, metaTitle, metaDescription, metaKeywords, variants, published); } /** @@ -688,7 +941,7 @@ public ProductTailoringCreatedMessage build() { public ProductTailoringCreatedMessage buildUnchecked() { return new ProductTailoringCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, key, store, productKey, product, - description, name, slug, published); + description, name, slug, metaTitle, metaDescription, metaKeywords, variants, published); } /** @@ -723,6 +976,10 @@ public static ProductTailoringCreatedMessageBuilder of(final ProductTailoringCre builder.description = template.getDescription(); builder.name = template.getName(); builder.slug = template.getSlug(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.variants = template.getVariants(); builder.published = template.getPublished(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java index 68c36ebf418..c0953ce702f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageImpl.java @@ -58,6 +58,14 @@ public class ProductTailoringCreatedMessageImpl implements ProductTailoringCreat private com.commercetools.api.models.common.LocalizedString slug; + private com.commercetools.api.models.common.LocalizedString metaTitle; + + private com.commercetools.api.models.common.LocalizedString metaDescription; + + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + private java.util.List variants; + private Boolean published; /** @@ -80,6 +88,10 @@ public class ProductTailoringCreatedMessageImpl implements ProductTailoringCreat @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("metaTitle") final com.commercetools.api.models.common.LocalizedString metaTitle, + @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, + @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, + @JsonProperty("variants") final java.util.List variants, @JsonProperty("published") final Boolean published) { this.id = id; this.version = version; @@ -98,6 +110,10 @@ public class ProductTailoringCreatedMessageImpl implements ProductTailoringCreat this.description = description; this.name = name; this.slug = slug; + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.variants = variants; this.published = published; this.type = PRODUCT_TAILORING_CREATED; } @@ -253,6 +269,38 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaTitle() { + return this.metaTitle; + } + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaDescription() { + return this.metaDescription; + } + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaKeywords() { + return this.metaKeywords; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ */ + + public java.util.List getVariants() { + return this.variants; + } + /** *

true if the ProductTailoring is published.

*/ @@ -330,6 +378,27 @@ public void setSlug(final com.commercetools.api.models.common.LocalizedString sl this.slug = slug; } + public void setMetaTitle(final com.commercetools.api.models.common.LocalizedString metaTitle) { + this.metaTitle = metaTitle; + } + + public void setMetaDescription(final com.commercetools.api.models.common.LocalizedString metaDescription) { + this.metaDescription = metaDescription; + } + + public void setMetaKeywords(final com.commercetools.api.models.common.LocalizedString metaKeywords) { + this.metaKeywords = metaKeywords; + } + + public void setVariants(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + this.variants = new ArrayList<>(Arrays.asList(variants)); + } + + public void setVariants( + final java.util.List variants) { + this.variants = variants; + } + public void setPublished(final Boolean published) { this.published = published; } @@ -362,6 +431,10 @@ public boolean equals(Object o) { .append(description, that.description) .append(name, that.name) .append(slug, that.slug) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(variants, that.variants) .append(published, that.published) .append(id, that.id) .append(version, that.version) @@ -381,6 +454,10 @@ public boolean equals(Object o) { .append(description, that.description) .append(name, that.name) .append(slug, that.slug) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(variants, that.variants) .append(published, that.published) .isEquals(); } @@ -405,6 +482,10 @@ public int hashCode() { .append(description) .append(name) .append(slug) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(variants) .append(published) .toHashCode(); } @@ -429,6 +510,10 @@ public String toString() { .append("description", description) .append("name", name) .append("slug", slug) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("variants", variants) .append("published", published) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java index 72726396daf..e12e4513147 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayload.java @@ -4,11 +4,13 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; import com.commercetools.api.models.store.StoreKeyReference; import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.databind.annotation.*; @@ -100,6 +102,38 @@ public interface ProductTailoringCreatedMessagePayload extends MessagePayload { @JsonProperty("slug") public LocalizedString getSlug(); + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @return metaTitle + */ + @Valid + @JsonProperty("metaTitle") + public LocalizedString getMetaTitle(); + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @return metaDescription + */ + @Valid + @JsonProperty("metaDescription") + public LocalizedString getMetaDescription(); + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @return metaKeywords + */ + @Valid + @JsonProperty("metaKeywords") + public LocalizedString getMetaKeywords(); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @return variants + */ + @Valid + @JsonProperty("variants") + public List getVariants(); + /** *

true if the ProductTailoring is published.

* @return published @@ -157,6 +191,42 @@ public interface ProductTailoringCreatedMessagePayload extends MessagePayload { public void setSlug(final LocalizedString slug); + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @param metaTitle value to be set + */ + + public void setMetaTitle(final LocalizedString metaTitle); + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @param metaDescription value to be set + */ + + public void setMetaDescription(final LocalizedString metaDescription); + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @param metaKeywords value to be set + */ + + public void setMetaKeywords(final LocalizedString metaKeywords); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param variants values to be set + */ + + @JsonIgnore + public void setVariants(final ProductVariantTailoring... variants); + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param variants values to be set + */ + + public void setVariants(final List variants); + /** *

true if the ProductTailoring is published.

* @param published value to be set @@ -186,6 +256,10 @@ public static ProductTailoringCreatedMessagePayload of(final ProductTailoringCre instance.setDescription(template.getDescription()); instance.setName(template.getName()); instance.setSlug(template.getSlug()); + instance.setMetaTitle(template.getMetaTitle()); + instance.setMetaDescription(template.getMetaDescription()); + instance.setMetaKeywords(template.getMetaKeywords()); + instance.setVariants(template.getVariants()); instance.setPublished(template.getPublished()); return instance; } @@ -210,6 +284,16 @@ public static ProductTailoringCreatedMessagePayload deepCopy( com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setMetaTitle(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaTitle())); + instance.setMetaDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaDescription())); + instance.setMetaKeywords( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); + instance.setVariants(Optional.ofNullable(template.getVariants()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductVariantTailoring::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); instance.setPublished(template.getPublished()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java index 7da513b45e5..51ae5ec486c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadBuilder.java @@ -45,6 +45,18 @@ public class ProductTailoringCreatedMessagePayloadBuilder implements Builder variants; + private Boolean published; /** @@ -249,6 +261,207 @@ public ProductTailoringCreatedMessagePayloadBuilder slug( return this; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

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

The metaTitle of the Product Tailoring at the time of creation.

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

The metaTitle of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaDescription of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The metaKeywords of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

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

The variants of the Product Tailoring at the time of creation.

+ * @param variants value to be set + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder plusVariants( + @Nullable final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.addAll(Arrays.asList(variants)); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder plusVariants( + Function builder) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder withVariants( + Function builder) { + this.variants = new ArrayList<>(); + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder addVariants( + Function builder) { + return plusVariants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringCreatedMessagePayloadBuilder setVariants( + Function builder) { + return variants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + /** *

true if the ProductTailoring is published.

* @param published value to be set @@ -328,6 +541,46 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ * @return metaTitle + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaTitle() { + return this.metaTitle; + } + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ * @return metaDescription + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaDescription() { + return this.metaDescription; + } + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ * @return metaKeywords + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getMetaKeywords() { + return this.metaKeywords; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ * @return variants + */ + + @Nullable + public java.util.List getVariants() { + return this.variants; + } + /** *

true if the ProductTailoring is published.

* @return published @@ -346,7 +599,7 @@ public ProductTailoringCreatedMessagePayload build() { Objects.requireNonNull(product, ProductTailoringCreatedMessagePayload.class + ": product is missing"); Objects.requireNonNull(published, ProductTailoringCreatedMessagePayload.class + ": published is missing"); return new ProductTailoringCreatedMessagePayloadImpl(key, store, productKey, product, description, name, slug, - published); + metaTitle, metaDescription, metaKeywords, variants, published); } /** @@ -355,7 +608,7 @@ public ProductTailoringCreatedMessagePayload build() { */ public ProductTailoringCreatedMessagePayload buildUnchecked() { return new ProductTailoringCreatedMessagePayloadImpl(key, store, productKey, product, description, name, slug, - published); + metaTitle, metaDescription, metaKeywords, variants, published); } /** @@ -381,6 +634,10 @@ public static ProductTailoringCreatedMessagePayloadBuilder of( builder.description = template.getDescription(); builder.name = template.getName(); builder.slug = template.getSlug(); + builder.metaTitle = template.getMetaTitle(); + builder.metaDescription = template.getMetaDescription(); + builder.metaKeywords = template.getMetaKeywords(); + builder.variants = template.getVariants(); builder.published = template.getPublished(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java index 20cae1a91eb..02739275aae 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadImpl.java @@ -38,6 +38,14 @@ public class ProductTailoringCreatedMessagePayloadImpl implements ProductTailori private com.commercetools.api.models.common.LocalizedString slug; + private com.commercetools.api.models.common.LocalizedString metaTitle; + + private com.commercetools.api.models.common.LocalizedString metaDescription; + + private com.commercetools.api.models.common.LocalizedString metaKeywords; + + private java.util.List variants; + private Boolean published; /** @@ -51,6 +59,10 @@ public class ProductTailoringCreatedMessagePayloadImpl implements ProductTailori @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("metaTitle") final com.commercetools.api.models.common.LocalizedString metaTitle, + @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, + @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, + @JsonProperty("variants") final java.util.List variants, @JsonProperty("published") final Boolean published) { this.key = key; this.store = store; @@ -59,6 +71,10 @@ public class ProductTailoringCreatedMessagePayloadImpl implements ProductTailori this.description = description; this.name = name; this.slug = slug; + this.metaTitle = metaTitle; + this.metaDescription = metaDescription; + this.metaKeywords = metaKeywords; + this.variants = variants; this.published = published; this.type = PRODUCT_TAILORING_CREATED; } @@ -134,6 +150,38 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

The metaTitle of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaTitle() { + return this.metaTitle; + } + + /** + *

The metaDescription of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaDescription() { + return this.metaDescription; + } + + /** + *

The metaKeywords of the Product Tailoring at the time of creation.

+ */ + + public com.commercetools.api.models.common.LocalizedString getMetaKeywords() { + return this.metaKeywords; + } + + /** + *

The variants of the Product Tailoring at the time of creation.

+ */ + + public java.util.List getVariants() { + return this.variants; + } + /** *

true if the ProductTailoring is published.

*/ @@ -170,6 +218,27 @@ public void setSlug(final com.commercetools.api.models.common.LocalizedString sl this.slug = slug; } + public void setMetaTitle(final com.commercetools.api.models.common.LocalizedString metaTitle) { + this.metaTitle = metaTitle; + } + + public void setMetaDescription(final com.commercetools.api.models.common.LocalizedString metaDescription) { + this.metaDescription = metaDescription; + } + + public void setMetaKeywords(final com.commercetools.api.models.common.LocalizedString metaKeywords) { + this.metaKeywords = metaKeywords; + } + + public void setVariants(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + this.variants = new ArrayList<>(Arrays.asList(variants)); + } + + public void setVariants( + final java.util.List variants) { + this.variants = variants; + } + public void setPublished(final Boolean published) { this.published = published; } @@ -192,6 +261,10 @@ public boolean equals(Object o) { .append(description, that.description) .append(name, that.name) .append(slug, that.slug) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(variants, that.variants) .append(published, that.published) .append(type, that.type) .append(key, that.key) @@ -201,6 +274,10 @@ public boolean equals(Object o) { .append(description, that.description) .append(name, that.name) .append(slug, that.slug) + .append(metaTitle, that.metaTitle) + .append(metaDescription, that.metaDescription) + .append(metaKeywords, that.metaKeywords) + .append(variants, that.variants) .append(published, that.published) .isEquals(); } @@ -215,6 +292,10 @@ public int hashCode() { .append(description) .append(name) .append(slug) + .append(metaTitle) + .append(metaDescription) + .append(metaKeywords) + .append(variants) .append(published) .toHashCode(); } @@ -229,6 +310,10 @@ public String toString() { .append("description", description) .append("name", name) .append("slug", slug) + .append("metaTitle", metaTitle) + .append("metaDescription", metaDescription) + .append("metaKeywords", metaKeywords) + .append("variants", variants) .append("published", published) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessage.java new file mode 100644 index 00000000000..9afcea2eb54 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessage.java @@ -0,0 +1,235 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Image; +import com.commercetools.api.models.product.ProductReference; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Add External Image update action or after a successful Upload Product Tailoring image request.

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

+ *     ProductTailoringImageAddedMessage productTailoringImageAddedMessage = ProductTailoringImageAddedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringImageAddedMessageImpl.class) +public interface ProductTailoringImageAddedMessage extends Message { + + /** + * discriminator value for ProductTailoringImageAddedMessage + */ + String PRODUCT_TAILORING_IMAGE_ADDED = "ProductTailoringImageAdded"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the tailored Product.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the tailored ProductVariant.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Image that was added.

+ * @return image + */ + @NotNull + @Valid + @JsonProperty("image") + public Image getImage(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the tailored ProductVariant.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Image that was added.

+ * @param image value to be set + */ + + public void setImage(final Image image); + + /** + * factory method + * @return instance of ProductTailoringImageAddedMessage + */ + public static ProductTailoringImageAddedMessage of() { + return new ProductTailoringImageAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringImageAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringImageAddedMessage of(final ProductTailoringImageAddedMessage template) { + ProductTailoringImageAddedMessageImpl instance = new ProductTailoringImageAddedMessageImpl(); + 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()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setImage(template.getImage()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringImageAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringImageAddedMessage deepCopy( + @Nullable final ProductTailoringImageAddedMessage template) { + if (template == null) { + return null; + } + ProductTailoringImageAddedMessageImpl instance = new ProductTailoringImageAddedMessageImpl(); + 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())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setImage(com.commercetools.api.models.common.Image.deepCopy(template.getImage())); + return instance; + } + + /** + * builder factory method for ProductTailoringImageAddedMessage + * @return builder + */ + public static ProductTailoringImageAddedMessageBuilder builder() { + return ProductTailoringImageAddedMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringImageAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImageAddedMessageBuilder builder(final ProductTailoringImageAddedMessage template) { + return ProductTailoringImageAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringImageAddedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageBuilder.java new file mode 100644 index 00000000000..f50f52116a9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageBuilder.java @@ -0,0 +1,605 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringImageAddedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringImageAddedMessage productTailoringImageAddedMessage = ProductTailoringImageAddedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImageAddedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.common.Image image; + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

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

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

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

+ * @param resource value to be set + * @return Builder + */ + + public ProductTailoringImageAddedMessageBuilder 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 ProductTailoringImageAddedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringImageAddedMessageBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductTailoringImageAddedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + * @return Builder + */ + + public ProductTailoringImageAddedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the tailored ProductVariant.

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

Image that was added.

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

Image that was added.

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

Image that was added.

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

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored ProductVariant.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Image that was added.

+ * @return image + */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + /** + * builds ProductTailoringImageAddedMessage with checking for non-null required values + * @return ProductTailoringImageAddedMessage + */ + public ProductTailoringImageAddedMessage build() { + Objects.requireNonNull(id, ProductTailoringImageAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringImageAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringImageAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringImageAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringImageAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringImageAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductTailoringImageAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringImageAddedMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringImageAddedMessage.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductTailoringImageAddedMessage.class + ": variantId is missing"); + Objects.requireNonNull(image, ProductTailoringImageAddedMessage.class + ": image is missing"); + return new ProductTailoringImageAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, image); + } + + /** + * builds ProductTailoringImageAddedMessage without checking for non-null required values + * @return ProductTailoringImageAddedMessage + */ + public ProductTailoringImageAddedMessage buildUnchecked() { + return new ProductTailoringImageAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, image); + } + + /** + * factory method for an instance of ProductTailoringImageAddedMessageBuilder + * @return builder + */ + public static ProductTailoringImageAddedMessageBuilder of() { + return new ProductTailoringImageAddedMessageBuilder(); + } + + /** + * create builder for ProductTailoringImageAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImageAddedMessageBuilder of(final ProductTailoringImageAddedMessage template) { + ProductTailoringImageAddedMessageBuilder builder = new ProductTailoringImageAddedMessageBuilder(); + 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(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.image = template.getImage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageImpl.java new file mode 100644 index 00000000000..522fe242887 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageImpl.java @@ -0,0 +1,377 @@ + +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 External Image update action or after a successful Upload Product Tailoring image request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImageAddedMessageImpl implements ProductTailoringImageAddedMessage, 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; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.common.Image image; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringImageAddedMessageImpl(@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, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("image") final com.commercetools.api.models.common.Image image) { + 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.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.image = image; + this.type = PRODUCT_TAILORING_IMAGE_ADDED; + } + + /** + * create empty instance + */ + public ProductTailoringImageAddedMessageImpl() { + this.type = PRODUCT_TAILORING_IMAGE_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.

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored ProductVariant.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Image that was added.

+ */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + 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; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setImage(final com.commercetools.api.models.common.Image image) { + this.image = image; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringImageAddedMessageImpl that = (ProductTailoringImageAddedMessageImpl) 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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(image, that.image) + .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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(image, that.image) + .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) + .append(productKey) + .append(product) + .append(variantId) + .append(image) + .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) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("image", image) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayload.java new file mode 100644 index 00000000000..f98359efd33 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayload.java @@ -0,0 +1,208 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Image; +import com.commercetools.api.models.product.ProductReference; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Add External Image update action or after a successful Upload Product Tailoring image request.

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

+ *     ProductTailoringImageAddedMessagePayload productTailoringImageAddedMessagePayload = ProductTailoringImageAddedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringImageAddedMessagePayloadImpl.class) +public interface ProductTailoringImageAddedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringImageAddedMessagePayload + */ + String PRODUCT_TAILORING_IMAGE_ADDED = "ProductTailoringImageAdded"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the tailored Product.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the tailored ProductVariant.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Image that was added.

+ * @return image + */ + @NotNull + @Valid + @JsonProperty("image") + public Image getImage(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the tailored ProductVariant.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Image that was added.

+ * @param image value to be set + */ + + public void setImage(final Image image); + + /** + * factory method + * @return instance of ProductTailoringImageAddedMessagePayload + */ + public static ProductTailoringImageAddedMessagePayload of() { + return new ProductTailoringImageAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringImageAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringImageAddedMessagePayload of(final ProductTailoringImageAddedMessagePayload template) { + ProductTailoringImageAddedMessagePayloadImpl instance = new ProductTailoringImageAddedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setImage(template.getImage()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringImageAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringImageAddedMessagePayload deepCopy( + @Nullable final ProductTailoringImageAddedMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringImageAddedMessagePayloadImpl instance = new ProductTailoringImageAddedMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setImage(com.commercetools.api.models.common.Image.deepCopy(template.getImage())); + return instance; + } + + /** + * builder factory method for ProductTailoringImageAddedMessagePayload + * @return builder + */ + public static ProductTailoringImageAddedMessagePayloadBuilder builder() { + return ProductTailoringImageAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringImageAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImageAddedMessagePayloadBuilder builder( + final ProductTailoringImageAddedMessagePayload template) { + return ProductTailoringImageAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringImageAddedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadBuilder.java new file mode 100644 index 00000000000..ccfa84ac8bf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadBuilder.java @@ -0,0 +1,262 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringImageAddedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringImageAddedMessagePayload productTailoringImageAddedMessagePayload = ProductTailoringImageAddedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImageAddedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.common.Image image; + + /** + *

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringImageAddedMessagePayloadBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductTailoringImageAddedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + * @return Builder + */ + + public ProductTailoringImageAddedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the tailored ProductVariant.

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

Image that was added.

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

Image that was added.

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

Image that was added.

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

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored ProductVariant.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Image that was added.

+ * @return image + */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + /** + * builds ProductTailoringImageAddedMessagePayload with checking for non-null required values + * @return ProductTailoringImageAddedMessagePayload + */ + public ProductTailoringImageAddedMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringImageAddedMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringImageAddedMessagePayload.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductTailoringImageAddedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(image, ProductTailoringImageAddedMessagePayload.class + ": image is missing"); + return new ProductTailoringImageAddedMessagePayloadImpl(store, productKey, product, variantId, image); + } + + /** + * builds ProductTailoringImageAddedMessagePayload without checking for non-null required values + * @return ProductTailoringImageAddedMessagePayload + */ + public ProductTailoringImageAddedMessagePayload buildUnchecked() { + return new ProductTailoringImageAddedMessagePayloadImpl(store, productKey, product, variantId, image); + } + + /** + * factory method for an instance of ProductTailoringImageAddedMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringImageAddedMessagePayloadBuilder of() { + return new ProductTailoringImageAddedMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringImageAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImageAddedMessagePayloadBuilder of( + final ProductTailoringImageAddedMessagePayload template) { + ProductTailoringImageAddedMessagePayloadBuilder builder = new ProductTailoringImageAddedMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.image = template.getImage(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadImpl.java new file mode 100644 index 00000000000..c9d012254a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadImpl.java @@ -0,0 +1,178 @@ + +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 External Image update action or after a successful Upload Product Tailoring image request.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImageAddedMessagePayloadImpl + implements ProductTailoringImageAddedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.common.Image image; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringImageAddedMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("image") final com.commercetools.api.models.common.Image image) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.image = image; + this.type = PRODUCT_TAILORING_IMAGE_ADDED; + } + + /** + * create empty instance + */ + public ProductTailoringImageAddedMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_IMAGE_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored ProductVariant.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Image that was added.

+ */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setImage(final com.commercetools.api.models.common.Image image) { + this.image = image; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringImageAddedMessagePayloadImpl that = (ProductTailoringImageAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(image, that.image) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(image, that.image) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(variantId) + .append(image) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("image", image) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessage.java new file mode 100644 index 00000000000..40d4c727a0c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessage.java @@ -0,0 +1,274 @@ + +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 com.commercetools.api.models.common.Image; +import com.commercetools.api.models.product.ProductReference; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Images update action.

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

+ *     ProductTailoringImagesSetMessage productTailoringImagesSetMessage = ProductTailoringImagesSetMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringImagesSetMessageImpl.class) +public interface ProductTailoringImagesSetMessage extends Message { + + /** + * discriminator value for ProductTailoringImagesSetMessage + */ + String PRODUCT_TAILORING_IMAGES_SET = "ProductTailoringImagesSet"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the tailored Product Variant.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @return oldImages + */ + @Valid + @JsonProperty("oldImages") + public List getOldImages(); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the tailored Product Variant.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages values to be set + */ + + @JsonIgnore + public void setOldImages(final Image... oldImages); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages values to be set + */ + + public void setOldImages(final List oldImages); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + * factory method + * @return instance of ProductTailoringImagesSetMessage + */ + public static ProductTailoringImagesSetMessage of() { + return new ProductTailoringImagesSetMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringImagesSetMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringImagesSetMessage of(final ProductTailoringImagesSetMessage template) { + ProductTailoringImagesSetMessageImpl instance = new ProductTailoringImagesSetMessageImpl(); + 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()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setOldImages(template.getOldImages()); + instance.setImages(template.getImages()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringImagesSetMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringImagesSetMessage deepCopy(@Nullable final ProductTailoringImagesSetMessage template) { + if (template == null) { + return null; + } + ProductTailoringImagesSetMessageImpl instance = new ProductTailoringImagesSetMessageImpl(); + 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())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setOldImages(Optional.ofNullable(template.getOldImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringImagesSetMessage + * @return builder + */ + public static ProductTailoringImagesSetMessageBuilder builder() { + return ProductTailoringImagesSetMessageBuilder.of(); + } + + /** + * create builder for ProductTailoringImagesSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImagesSetMessageBuilder builder(final ProductTailoringImagesSetMessage template) { + return ProductTailoringImagesSetMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringImagesSetMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageBuilder.java new file mode 100644 index 00000000000..714887bc0be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageBuilder.java @@ -0,0 +1,762 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringImagesSetMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringImagesSetMessage productTailoringImagesSetMessage = ProductTailoringImagesSetMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImagesSetMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + @Nullable + private java.util.List oldImages; + + @Nullable + private java.util.List images; + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

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

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

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

+ * @param resource value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder 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 ProductTailoringImagesSetMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the tailored Product Variant.

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

Images on the tailored Product Variant before the Set Images update action.

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

Images on the tailored Product Variant before the Set Images update action.

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

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder plusOldImages( + @Nullable final com.commercetools.api.models.common.Image... oldImages) { + if (this.oldImages == null) { + this.oldImages = new ArrayList<>(); + } + this.oldImages.addAll(Arrays.asList(oldImages)); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder plusOldImages( + Function builder) { + if (this.oldImages == null) { + this.oldImages = new ArrayList<>(); + } + this.oldImages.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder withOldImages( + Function builder) { + this.oldImages = new ArrayList<>(); + this.oldImages.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder addOldImages( + Function builder) { + return plusOldImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder setOldImages( + Function builder) { + return oldImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

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

Images on the tailored Product Variant after the Set Images update action.

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

Images on the tailored Product Variant after the Set Images update action.

+ * @param images value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder plusImages( + @Nullable final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessageBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored Product Variant.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @return oldImages + */ + + @Nullable + public java.util.List getOldImages() { + return this.oldImages; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + * builds ProductTailoringImagesSetMessage with checking for non-null required values + * @return ProductTailoringImagesSetMessage + */ + public ProductTailoringImagesSetMessage build() { + Objects.requireNonNull(id, ProductTailoringImagesSetMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductTailoringImagesSetMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductTailoringImagesSetMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, ProductTailoringImagesSetMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, ProductTailoringImagesSetMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductTailoringImagesSetMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductTailoringImagesSetMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductTailoringImagesSetMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringImagesSetMessage.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductTailoringImagesSetMessage.class + ": variantId is missing"); + return new ProductTailoringImagesSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, oldImages, images); + } + + /** + * builds ProductTailoringImagesSetMessage without checking for non-null required values + * @return ProductTailoringImagesSetMessage + */ + public ProductTailoringImagesSetMessage buildUnchecked() { + return new ProductTailoringImagesSetMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, oldImages, images); + } + + /** + * factory method for an instance of ProductTailoringImagesSetMessageBuilder + * @return builder + */ + public static ProductTailoringImagesSetMessageBuilder of() { + return new ProductTailoringImagesSetMessageBuilder(); + } + + /** + * create builder for ProductTailoringImagesSetMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImagesSetMessageBuilder of(final ProductTailoringImagesSetMessage template) { + ProductTailoringImagesSetMessageBuilder builder = new ProductTailoringImagesSetMessageBuilder(); + 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(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.oldImages = template.getOldImages(); + builder.images = template.getImages(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageImpl.java new file mode 100644 index 00000000000..e804878756e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageImpl.java @@ -0,0 +1,405 @@ + +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 Set Images update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImagesSetMessageImpl implements ProductTailoringImagesSetMessage, 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; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private java.util.List oldImages; + + private java.util.List images; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringImagesSetMessageImpl(@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, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("oldImages") final java.util.List oldImages, + @JsonProperty("images") final java.util.List images) { + 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.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.oldImages = oldImages; + this.images = images; + this.type = PRODUCT_TAILORING_IMAGES_SET; + } + + /** + * create empty instance + */ + public ProductTailoringImagesSetMessageImpl() { + this.type = PRODUCT_TAILORING_IMAGES_SET; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored Product Variant.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ */ + + public java.util.List getOldImages() { + return this.oldImages; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ */ + + public java.util.List getImages() { + return this.images; + } + + 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; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setOldImages(final com.commercetools.api.models.common.Image... oldImages) { + this.oldImages = new ArrayList<>(Arrays.asList(oldImages)); + } + + public void setOldImages(final java.util.List oldImages) { + this.oldImages = oldImages; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringImagesSetMessageImpl that = (ProductTailoringImagesSetMessageImpl) 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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(oldImages, that.oldImages) + .append(images, that.images) + .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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(oldImages, that.oldImages) + .append(images, that.images) + .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) + .append(productKey) + .append(product) + .append(variantId) + .append(oldImages) + .append(images) + .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) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("oldImages", oldImages) + .append("images", images) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayload.java new file mode 100644 index 00000000000..fef3ddc3722 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayload.java @@ -0,0 +1,248 @@ + +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 com.commercetools.api.models.common.Image; +import com.commercetools.api.models.product.ProductReference; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Set Images update action.

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

+ *     ProductTailoringImagesSetMessagePayload productTailoringImagesSetMessagePayload = ProductTailoringImagesSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringImagesSetMessagePayloadImpl.class) +public interface ProductTailoringImagesSetMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductTailoringImagesSetMessagePayload + */ + String PRODUCT_TAILORING_IMAGES_SET = "ProductTailoringImagesSet"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the tailored Product Variant.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @return oldImages + */ + @Valid + @JsonProperty("oldImages") + public List getOldImages(); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the tailored Product Variant.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages values to be set + */ + + @JsonIgnore + public void setOldImages(final Image... oldImages); + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages values to be set + */ + + public void setOldImages(final List oldImages); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + * factory method + * @return instance of ProductTailoringImagesSetMessagePayload + */ + public static ProductTailoringImagesSetMessagePayload of() { + return new ProductTailoringImagesSetMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringImagesSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringImagesSetMessagePayload of(final ProductTailoringImagesSetMessagePayload template) { + ProductTailoringImagesSetMessagePayloadImpl instance = new ProductTailoringImagesSetMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setOldImages(template.getOldImages()); + instance.setImages(template.getImages()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringImagesSetMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringImagesSetMessagePayload deepCopy( + @Nullable final ProductTailoringImagesSetMessagePayload template) { + if (template == null) { + return null; + } + ProductTailoringImagesSetMessagePayloadImpl instance = new ProductTailoringImagesSetMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setOldImages(Optional.ofNullable(template.getOldImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringImagesSetMessagePayload + * @return builder + */ + public static ProductTailoringImagesSetMessagePayloadBuilder builder() { + return ProductTailoringImagesSetMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductTailoringImagesSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImagesSetMessagePayloadBuilder builder( + final ProductTailoringImagesSetMessagePayload template) { + return ProductTailoringImagesSetMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringImagesSetMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadBuilder.java new file mode 100644 index 00000000000..5269225e3dd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadBuilder.java @@ -0,0 +1,420 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringImagesSetMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringImagesSetMessagePayload productTailoringImagesSetMessagePayload = ProductTailoringImagesSetMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImagesSetMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + @Nullable + private java.util.List oldImages; + + @Nullable + private java.util.List images; + + /** + *

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the tailored Product Variant.

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

Images on the tailored Product Variant before the Set Images update action.

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

Images on the tailored Product Variant before the Set Images update action.

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

Images on the tailored Product Variant before the Set Images update action.

+ * @param oldImages value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder plusOldImages( + @Nullable final com.commercetools.api.models.common.Image... oldImages) { + if (this.oldImages == null) { + this.oldImages = new ArrayList<>(); + } + this.oldImages.addAll(Arrays.asList(oldImages)); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder plusOldImages( + Function builder) { + if (this.oldImages == null) { + this.oldImages = new ArrayList<>(); + } + this.oldImages.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder withOldImages( + Function builder) { + this.oldImages = new ArrayList<>(); + this.oldImages.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder addOldImages( + Function builder) { + return plusOldImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @param builder function to build the oldImages value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder setOldImages( + Function builder) { + return oldImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

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

Images on the tailored Product Variant after the Set Images update action.

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

Images on the tailored Product Variant after the Set Images update action.

+ * @param images value to be set + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder plusImages( + @Nullable final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringImagesSetMessagePayloadBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored Product Variant.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ * @return oldImages + */ + + @Nullable + public java.util.List getOldImages() { + return this.oldImages; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + * builds ProductTailoringImagesSetMessagePayload with checking for non-null required values + * @return ProductTailoringImagesSetMessagePayload + */ + public ProductTailoringImagesSetMessagePayload build() { + Objects.requireNonNull(store, ProductTailoringImagesSetMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductTailoringImagesSetMessagePayload.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductTailoringImagesSetMessagePayload.class + ": variantId is missing"); + return new ProductTailoringImagesSetMessagePayloadImpl(store, productKey, product, variantId, oldImages, + images); + } + + /** + * builds ProductTailoringImagesSetMessagePayload without checking for non-null required values + * @return ProductTailoringImagesSetMessagePayload + */ + public ProductTailoringImagesSetMessagePayload buildUnchecked() { + return new ProductTailoringImagesSetMessagePayloadImpl(store, productKey, product, variantId, oldImages, + images); + } + + /** + * factory method for an instance of ProductTailoringImagesSetMessagePayloadBuilder + * @return builder + */ + public static ProductTailoringImagesSetMessagePayloadBuilder of() { + return new ProductTailoringImagesSetMessagePayloadBuilder(); + } + + /** + * create builder for ProductTailoringImagesSetMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringImagesSetMessagePayloadBuilder of( + final ProductTailoringImagesSetMessagePayload template) { + ProductTailoringImagesSetMessagePayloadBuilder builder = new ProductTailoringImagesSetMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.oldImages = template.getOldImages(); + builder.images = template.getImages(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadImpl.java new file mode 100644 index 00000000000..bbbf6df72a5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadImpl.java @@ -0,0 +1,205 @@ + +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 Set Images update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringImagesSetMessagePayloadImpl implements ProductTailoringImagesSetMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private java.util.List oldImages; + + private java.util.List images; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringImagesSetMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("oldImages") final java.util.List oldImages, + @JsonProperty("images") final java.util.List images) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.oldImages = oldImages; + this.images = images; + this.type = PRODUCT_TAILORING_IMAGES_SET; + } + + /** + * create empty instance + */ + public ProductTailoringImagesSetMessagePayloadImpl() { + this.type = PRODUCT_TAILORING_IMAGES_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the tailored Product Variant.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

Images on the tailored Product Variant before the Set Images update action.

+ */ + + public java.util.List getOldImages() { + return this.oldImages; + } + + /** + *

Images on the tailored Product Variant after the Set Images update action.

+ */ + + public java.util.List getImages() { + return this.images; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setOldImages(final com.commercetools.api.models.common.Image... oldImages) { + this.oldImages = new ArrayList<>(Arrays.asList(oldImages)); + } + + public void setOldImages(final java.util.List oldImages) { + this.oldImages = oldImages; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringImagesSetMessagePayloadImpl that = (ProductTailoringImagesSetMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(oldImages, that.oldImages) + .append(images, that.images) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(oldImages, that.oldImages) + .append(images, that.images) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(variantId) + .append(oldImages) + .append(images) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("oldImages", oldImages) + .append("images", images) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessage.java new file mode 100644 index 00000000000..195db0957a1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessage.java @@ -0,0 +1,237 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Add ProductVariant Tailoring update action.

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

+ *     ProductVariantTailoringAddedMessage productVariantTailoringAddedMessage = ProductVariantTailoringAddedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantTailoringAddedMessageImpl.class) +public interface ProductVariantTailoringAddedMessage extends Message { + + /** + * discriminator value for ProductVariantTailoringAddedMessage + */ + String PRODUCT_VARIANT_TAILORING_ADDED = "ProductVariantTailoringAdded"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the tailored Product.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @return variant + */ + @NotNull + @Valid + @JsonProperty("variant") + public ProductVariantTailoring getVariant(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param variant value to be set + */ + + public void setVariant(final ProductVariantTailoring variant); + + /** + * factory method + * @return instance of ProductVariantTailoringAddedMessage + */ + public static ProductVariantTailoringAddedMessage of() { + return new ProductVariantTailoringAddedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoringAddedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoringAddedMessage of(final ProductVariantTailoringAddedMessage template) { + ProductVariantTailoringAddedMessageImpl instance = new ProductVariantTailoringAddedMessageImpl(); + 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()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(template.getVariant()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoringAddedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoringAddedMessage deepCopy( + @Nullable final ProductVariantTailoringAddedMessage template) { + if (template == null) { + return null; + } + ProductVariantTailoringAddedMessageImpl instance = new ProductVariantTailoringAddedMessageImpl(); + 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())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setVariant( + com.commercetools.api.models.product_tailoring.ProductVariantTailoring.deepCopy(template.getVariant())); + return instance; + } + + /** + * builder factory method for ProductVariantTailoringAddedMessage + * @return builder + */ + public static ProductVariantTailoringAddedMessageBuilder builder() { + return ProductVariantTailoringAddedMessageBuilder.of(); + } + + /** + * create builder for ProductVariantTailoringAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringAddedMessageBuilder builder( + final ProductVariantTailoringAddedMessage template) { + return ProductVariantTailoringAddedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoringAddedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageBuilder.java new file mode 100644 index 00000000000..55775a5e677 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageBuilder.java @@ -0,0 +1,610 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringAddedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoringAddedMessage productVariantTailoringAddedMessage = ProductVariantTailoringAddedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringAddedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

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

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

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

+ * @param resource value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder 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 ProductVariantTailoringAddedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the ProductVariant added to the Tailoring.

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

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()) + .build(); + return this; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder withVariant( + Function builder) { + this.variant = builder + .apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()); + return this; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param variant value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessageBuilder variant( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + return this; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @return variant + */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + /** + * builds ProductVariantTailoringAddedMessage with checking for non-null required values + * @return ProductVariantTailoringAddedMessage + */ + public ProductVariantTailoringAddedMessage build() { + Objects.requireNonNull(id, ProductVariantTailoringAddedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductVariantTailoringAddedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductVariantTailoringAddedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductVariantTailoringAddedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductVariantTailoringAddedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductVariantTailoringAddedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductVariantTailoringAddedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductVariantTailoringAddedMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductVariantTailoringAddedMessage.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductVariantTailoringAddedMessage.class + ": variantId is missing"); + Objects.requireNonNull(variant, ProductVariantTailoringAddedMessage.class + ": variant is missing"); + return new ProductVariantTailoringAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, variant); + } + + /** + * builds ProductVariantTailoringAddedMessage without checking for non-null required values + * @return ProductVariantTailoringAddedMessage + */ + public ProductVariantTailoringAddedMessage buildUnchecked() { + return new ProductVariantTailoringAddedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, variant); + } + + /** + * factory method for an instance of ProductVariantTailoringAddedMessageBuilder + * @return builder + */ + public static ProductVariantTailoringAddedMessageBuilder of() { + return new ProductVariantTailoringAddedMessageBuilder(); + } + + /** + * create builder for ProductVariantTailoringAddedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringAddedMessageBuilder of(final ProductVariantTailoringAddedMessage template) { + ProductVariantTailoringAddedMessageBuilder builder = new ProductVariantTailoringAddedMessageBuilder(); + 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(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.variant = template.getVariant(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageImpl.java new file mode 100644 index 00000000000..064c7305f9a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageImpl.java @@ -0,0 +1,377 @@ + +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 ProductVariant Tailoring update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringAddedMessageImpl implements ProductVariantTailoringAddedMessage, 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; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringAddedMessageImpl(@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, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("variant") final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + 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.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.variant = variant; + this.type = PRODUCT_VARIANT_TAILORING_ADDED; + } + + /** + * create empty instance + */ + public ProductVariantTailoringAddedMessageImpl() { + this.type = PRODUCT_VARIANT_TAILORING_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.

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant added to the Tailoring.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + 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; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setVariant(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringAddedMessageImpl that = (ProductVariantTailoringAddedMessageImpl) 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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .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) + .append(productKey) + .append(product) + .append(variantId) + .append(variant) + .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) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("variant", variant) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayload.java new file mode 100644 index 00000000000..ec56c95ca51 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayload.java @@ -0,0 +1,210 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Add ProductVariant Tailoring update action.

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

+ *     ProductVariantTailoringAddedMessagePayload productVariantTailoringAddedMessagePayload = ProductVariantTailoringAddedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantTailoringAddedMessagePayloadImpl.class) +public interface ProductVariantTailoringAddedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductVariantTailoringAddedMessagePayload + */ + String PRODUCT_VARIANT_TAILORING_ADDED = "ProductVariantTailoringAdded"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the tailored Product.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @return variant + */ + @NotNull + @Valid + @JsonProperty("variant") + public ProductVariantTailoring getVariant(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param variant value to be set + */ + + public void setVariant(final ProductVariantTailoring variant); + + /** + * factory method + * @return instance of ProductVariantTailoringAddedMessagePayload + */ + public static ProductVariantTailoringAddedMessagePayload of() { + return new ProductVariantTailoringAddedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoringAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoringAddedMessagePayload of( + final ProductVariantTailoringAddedMessagePayload template) { + ProductVariantTailoringAddedMessagePayloadImpl instance = new ProductVariantTailoringAddedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(template.getVariant()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoringAddedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoringAddedMessagePayload deepCopy( + @Nullable final ProductVariantTailoringAddedMessagePayload template) { + if (template == null) { + return null; + } + ProductVariantTailoringAddedMessagePayloadImpl instance = new ProductVariantTailoringAddedMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setVariant( + com.commercetools.api.models.product_tailoring.ProductVariantTailoring.deepCopy(template.getVariant())); + return instance; + } + + /** + * builder factory method for ProductVariantTailoringAddedMessagePayload + * @return builder + */ + public static ProductVariantTailoringAddedMessagePayloadBuilder builder() { + return ProductVariantTailoringAddedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductVariantTailoringAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringAddedMessagePayloadBuilder builder( + final ProductVariantTailoringAddedMessagePayload template) { + return ProductVariantTailoringAddedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoringAddedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadBuilder.java new file mode 100644 index 00000000000..da495bcd139 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadBuilder.java @@ -0,0 +1,264 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringAddedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoringAddedMessagePayload productVariantTailoringAddedMessagePayload = ProductVariantTailoringAddedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringAddedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + *

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

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

Reference to the tailored Product.

+ * @param product value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the ProductVariant added to the Tailoring.

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

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()) + .build(); + return this; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder withVariant( + Function builder) { + this.variant = builder + .apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()); + return this; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @param variant value to be set + * @return Builder + */ + + public ProductVariantTailoringAddedMessagePayloadBuilder variant( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant added to the Tailoring.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ * @return variant + */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + /** + * builds ProductVariantTailoringAddedMessagePayload with checking for non-null required values + * @return ProductVariantTailoringAddedMessagePayload + */ + public ProductVariantTailoringAddedMessagePayload build() { + Objects.requireNonNull(store, ProductVariantTailoringAddedMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductVariantTailoringAddedMessagePayload.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductVariantTailoringAddedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(variant, ProductVariantTailoringAddedMessagePayload.class + ": variant is missing"); + return new ProductVariantTailoringAddedMessagePayloadImpl(store, productKey, product, variantId, variant); + } + + /** + * builds ProductVariantTailoringAddedMessagePayload without checking for non-null required values + * @return ProductVariantTailoringAddedMessagePayload + */ + public ProductVariantTailoringAddedMessagePayload buildUnchecked() { + return new ProductVariantTailoringAddedMessagePayloadImpl(store, productKey, product, variantId, variant); + } + + /** + * factory method for an instance of ProductVariantTailoringAddedMessagePayloadBuilder + * @return builder + */ + public static ProductVariantTailoringAddedMessagePayloadBuilder of() { + return new ProductVariantTailoringAddedMessagePayloadBuilder(); + } + + /** + * create builder for ProductVariantTailoringAddedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringAddedMessagePayloadBuilder of( + final ProductVariantTailoringAddedMessagePayload template) { + ProductVariantTailoringAddedMessagePayloadBuilder builder = new ProductVariantTailoringAddedMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.variant = template.getVariant(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadImpl.java new file mode 100644 index 00000000000..8b7ad2eeeee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadImpl.java @@ -0,0 +1,178 @@ + +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 ProductVariant Tailoring update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringAddedMessagePayloadImpl + implements ProductVariantTailoringAddedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringAddedMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("variant") final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.variant = variant; + this.type = PRODUCT_VARIANT_TAILORING_ADDED; + } + + /** + * create empty instance + */ + public ProductVariantTailoringAddedMessagePayloadImpl() { + this.type = PRODUCT_VARIANT_TAILORING_ADDED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the tailored Product.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant added to the Tailoring.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was added to the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setVariant(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringAddedMessagePayloadImpl that = (ProductVariantTailoringAddedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(variantId) + .append(variant) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("variant", variant) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessage.java new file mode 100644 index 00000000000..35f1c32a1cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessage.java @@ -0,0 +1,237 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Remove ProductVariant Tailoring update action.

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

+ *     ProductVariantTailoringRemovedMessage productVariantTailoringRemovedMessage = ProductVariantTailoringRemovedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantTailoringRemovedMessageImpl.class) +public interface ProductVariantTailoringRemovedMessage extends Message { + + /** + * discriminator value for ProductVariantTailoringRemovedMessage + */ + String PRODUCT_VARIANT_TAILORING_REMOVED = "ProductVariantTailoringRemoved"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @return variant + */ + @NotNull + @Valid + @JsonProperty("variant") + public ProductVariantTailoring getVariant(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param variant value to be set + */ + + public void setVariant(final ProductVariantTailoring variant); + + /** + * factory method + * @return instance of ProductVariantTailoringRemovedMessage + */ + public static ProductVariantTailoringRemovedMessage of() { + return new ProductVariantTailoringRemovedMessageImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoringRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoringRemovedMessage of(final ProductVariantTailoringRemovedMessage template) { + ProductVariantTailoringRemovedMessageImpl instance = new ProductVariantTailoringRemovedMessageImpl(); + 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()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(template.getVariant()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoringRemovedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoringRemovedMessage deepCopy( + @Nullable final ProductVariantTailoringRemovedMessage template) { + if (template == null) { + return null; + } + ProductVariantTailoringRemovedMessageImpl instance = new ProductVariantTailoringRemovedMessageImpl(); + 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())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setVariant( + com.commercetools.api.models.product_tailoring.ProductVariantTailoring.deepCopy(template.getVariant())); + return instance; + } + + /** + * builder factory method for ProductVariantTailoringRemovedMessage + * @return builder + */ + public static ProductVariantTailoringRemovedMessageBuilder builder() { + return ProductVariantTailoringRemovedMessageBuilder.of(); + } + + /** + * create builder for ProductVariantTailoringRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringRemovedMessageBuilder builder( + final ProductVariantTailoringRemovedMessage template) { + return ProductVariantTailoringRemovedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoringRemovedMessage(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageBuilder.java new file mode 100644 index 00000000000..9c81ee9d94b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageBuilder.java @@ -0,0 +1,611 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringRemovedMessageBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoringRemovedMessage productVariantTailoringRemovedMessage = ProductVariantTailoringRemovedMessage.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)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringRemovedMessageBuilder implements Builder { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + @Nullable + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + @Nullable + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

IDs and references that created the Message.

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

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

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

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

+ * @param resource value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder 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 ProductVariantTailoringRemovedMessageBuilder resource( + Function> builder) { + this.resource = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build(); + return this; + } + + /** + *

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

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

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()) + .build(); + return this; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder withVariant( + Function builder) { + this.variant = builder + .apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()); + return this; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param variant value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessageBuilder variant( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + return this; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

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

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

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @return variant + */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + /** + * builds ProductVariantTailoringRemovedMessage with checking for non-null required values + * @return ProductVariantTailoringRemovedMessage + */ + public ProductVariantTailoringRemovedMessage build() { + Objects.requireNonNull(id, ProductVariantTailoringRemovedMessage.class + ": id is missing"); + Objects.requireNonNull(version, ProductVariantTailoringRemovedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, ProductVariantTailoringRemovedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, + ProductVariantTailoringRemovedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, + ProductVariantTailoringRemovedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, ProductVariantTailoringRemovedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, + ProductVariantTailoringRemovedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(store, ProductVariantTailoringRemovedMessage.class + ": store is missing"); + Objects.requireNonNull(product, ProductVariantTailoringRemovedMessage.class + ": product is missing"); + Objects.requireNonNull(variantId, ProductVariantTailoringRemovedMessage.class + ": variantId is missing"); + Objects.requireNonNull(variant, ProductVariantTailoringRemovedMessage.class + ": variant is missing"); + return new ProductVariantTailoringRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, variant); + } + + /** + * builds ProductVariantTailoringRemovedMessage without checking for non-null required values + * @return ProductVariantTailoringRemovedMessage + */ + public ProductVariantTailoringRemovedMessage buildUnchecked() { + return new ProductVariantTailoringRemovedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, + createdBy, sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, store, productKey, + product, variantId, variant); + } + + /** + * factory method for an instance of ProductVariantTailoringRemovedMessageBuilder + * @return builder + */ + public static ProductVariantTailoringRemovedMessageBuilder of() { + return new ProductVariantTailoringRemovedMessageBuilder(); + } + + /** + * create builder for ProductVariantTailoringRemovedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringRemovedMessageBuilder of( + final ProductVariantTailoringRemovedMessage template) { + ProductVariantTailoringRemovedMessageBuilder builder = new ProductVariantTailoringRemovedMessageBuilder(); + 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(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.variant = template.getVariant(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageImpl.java new file mode 100644 index 00000000000..ef17e933ea9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageImpl.java @@ -0,0 +1,377 @@ + +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 ProductVariant Tailoring update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringRemovedMessageImpl implements ProductVariantTailoringRemovedMessage, 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; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringRemovedMessageImpl(@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, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("variant") final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + 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.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.variant = variant; + this.type = PRODUCT_VARIANT_TAILORING_REMOVED; + } + + /** + * create empty instance + */ + public ProductVariantTailoringRemovedMessageImpl() { + this.type = PRODUCT_VARIANT_TAILORING_REMOVED; + } + + /** + *

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

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

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

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

Date and time (UTC) the Message was generated.

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

Value of createdAt.

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

IDs and references that last modified the Message.

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

IDs and references that created the Message.

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

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

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

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

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

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

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

Message Type of the Message.

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

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

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

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + 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; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setVariant(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringRemovedMessageImpl that = (ProductVariantTailoringRemovedMessageImpl) 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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .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(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .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) + .append(productKey) + .append(product) + .append(variantId) + .append(variant) + .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) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("variant", variant) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayload.java new file mode 100644 index 00000000000..e51eaeb7150 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayload.java @@ -0,0 +1,210 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.product.ProductReference; +import com.commercetools.api.models.product_tailoring.ProductVariantTailoring; +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; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Generated after a successful Remove ProductVariant Tailoring update action.

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

+ *     ProductVariantTailoringRemovedMessagePayload productVariantTailoringRemovedMessagePayload = ProductVariantTailoringRemovedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantTailoringRemovedMessagePayloadImpl.class) +public interface ProductVariantTailoringRemovedMessagePayload extends MessagePayload { + + /** + * discriminator value for ProductVariantTailoringRemovedMessagePayload + */ + String PRODUCT_VARIANT_TAILORING_REMOVED = "ProductVariantTailoringRemoved"; + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + @NotNull + @Valid + @JsonProperty("store") + public StoreKeyReference getStore(); + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @JsonProperty("productKey") + public String getProductKey(); + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + @NotNull + @Valid + @JsonProperty("product") + public ProductReference getProduct(); + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @return variantId + */ + @NotNull + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @return variant + */ + @NotNull + @Valid + @JsonProperty("variant") + public ProductVariantTailoring getVariant(); + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + */ + + public void setStore(final StoreKeyReference store); + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + */ + + public void setProduct(final ProductReference product); + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param variant value to be set + */ + + public void setVariant(final ProductVariantTailoring variant); + + /** + * factory method + * @return instance of ProductVariantTailoringRemovedMessagePayload + */ + public static ProductVariantTailoringRemovedMessagePayload of() { + return new ProductVariantTailoringRemovedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoringRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoringRemovedMessagePayload of( + final ProductVariantTailoringRemovedMessagePayload template) { + ProductVariantTailoringRemovedMessagePayloadImpl instance = new ProductVariantTailoringRemovedMessagePayloadImpl(); + instance.setStore(template.getStore()); + instance.setProductKey(template.getProductKey()); + instance.setProduct(template.getProduct()); + instance.setVariantId(template.getVariantId()); + instance.setVariant(template.getVariant()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoringRemovedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoringRemovedMessagePayload deepCopy( + @Nullable final ProductVariantTailoringRemovedMessagePayload template) { + if (template == null) { + return null; + } + ProductVariantTailoringRemovedMessagePayloadImpl instance = new ProductVariantTailoringRemovedMessagePayloadImpl(); + instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setProductKey(template.getProductKey()); + instance.setProduct(com.commercetools.api.models.product.ProductReference.deepCopy(template.getProduct())); + instance.setVariantId(template.getVariantId()); + instance.setVariant( + com.commercetools.api.models.product_tailoring.ProductVariantTailoring.deepCopy(template.getVariant())); + return instance; + } + + /** + * builder factory method for ProductVariantTailoringRemovedMessagePayload + * @return builder + */ + public static ProductVariantTailoringRemovedMessagePayloadBuilder builder() { + return ProductVariantTailoringRemovedMessagePayloadBuilder.of(); + } + + /** + * create builder for ProductVariantTailoringRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringRemovedMessagePayloadBuilder builder( + final ProductVariantTailoringRemovedMessagePayload template) { + return ProductVariantTailoringRemovedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoringRemovedMessagePayload( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadBuilder.java new file mode 100644 index 00000000000..bd8c8da7ced --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadBuilder.java @@ -0,0 +1,265 @@ + +package com.commercetools.api.models.message; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringRemovedMessagePayloadBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoringRemovedMessagePayload productVariantTailoringRemovedMessagePayload = ProductVariantTailoringRemovedMessagePayload.builder()
+ *             .store(storeBuilder -> storeBuilder)
+ *             .product(productBuilder -> productBuilder)
+ *             .variantId(1)
+ *             .variant(variantBuilder -> variantBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringRemovedMessagePayloadBuilder + implements Builder { + + private com.commercetools.api.models.store.StoreKeyReference store; + + @Nullable + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + *

The Store to which the Product Tailoring belongs.

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

The Store to which the Product Tailoring belongs.

+ * @param builder function to build the store value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder withStore( + Function builder) { + this.store = builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()); + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @param store value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder store( + final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + return this; + } + + /** + *

key of the tailored Product.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

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

Reference to the Product the Product Tailoring belongs to.

+ * @param product value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder product( + final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + return this; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

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

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder variant( + Function builder) { + this.variant = builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()) + .build(); + return this; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param builder function to build the variant value + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder withVariant( + Function builder) { + this.variant = builder + .apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()); + return this; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @param variant value to be set + * @return Builder + */ + + public ProductVariantTailoringRemovedMessagePayloadBuilder variant( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + return this; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ * @return store + */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ * @return productKey + */ + + @Nullable + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ * @return product + */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

+ * @return variantId + */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ * @return variant + */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + /** + * builds ProductVariantTailoringRemovedMessagePayload with checking for non-null required values + * @return ProductVariantTailoringRemovedMessagePayload + */ + public ProductVariantTailoringRemovedMessagePayload build() { + Objects.requireNonNull(store, ProductVariantTailoringRemovedMessagePayload.class + ": store is missing"); + Objects.requireNonNull(product, ProductVariantTailoringRemovedMessagePayload.class + ": product is missing"); + Objects.requireNonNull(variantId, + ProductVariantTailoringRemovedMessagePayload.class + ": variantId is missing"); + Objects.requireNonNull(variant, ProductVariantTailoringRemovedMessagePayload.class + ": variant is missing"); + return new ProductVariantTailoringRemovedMessagePayloadImpl(store, productKey, product, variantId, variant); + } + + /** + * builds ProductVariantTailoringRemovedMessagePayload without checking for non-null required values + * @return ProductVariantTailoringRemovedMessagePayload + */ + public ProductVariantTailoringRemovedMessagePayload buildUnchecked() { + return new ProductVariantTailoringRemovedMessagePayloadImpl(store, productKey, product, variantId, variant); + } + + /** + * factory method for an instance of ProductVariantTailoringRemovedMessagePayloadBuilder + * @return builder + */ + public static ProductVariantTailoringRemovedMessagePayloadBuilder of() { + return new ProductVariantTailoringRemovedMessagePayloadBuilder(); + } + + /** + * create builder for ProductVariantTailoringRemovedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringRemovedMessagePayloadBuilder of( + final ProductVariantTailoringRemovedMessagePayload template) { + ProductVariantTailoringRemovedMessagePayloadBuilder builder = new ProductVariantTailoringRemovedMessagePayloadBuilder(); + builder.store = template.getStore(); + builder.productKey = template.getProductKey(); + builder.product = template.getProduct(); + builder.variantId = template.getVariantId(); + builder.variant = template.getVariant(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadImpl.java new file mode 100644 index 00000000000..d3128a042b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadImpl.java @@ -0,0 +1,178 @@ + +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 ProductVariant Tailoring update action.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringRemovedMessagePayloadImpl + implements ProductVariantTailoringRemovedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.store.StoreKeyReference store; + + private String productKey; + + private com.commercetools.api.models.product.ProductReference product; + + private Long variantId; + + private com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringRemovedMessagePayloadImpl( + @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("productKey") final String productKey, + @JsonProperty("product") final com.commercetools.api.models.product.ProductReference product, + @JsonProperty("variantId") final Long variantId, + @JsonProperty("variant") final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.store = store; + this.productKey = productKey; + this.product = product; + this.variantId = variantId; + this.variant = variant; + this.type = PRODUCT_VARIANT_TAILORING_REMOVED; + } + + /** + * create empty instance + */ + public ProductVariantTailoringRemovedMessagePayloadImpl() { + this.type = PRODUCT_VARIANT_TAILORING_REMOVED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *

The Store to which the Product Tailoring belongs.

+ */ + + public com.commercetools.api.models.store.StoreKeyReference getStore() { + return this.store; + } + + /** + *

key of the tailored Product.

+ */ + + public String getProductKey() { + return this.productKey; + } + + /** + *

Reference to the Product the Product Tailoring belongs to.

+ */ + + public com.commercetools.api.models.product.ProductReference getProduct() { + return this.product; + } + + /** + *

id of the ProductVariant removed from the Tailoring.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The ProductVariantTailoring that was removed from the ProductTailoring.

+ */ + + public com.commercetools.api.models.product_tailoring.ProductVariantTailoring getVariant() { + return this.variant; + } + + public void setStore(final com.commercetools.api.models.store.StoreKeyReference store) { + this.store = store; + } + + public void setProductKey(final String productKey) { + this.productKey = productKey; + } + + public void setProduct(final com.commercetools.api.models.product.ProductReference product) { + this.product = product; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setVariant(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring variant) { + this.variant = variant; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringRemovedMessagePayloadImpl that = (ProductVariantTailoringRemovedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .append(type, that.type) + .append(store, that.store) + .append(productKey, that.productKey) + .append(product, that.product) + .append(variantId, that.variantId) + .append(variant, that.variant) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type) + .append(store) + .append(productKey) + .append(product) + .append(variantId) + .append(variant) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("store", store) + .append("productKey", productKey) + .append("product", product) + .append("variantId", variantId) + .append("variant", variant) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java new file mode 100644 index 00000000000..61684477ffa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetAction.java @@ -0,0 +1,198 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.AssetDraft; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringAddAssetAction productTailoringAddAssetAction = ProductTailoringAddAssetAction.builder()
+ *             .asset(assetBuilder -> assetBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringAddAssetActionImpl.class) +public interface ProductTailoringAddAssetAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringAddAssetAction + */ + String ADD_ASSET = "addAsset"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

Value to append.

+ * @return asset + */ + @NotNull + @Valid + @JsonProperty("asset") + public AssetDraft getAsset(); + + /** + *

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

+ * @return position + */ + + @JsonProperty("position") + public Integer getPosition(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

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

Value to append.

+ * @param asset value to be set + */ + + public void setAsset(final AssetDraft asset); + + /** + *

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

+ * @param position value to be set + */ + + public void setPosition(final Integer position); + + /** + * factory method + * @return instance of ProductTailoringAddAssetAction + */ + public static ProductTailoringAddAssetAction of() { + return new ProductTailoringAddAssetActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringAddAssetAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringAddAssetAction of(final ProductTailoringAddAssetAction template) { + ProductTailoringAddAssetActionImpl instance = new ProductTailoringAddAssetActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAsset(template.getAsset()); + instance.setPosition(template.getPosition()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringAddAssetAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringAddAssetAction deepCopy(@Nullable final ProductTailoringAddAssetAction template) { + if (template == null) { + return null; + } + ProductTailoringAddAssetActionImpl instance = new ProductTailoringAddAssetActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAsset(com.commercetools.api.models.common.AssetDraft.deepCopy(template.getAsset())); + instance.setPosition(template.getPosition()); + return instance; + } + + /** + * builder factory method for ProductTailoringAddAssetAction + * @return builder + */ + public static ProductTailoringAddAssetActionBuilder builder() { + return ProductTailoringAddAssetActionBuilder.of(); + } + + /** + * create builder for ProductTailoringAddAssetAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddAssetActionBuilder builder(final ProductTailoringAddAssetAction template) { + return ProductTailoringAddAssetActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringAddAssetAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java new file mode 100644 index 00000000000..1cd5dba9c06 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionBuilder.java @@ -0,0 +1,209 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringAddAssetActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringAddAssetAction productTailoringAddAssetAction = ProductTailoringAddAssetAction.builder()
+ *             .asset(assetBuilder -> assetBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddAssetActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + private com.commercetools.api.models.common.AssetDraft asset; + + @Nullable + private Integer position; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

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

Value to append.

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

Value to append.

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

Value to append.

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

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

+ * @param position value to be set + * @return Builder + */ + + public ProductTailoringAddAssetActionBuilder position(@Nullable final Integer position) { + this.position = position; + return this; + } + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

Value to append.

+ * @return asset + */ + + public com.commercetools.api.models.common.AssetDraft getAsset() { + return this.asset; + } + + /** + *

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

+ * @return position + */ + + @Nullable + public Integer getPosition() { + return this.position; + } + + /** + * builds ProductTailoringAddAssetAction with checking for non-null required values + * @return ProductTailoringAddAssetAction + */ + public ProductTailoringAddAssetAction build() { + Objects.requireNonNull(asset, ProductTailoringAddAssetAction.class + ": asset is missing"); + return new ProductTailoringAddAssetActionImpl(variantId, sku, staged, asset, position); + } + + /** + * builds ProductTailoringAddAssetAction without checking for non-null required values + * @return ProductTailoringAddAssetAction + */ + public ProductTailoringAddAssetAction buildUnchecked() { + return new ProductTailoringAddAssetActionImpl(variantId, sku, staged, asset, position); + } + + /** + * factory method for an instance of ProductTailoringAddAssetActionBuilder + * @return builder + */ + public static ProductTailoringAddAssetActionBuilder of() { + return new ProductTailoringAddAssetActionBuilder(); + } + + /** + * create builder for ProductTailoringAddAssetAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddAssetActionBuilder of(final ProductTailoringAddAssetAction template) { + ProductTailoringAddAssetActionBuilder builder = new ProductTailoringAddAssetActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.asset = template.getAsset(); + builder.position = template.getPosition(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java new file mode 100644 index 00000000000..70a654b4b00 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionImpl.java @@ -0,0 +1,175 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddAssetActionImpl implements ProductTailoringAddAssetAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private com.commercetools.api.models.common.AssetDraft asset; + + private Integer position; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringAddAssetActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("asset") final com.commercetools.api.models.common.AssetDraft asset, + @JsonProperty("position") final Integer position) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.asset = asset; + this.position = position; + this.action = ADD_ASSET; + } + + /** + * create empty instance + */ + public ProductTailoringAddAssetActionImpl() { + this.action = ADD_ASSET; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets are updated. If false, both the current and staged assets are updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

Value to append.

+ */ + + public com.commercetools.api.models.common.AssetDraft getAsset() { + return this.asset; + } + + /** + *

Position in assets where the Asset should be put. When specified, the value must be between 0 and the total number of Assets minus 1.

+ */ + + public Integer getPosition() { + return this.position; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAsset(final com.commercetools.api.models.common.AssetDraft asset) { + this.asset = asset; + } + + public void setPosition(final Integer position) { + this.position = position; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringAddAssetActionImpl that = (ProductTailoringAddAssetActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(asset, that.asset) + .append(position, that.position) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(asset, that.asset) + .append(position, that.position) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(asset) + .append(position) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("asset", asset) + .append("position", position) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java new file mode 100644 index 00000000000..4eaf825d769 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageAction.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Image; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImageAdded Message.

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

+ *     ProductTailoringAddExternalImageAction productTailoringAddExternalImageAction = ProductTailoringAddExternalImageAction.builder()
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringAddExternalImageActionImpl.class) +public interface ProductTailoringAddExternalImageAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringAddExternalImageAction + */ + String ADD_EXTERNAL_IMAGE = "addExternalImage"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to add to images.

+ * @return image + */ + @NotNull + @Valid + @JsonProperty("image") + public Image getImage(); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to add to images.

+ * @param image value to be set + */ + + public void setImage(final Image image); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringAddExternalImageAction + */ + public static ProductTailoringAddExternalImageAction of() { + return new ProductTailoringAddExternalImageActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringAddExternalImageAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringAddExternalImageAction of(final ProductTailoringAddExternalImageAction template) { + ProductTailoringAddExternalImageActionImpl instance = new ProductTailoringAddExternalImageActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImage(template.getImage()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringAddExternalImageAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringAddExternalImageAction deepCopy( + @Nullable final ProductTailoringAddExternalImageAction template) { + if (template == null) { + return null; + } + ProductTailoringAddExternalImageActionImpl instance = new ProductTailoringAddExternalImageActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImage(com.commercetools.api.models.common.Image.deepCopy(template.getImage())); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringAddExternalImageAction + * @return builder + */ + public static ProductTailoringAddExternalImageActionBuilder builder() { + return ProductTailoringAddExternalImageActionBuilder.of(); + } + + /** + * create builder for ProductTailoringAddExternalImageAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddExternalImageActionBuilder builder( + final ProductTailoringAddExternalImageAction template) { + return ProductTailoringAddExternalImageActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringAddExternalImageAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java new file mode 100644 index 00000000000..2f4c8060f92 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionBuilder.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringAddExternalImageActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringAddExternalImageAction productTailoringAddExternalImageAction = ProductTailoringAddExternalImageAction.builder()
+ *             .image(imageBuilder -> imageBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddExternalImageActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + private com.commercetools.api.models.common.Image image; + + @Nullable + private Boolean staged; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

Value to add to images.

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

Value to add to images.

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

Value to add to images.

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

If true, only the staged images is updated. If false, both the current and staged images is updated.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to add to images.

+ * @return image + */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringAddExternalImageAction with checking for non-null required values + * @return ProductTailoringAddExternalImageAction + */ + public ProductTailoringAddExternalImageAction build() { + Objects.requireNonNull(image, ProductTailoringAddExternalImageAction.class + ": image is missing"); + return new ProductTailoringAddExternalImageActionImpl(variantId, sku, image, staged); + } + + /** + * builds ProductTailoringAddExternalImageAction without checking for non-null required values + * @return ProductTailoringAddExternalImageAction + */ + public ProductTailoringAddExternalImageAction buildUnchecked() { + return new ProductTailoringAddExternalImageActionImpl(variantId, sku, image, staged); + } + + /** + * factory method for an instance of ProductTailoringAddExternalImageActionBuilder + * @return builder + */ + public static ProductTailoringAddExternalImageActionBuilder of() { + return new ProductTailoringAddExternalImageActionBuilder(); + } + + /** + * create builder for ProductTailoringAddExternalImageAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddExternalImageActionBuilder of( + final ProductTailoringAddExternalImageAction template) { + ProductTailoringAddExternalImageActionBuilder builder = new ProductTailoringAddExternalImageActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.image = template.getImage(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java new file mode 100644 index 00000000000..90152ad0ab6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionImpl.java @@ -0,0 +1,156 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImageAdded Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddExternalImageActionImpl implements ProductTailoringAddExternalImageAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private com.commercetools.api.models.common.Image image; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringAddExternalImageActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, + @JsonProperty("image") final com.commercetools.api.models.common.Image image, + @JsonProperty("staged") final Boolean staged) { + this.variantId = variantId; + this.sku = sku; + this.image = image; + this.staged = staged; + this.action = ADD_EXTERNAL_IMAGE; + } + + /** + * create empty instance + */ + public ProductTailoringAddExternalImageActionImpl() { + this.action = ADD_EXTERNAL_IMAGE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to add to images.

+ */ + + public com.commercetools.api.models.common.Image getImage() { + return this.image; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImage(final com.commercetools.api.models.common.Image image) { + this.image = image; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringAddExternalImageActionImpl that = (ProductTailoringAddExternalImageActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(image, that.image) + .append(staged, that.staged) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(image, that.image) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(image) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("image", image) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java new file mode 100644 index 00000000000..72c000852c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java @@ -0,0 +1,221 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.AssetDraft; +import com.commercetools.api.models.common.Image; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.

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

+ *     ProductTailoringAddVariantAction productTailoringAddVariantAction = ProductTailoringAddVariantAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringAddVariantActionImpl.class) +public interface ProductTailoringAddVariantAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringAddVariantAction + */ + String ADD_VARIANT = "addVariant"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return id + */ + + @JsonProperty("id") + public Long getId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

Images for the Product Variant Tailoring.

+ * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

Media assets for the Product Variant Tailoring.

+ * @return assets + */ + @Valid + @JsonProperty("assets") + public List getAssets(); + + /** + *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param id value to be set + */ + + public void setId(final Long id); + + /** + *

The sku of the tailored ProductVariant to update.

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

Images for the Product Variant Tailoring.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Images for the Product Variant Tailoring.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param assets values to be set + */ + + @JsonIgnore + public void setAssets(final AssetDraft... assets); + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param assets values to be set + */ + + public void setAssets(final List assets); + + /** + *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringAddVariantAction + */ + public static ProductTailoringAddVariantAction of() { + return new ProductTailoringAddVariantActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringAddVariantAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringAddVariantAction of(final ProductTailoringAddVariantAction template) { + ProductTailoringAddVariantActionImpl instance = new ProductTailoringAddVariantActionImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setImages(template.getImages()); + instance.setAssets(template.getAssets()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringAddVariantAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringAddVariantAction deepCopy(@Nullable final ProductTailoringAddVariantAction template) { + if (template == null) { + return null; + } + ProductTailoringAddVariantActionImpl instance = new ProductTailoringAddVariantActionImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAssets(Optional.ofNullable(template.getAssets()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.AssetDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringAddVariantAction + * @return builder + */ + public static ProductTailoringAddVariantActionBuilder builder() { + return ProductTailoringAddVariantActionBuilder.of(); + } + + /** + * create builder for ProductTailoringAddVariantAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddVariantActionBuilder builder(final ProductTailoringAddVariantAction template) { + return ProductTailoringAddVariantActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringAddVariantAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java new file mode 100644 index 00000000000..c7e1318b2e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java @@ -0,0 +1,341 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringAddVariantActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringAddVariantAction productTailoringAddVariantAction = ProductTailoringAddVariantAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddVariantActionBuilder implements Builder { + + @Nullable + private Long id; + + @Nullable + private String sku; + + @Nullable + private java.util.List images; + + @Nullable + private java.util.List assets; + + @Nullable + private Boolean staged; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

Images for the Product Variant Tailoring.

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

Images for the Product Variant Tailoring.

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

Images for the Product Variant Tailoring.

+ * @param images value to be set + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusImages( + @Nullable final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Images for the Product Variant Tailoring.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images for the Product Variant Tailoring.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images for the Product Variant Tailoring.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images for the Product Variant Tailoring.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Media assets for the Product Variant Tailoring.

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

Media assets for the Product Variant Tailoring.

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

Media assets for the Product Variant Tailoring.

+ * @param assets value to be set + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusAssets( + @Nullable final com.commercetools.api.models.common.AssetDraft... assets) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.addAll(Arrays.asList(assets)); + return this; + } + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusAssets( + Function builder) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetDraftBuilder.of()).build()); + return this; + } + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder withAssets( + Function builder) { + this.assets = new ArrayList<>(); + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetDraftBuilder.of()).build()); + return this; + } + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder addAssets( + Function builder) { + return plusAssets(builder.apply(com.commercetools.api.models.common.AssetDraftBuilder.of())); + } + + /** + *

Media assets for the Product Variant Tailoring.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder setAssets( + Function builder) { + return assets(builder.apply(com.commercetools.api.models.common.AssetDraftBuilder.of())); + } + + /** + *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

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

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

Images for the Product Variant Tailoring.

+ * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets for the Product Variant Tailoring.

+ * @return assets + */ + + @Nullable + public java.util.List getAssets() { + return this.assets; + } + + /** + *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringAddVariantAction with checking for non-null required values + * @return ProductTailoringAddVariantAction + */ + public ProductTailoringAddVariantAction build() { + return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, staged); + } + + /** + * builds ProductTailoringAddVariantAction without checking for non-null required values + * @return ProductTailoringAddVariantAction + */ + public ProductTailoringAddVariantAction buildUnchecked() { + return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, staged); + } + + /** + * factory method for an instance of ProductTailoringAddVariantActionBuilder + * @return builder + */ + public static ProductTailoringAddVariantActionBuilder of() { + return new ProductTailoringAddVariantActionBuilder(); + } + + /** + * create builder for ProductTailoringAddVariantAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAddVariantActionBuilder of(final ProductTailoringAddVariantAction template) { + ProductTailoringAddVariantActionBuilder builder = new ProductTailoringAddVariantActionBuilder(); + builder.id = template.getId(); + builder.sku = template.getSku(); + builder.images = template.getImages(); + builder.assets = template.getAssets(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java new file mode 100644 index 00000000000..bd0d1bce9c7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either id or sku is required to reference a ProductVariant that exists. Produces the ProductVariantTailoringAdded Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAddVariantActionImpl implements ProductTailoringAddVariantAction, ModelBase { + + private String action; + + private Long id; + + private String sku; + + private java.util.List images; + + private java.util.List assets; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringAddVariantActionImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, + @JsonProperty("images") final java.util.List images, + @JsonProperty("assets") final java.util.List assets, + @JsonProperty("staged") final Boolean staged) { + this.id = id; + this.sku = sku; + this.images = images; + this.assets = assets; + this.staged = staged; + this.action = ADD_VARIANT; + } + + /** + * create empty instance + */ + public ProductTailoringAddVariantActionImpl() { + this.action = ADD_VARIANT; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

Images for the Product Variant Tailoring.

+ */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets for the Product Variant Tailoring.

+ */ + + public java.util.List getAssets() { + return this.assets; + } + + /** + *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + public void setAssets(final com.commercetools.api.models.common.AssetDraft... assets) { + this.assets = new ArrayList<>(Arrays.asList(assets)); + } + + public void setAssets(final java.util.List assets) { + this.assets = assets; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringAddVariantActionImpl that = (ProductTailoringAddVariantActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(id, that.id) + .append(sku, that.sku) + .append(images, that.images) + .append(assets, that.assets) + .append(staged, that.staged) + .append(action, that.action) + .append(id, that.id) + .append(sku, that.sku) + .append(images, that.images) + .append(assets, that.assets) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(id) + .append(sku) + .append(images) + .append(assets) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("id", id) + .append("sku", sku) + .append("images", images) + .append("assets", assets) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameAction.java new file mode 100644 index 00000000000..fff829824d1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameAction.java @@ -0,0 +1,217 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringChangeAssetNameAction productTailoringChangeAssetNameAction = ProductTailoringChangeAssetNameAction.builder()
+ *             .name(nameBuilder -> nameBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringChangeAssetNameActionImpl.class) +public interface ProductTailoringChangeAssetNameAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringChangeAssetNameAction + */ + String CHANGE_ASSET_NAME = "changeAssetName"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

New value to set. Must not be empty.

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

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

New value to set. Must not be empty.

+ * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + * factory method + * @return instance of ProductTailoringChangeAssetNameAction + */ + public static ProductTailoringChangeAssetNameAction of() { + return new ProductTailoringChangeAssetNameActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringChangeAssetNameAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringChangeAssetNameAction of(final ProductTailoringChangeAssetNameAction template) { + ProductTailoringChangeAssetNameActionImpl instance = new ProductTailoringChangeAssetNameActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setName(template.getName()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringChangeAssetNameAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringChangeAssetNameAction deepCopy( + @Nullable final ProductTailoringChangeAssetNameAction template) { + if (template == null) { + return null; + } + ProductTailoringChangeAssetNameActionImpl instance = new ProductTailoringChangeAssetNameActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); + return instance; + } + + /** + * builder factory method for ProductTailoringChangeAssetNameAction + * @return builder + */ + public static ProductTailoringChangeAssetNameActionBuilder builder() { + return ProductTailoringChangeAssetNameActionBuilder.of(); + } + + /** + * create builder for ProductTailoringChangeAssetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringChangeAssetNameActionBuilder builder( + final ProductTailoringChangeAssetNameAction template) { + return ProductTailoringChangeAssetNameActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringChangeAssetNameAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionBuilder.java new file mode 100644 index 00000000000..a6ef72c951b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionBuilder.java @@ -0,0 +1,236 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringChangeAssetNameActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringChangeAssetNameAction productTailoringChangeAssetNameAction = ProductTailoringChangeAssetNameAction.builder()
+ *             .name(nameBuilder -> nameBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringChangeAssetNameActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + private com.commercetools.api.models.common.LocalizedString name; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

New value to set. Must not be empty.

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

New value to set. Must not be empty.

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

New value to set. Must not be empty.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

New value to set. Must not be empty.

+ * @return name + */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + /** + * builds ProductTailoringChangeAssetNameAction with checking for non-null required values + * @return ProductTailoringChangeAssetNameAction + */ + public ProductTailoringChangeAssetNameAction build() { + Objects.requireNonNull(name, ProductTailoringChangeAssetNameAction.class + ": name is missing"); + return new ProductTailoringChangeAssetNameActionImpl(variantId, sku, staged, assetId, assetKey, name); + } + + /** + * builds ProductTailoringChangeAssetNameAction without checking for non-null required values + * @return ProductTailoringChangeAssetNameAction + */ + public ProductTailoringChangeAssetNameAction buildUnchecked() { + return new ProductTailoringChangeAssetNameActionImpl(variantId, sku, staged, assetId, assetKey, name); + } + + /** + * factory method for an instance of ProductTailoringChangeAssetNameActionBuilder + * @return builder + */ + public static ProductTailoringChangeAssetNameActionBuilder of() { + return new ProductTailoringChangeAssetNameActionBuilder(); + } + + /** + * create builder for ProductTailoringChangeAssetNameAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringChangeAssetNameActionBuilder of( + final ProductTailoringChangeAssetNameAction template) { + ProductTailoringChangeAssetNameActionBuilder builder = new ProductTailoringChangeAssetNameActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.name = template.getName(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionImpl.java new file mode 100644 index 00000000000..a9fa7df8d4a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionImpl.java @@ -0,0 +1,194 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringChangeAssetNameActionImpl implements ProductTailoringChangeAssetNameAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private com.commercetools.api.models.common.LocalizedString name; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringChangeAssetNameActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.name = name; + this.action = CHANGE_ASSET_NAME; + } + + /** + * create empty instance + */ + public ProductTailoringChangeAssetNameActionImpl() { + this.action = CHANGE_ASSET_NAME; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

New value to set. Must not be empty.

+ */ + + public com.commercetools.api.models.common.LocalizedString getName() { + return this.name; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setName(final com.commercetools.api.models.common.LocalizedString name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringChangeAssetNameActionImpl that = (ProductTailoringChangeAssetNameActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(name, that.name) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(name, that.name) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(name) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("name", name) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderAction.java new file mode 100644 index 00000000000..d98c0708515 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderAction.java @@ -0,0 +1,189 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringChangeAssetOrderAction productTailoringChangeAssetOrderAction = ProductTailoringChangeAssetOrderAction.builder()
+ *             .plusAssetOrder(assetOrderBuilder -> assetOrderBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringChangeAssetOrderActionImpl.class) +public interface ProductTailoringChangeAssetOrderAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringChangeAssetOrderAction + */ + String CHANGE_ASSET_ORDER = "changeAssetOrder"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ * @return assetOrder + */ + @NotNull + @JsonProperty("assetOrder") + public List getAssetOrder(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

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

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ * @param assetOrder values to be set + */ + + @JsonIgnore + public void setAssetOrder(final String... assetOrder); + + /** + *

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ * @param assetOrder values to be set + */ + + public void setAssetOrder(final List assetOrder); + + /** + * factory method + * @return instance of ProductTailoringChangeAssetOrderAction + */ + public static ProductTailoringChangeAssetOrderAction of() { + return new ProductTailoringChangeAssetOrderActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringChangeAssetOrderAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringChangeAssetOrderAction of(final ProductTailoringChangeAssetOrderAction template) { + ProductTailoringChangeAssetOrderActionImpl instance = new ProductTailoringChangeAssetOrderActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetOrder(template.getAssetOrder()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringChangeAssetOrderAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringChangeAssetOrderAction deepCopy( + @Nullable final ProductTailoringChangeAssetOrderAction template) { + if (template == null) { + return null; + } + ProductTailoringChangeAssetOrderActionImpl instance = new ProductTailoringChangeAssetOrderActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetOrder(Optional.ofNullable(template.getAssetOrder()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringChangeAssetOrderAction + * @return builder + */ + public static ProductTailoringChangeAssetOrderActionBuilder builder() { + return ProductTailoringChangeAssetOrderActionBuilder.of(); + } + + /** + * create builder for ProductTailoringChangeAssetOrderAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringChangeAssetOrderActionBuilder builder( + final ProductTailoringChangeAssetOrderAction template) { + return ProductTailoringChangeAssetOrderActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringChangeAssetOrderAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionBuilder.java new file mode 100644 index 00000000000..c58221c65c2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionBuilder.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringChangeAssetOrderActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringChangeAssetOrderAction productTailoringChangeAssetOrderAction = ProductTailoringChangeAssetOrderAction.builder()
+ *             .plusAssetOrder(assetOrderBuilder -> assetOrderBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringChangeAssetOrderActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + private java.util.List assetOrder; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

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

All existing Asset ids of the ProductTailoringVariant in the desired new order.

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

All existing Asset ids of the ProductTailoringVariant in the desired new order.

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

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ * @param assetOrder value to be set + * @return Builder + */ + + public ProductTailoringChangeAssetOrderActionBuilder plusAssetOrder(final String... assetOrder) { + if (this.assetOrder == null) { + this.assetOrder = new ArrayList<>(); + } + this.assetOrder.addAll(Arrays.asList(assetOrder)); + return this; + } + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ * @return assetOrder + */ + + public java.util.List getAssetOrder() { + return this.assetOrder; + } + + /** + * builds ProductTailoringChangeAssetOrderAction with checking for non-null required values + * @return ProductTailoringChangeAssetOrderAction + */ + public ProductTailoringChangeAssetOrderAction build() { + Objects.requireNonNull(assetOrder, ProductTailoringChangeAssetOrderAction.class + ": assetOrder is missing"); + return new ProductTailoringChangeAssetOrderActionImpl(variantId, sku, staged, assetOrder); + } + + /** + * builds ProductTailoringChangeAssetOrderAction without checking for non-null required values + * @return ProductTailoringChangeAssetOrderAction + */ + public ProductTailoringChangeAssetOrderAction buildUnchecked() { + return new ProductTailoringChangeAssetOrderActionImpl(variantId, sku, staged, assetOrder); + } + + /** + * factory method for an instance of ProductTailoringChangeAssetOrderActionBuilder + * @return builder + */ + public static ProductTailoringChangeAssetOrderActionBuilder of() { + return new ProductTailoringChangeAssetOrderActionBuilder(); + } + + /** + * create builder for ProductTailoringChangeAssetOrderAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringChangeAssetOrderActionBuilder of( + final ProductTailoringChangeAssetOrderAction template) { + ProductTailoringChangeAssetOrderActionBuilder builder = new ProductTailoringChangeAssetOrderActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetOrder = template.getAssetOrder(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionImpl.java new file mode 100644 index 00000000000..d6ff96f4d41 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionImpl.java @@ -0,0 +1,159 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringChangeAssetOrderActionImpl implements ProductTailoringChangeAssetOrderAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private java.util.List assetOrder; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringChangeAssetOrderActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetOrder") final java.util.List assetOrder) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetOrder = assetOrder; + this.action = CHANGE_ASSET_ORDER; + } + + /** + * create empty instance + */ + public ProductTailoringChangeAssetOrderActionImpl() { + this.action = CHANGE_ASSET_ORDER; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged assets is updated. If false, both the current and staged assets are updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

All existing Asset ids of the ProductTailoringVariant in the desired new order.

+ */ + + public java.util.List getAssetOrder() { + return this.assetOrder; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetOrder(final String... assetOrder) { + this.assetOrder = new ArrayList<>(Arrays.asList(assetOrder)); + } + + public void setAssetOrder(final java.util.List assetOrder) { + this.assetOrder = assetOrder; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringChangeAssetOrderActionImpl that = (ProductTailoringChangeAssetOrderActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetOrder, that.assetOrder) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetOrder, that.assetOrder) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetOrder) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetOrder", assetOrder) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java index ecc1969181b..09906416cff 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringData.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -79,6 +80,14 @@ public interface ProductTailoringData { @JsonProperty("slug") public LocalizedString getSlug(); + /** + *

Tailored Variants of the Product.

+ * @return variants + */ + @Valid + @JsonProperty("variants") + public List getVariants(); + /** *

Tailored name of the Product.

* @param name value to be set @@ -121,6 +130,21 @@ public interface ProductTailoringData { public void setSlug(final LocalizedString slug); + /** + *

Tailored Variants of the Product.

+ * @param variants values to be set + */ + + @JsonIgnore + public void setVariants(final ProductVariantTailoring... variants); + + /** + *

Tailored Variants of the Product.

+ * @param variants values to be set + */ + + public void setVariants(final List variants); + /** * factory method * @return instance of ProductTailoringData @@ -142,6 +166,7 @@ public static ProductTailoringData of(final ProductTailoringData template) { instance.setMetaDescription(template.getMetaDescription()); instance.setMetaKeywords(template.getMetaKeywords()); instance.setSlug(template.getSlug()); + instance.setVariants(template.getVariants()); return instance; } @@ -165,6 +190,11 @@ public static ProductTailoringData deepCopy(@Nullable final ProductTailoringData instance.setMetaKeywords( com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); + instance.setVariants(Optional.ofNullable(template.getVariants()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductVariantTailoring::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java index 1a3354580a1..430349ada84 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataBuilder.java @@ -41,6 +41,9 @@ public class ProductTailoringDataBuilder implements Builder variants; + /** *

Tailored name of the Product.

* @param builder function to build the name value @@ -255,6 +258,99 @@ public ProductTailoringDataBuilder slug(@Nullable final com.commercetools.api.mo return this; } + /** + *

Tailored Variants of the Product.

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

Tailored Variants of the Product.

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

Tailored Variants of the Product.

+ * @param variants value to be set + * @return Builder + */ + + public ProductTailoringDataBuilder plusVariants( + @Nullable final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.addAll(Arrays.asList(variants)); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDataBuilder plusVariants( + Function builder) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDataBuilder withVariants( + Function builder) { + this.variants = new ArrayList<>(); + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of()).build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDataBuilder addVariants( + Function builder) { + return plusVariants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDataBuilder setVariants( + Function builder) { + return variants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringBuilder.of())); + } + /** *

Tailored name of the Product.

* @return name @@ -315,12 +411,23 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

Tailored Variants of the Product.

+ * @return variants + */ + + @Nullable + public java.util.List getVariants() { + return this.variants; + } + /** * builds ProductTailoringData with checking for non-null required values * @return ProductTailoringData */ public ProductTailoringData build() { - return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug); + return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug, + variants); } /** @@ -328,7 +435,8 @@ public ProductTailoringData build() { * @return ProductTailoringData */ public ProductTailoringData buildUnchecked() { - return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug); + return new ProductTailoringDataImpl(name, description, metaTitle, metaDescription, metaKeywords, slug, + variants); } /** @@ -352,6 +460,7 @@ public static ProductTailoringDataBuilder of(final ProductTailoringData template builder.metaDescription = template.getMetaDescription(); builder.metaKeywords = template.getMetaKeywords(); builder.slug = template.getSlug(); + builder.variants = template.getVariants(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java index 2165fe91665..a6b19d6ab5a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataImpl.java @@ -34,6 +34,8 @@ public class ProductTailoringDataImpl implements ProductTailoringData, ModelBase private com.commercetools.api.models.common.LocalizedString slug; + private java.util.List variants; + /** * create instance with all properties */ @@ -43,13 +45,15 @@ public class ProductTailoringDataImpl implements ProductTailoringData, ModelBase @JsonProperty("metaTitle") final com.commercetools.api.models.common.LocalizedString metaTitle, @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, - @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug) { + @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, + @JsonProperty("variants") final java.util.List variants) { this.name = name; this.description = description; this.metaTitle = metaTitle; this.metaDescription = metaDescription; this.metaKeywords = metaKeywords; this.slug = slug; + this.variants = variants; } /** @@ -106,6 +110,14 @@ public com.commercetools.api.models.common.LocalizedString getSlug() { return this.slug; } + /** + *

Tailored Variants of the Product.

+ */ + + public java.util.List getVariants() { + return this.variants; + } + public void setName(final com.commercetools.api.models.common.LocalizedString name) { this.name = name; } @@ -130,6 +142,15 @@ public void setSlug(final com.commercetools.api.models.common.LocalizedString sl this.slug = slug; } + public void setVariants(final com.commercetools.api.models.product_tailoring.ProductVariantTailoring... variants) { + this.variants = new ArrayList<>(Arrays.asList(variants)); + } + + public void setVariants( + final java.util.List variants) { + this.variants = variants; + } + @Override public boolean equals(Object o) { if (this == o) @@ -146,12 +167,14 @@ public boolean equals(Object o) { .append(metaDescription, that.metaDescription) .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) + .append(variants, that.variants) .append(name, that.name) .append(description, that.description) .append(metaTitle, that.metaTitle) .append(metaDescription, that.metaDescription) .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) + .append(variants, that.variants) .isEquals(); } @@ -163,6 +186,7 @@ public int hashCode() { .append(metaDescription) .append(metaKeywords) .append(slug) + .append(variants) .toHashCode(); } @@ -174,6 +198,7 @@ public String toString() { .append("metaDescription", metaDescription) .append("metaKeywords", metaKeywords) .append("slug", slug) + .append("variants", variants) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java index 8ee83be69a2..277535be6e3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraft.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -118,6 +119,14 @@ public interface ProductTailoringDraft extends io.vrap.rmf.base.client.DraftTailored Variants of the Product.

+ * @return variants + */ + @Valid + @JsonProperty("variants") + public List getVariants(); + /** *

User-defined unique identifier of the ProductTailoring.

* @param key value to be set @@ -188,6 +197,21 @@ public interface ProductTailoringDraft extends io.vrap.rmf.base.client.DraftTailored Variants of the Product.

+ * @param variants values to be set + */ + + @JsonIgnore + public void setVariants(final ProductVariantTailoringDraft... variants); + + /** + *

Tailored Variants of the Product.

+ * @param variants values to be set + */ + + public void setVariants(final List variants); + /** * factory method * @return instance of ProductTailoringDraft @@ -213,6 +237,7 @@ public static ProductTailoringDraft of(final ProductTailoringDraft template) { instance.setMetaKeywords(template.getMetaKeywords()); instance.setSlug(template.getSlug()); instance.setPublish(template.getPublish()); + instance.setVariants(template.getVariants()); return instance; } @@ -241,6 +266,11 @@ public static ProductTailoringDraft deepCopy(@Nullable final ProductTailoringDra com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); instance.setPublish(template.getPublish()); + instance.setVariants(Optional.ofNullable(template.getVariants()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java index 431c3dab3af..911603f46a3 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftBuilder.java @@ -53,6 +53,9 @@ public class ProductTailoringDraftBuilder implements Builder variants; + /** *

User-defined unique identifier of the ProductTailoring.

* @param key value to be set @@ -361,6 +364,101 @@ public ProductTailoringDraftBuilder publish(@Nullable final Boolean publish) { return this; } + /** + *

Tailored Variants of the Product.

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

Tailored Variants of the Product.

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

Tailored Variants of the Product.

+ * @param variants value to be set + * @return Builder + */ + + public ProductTailoringDraftBuilder plusVariants( + @Nullable final com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft... variants) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.addAll(Arrays.asList(variants)); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDraftBuilder plusVariants( + Function builder) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of()) + .build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDraftBuilder withVariants( + Function builder) { + this.variants = new ArrayList<>(); + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of()) + .build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDraftBuilder addVariants( + Function builder) { + return plusVariants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of())); + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringDraftBuilder setVariants( + Function builder) { + return variants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of())); + } + /** *

User-defined unique identifier of the ProductTailoring.

* @return key @@ -459,6 +557,16 @@ public Boolean getPublish() { return this.publish; } + /** + *

Tailored Variants of the Product.

+ * @return variants + */ + + @Nullable + public java.util.List getVariants() { + return this.variants; + } + /** * builds ProductTailoringDraft with checking for non-null required values * @return ProductTailoringDraft @@ -467,7 +575,7 @@ public ProductTailoringDraft build() { Objects.requireNonNull(store, ProductTailoringDraft.class + ": store is missing"); Objects.requireNonNull(product, ProductTailoringDraft.class + ": product is missing"); return new ProductTailoringDraftImpl(key, store, product, name, description, metaTitle, metaDescription, - metaKeywords, slug, publish); + metaKeywords, slug, publish, variants); } /** @@ -476,7 +584,7 @@ public ProductTailoringDraft build() { */ public ProductTailoringDraft buildUnchecked() { return new ProductTailoringDraftImpl(key, store, product, name, description, metaTitle, metaDescription, - metaKeywords, slug, publish); + metaKeywords, slug, publish, variants); } /** @@ -504,6 +612,7 @@ public static ProductTailoringDraftBuilder of(final ProductTailoringDraft templa builder.metaKeywords = template.getMetaKeywords(); builder.slug = template.getSlug(); builder.publish = template.getPublish(); + builder.variants = template.getVariants(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java index e4fe2daf649..2d9e0501226 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftImpl.java @@ -42,6 +42,8 @@ public class ProductTailoringDraftImpl implements ProductTailoringDraft, ModelBa private Boolean publish; + private java.util.List variants; + /** * create instance with all properties */ @@ -55,7 +57,8 @@ public class ProductTailoringDraftImpl implements ProductTailoringDraft, ModelBa @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, - @JsonProperty("publish") final Boolean publish) { + @JsonProperty("publish") final Boolean publish, + @JsonProperty("variants") final java.util.List variants) { this.key = key; this.store = store; this.product = product; @@ -66,6 +69,7 @@ public class ProductTailoringDraftImpl implements ProductTailoringDraft, ModelBa this.metaKeywords = metaKeywords; this.slug = slug; this.publish = publish; + this.variants = variants; } /** @@ -154,6 +158,14 @@ public Boolean getPublish() { return this.publish; } + /** + *

Tailored Variants of the Product.

+ */ + + public java.util.List getVariants() { + return this.variants; + } + public void setKey(final String key) { this.key = key; } @@ -194,6 +206,16 @@ public void setPublish(final Boolean publish) { this.publish = publish; } + public void setVariants( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft... variants) { + this.variants = new ArrayList<>(Arrays.asList(variants)); + } + + public void setVariants( + final java.util.List variants) { + this.variants = variants; + } + @Override public boolean equals(Object o) { if (this == o) @@ -214,6 +236,7 @@ public boolean equals(Object o) { .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) .append(publish, that.publish) + .append(variants, that.variants) .append(key, that.key) .append(store, that.store) .append(product, that.product) @@ -224,6 +247,7 @@ public boolean equals(Object o) { .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) .append(publish, that.publish) + .append(variants, that.variants) .isEquals(); } @@ -239,6 +263,7 @@ public int hashCode() { .append(metaKeywords) .append(slug) .append(publish) + .append(variants) .toHashCode(); } @@ -254,6 +279,7 @@ public String toString() { .append("metaKeywords", metaKeywords) .append("slug", slug) .append("publish", publish) + .append("variants", variants) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java index 4034f0b7420..2df3a034fa8 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraft.java @@ -4,6 +4,7 @@ import java.time.*; import java.util.*; import java.util.function.Function; +import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -107,6 +108,14 @@ public interface ProductTailoringInStoreDraft extends io.vrap.rmf.base.client.Dr @JsonProperty("publish") public Boolean getPublish(); + /** + *

Tailored Variants of the Product.

+ * @return variants + */ + @Valid + @JsonProperty("variants") + public List getVariants(); + /** *

User-defined unique identifier of the ProductTailoring.

* @param key value to be set @@ -170,6 +179,21 @@ public interface ProductTailoringInStoreDraft extends io.vrap.rmf.base.client.Dr public void setPublish(final Boolean publish); + /** + *

Tailored Variants of the Product.

+ * @param variants values to be set + */ + + @JsonIgnore + public void setVariants(final ProductVariantTailoringDraft... variants); + + /** + *

Tailored Variants of the Product.

+ * @param variants values to be set + */ + + public void setVariants(final List variants); + /** * factory method * @return instance of ProductTailoringInStoreDraft @@ -194,6 +218,7 @@ public static ProductTailoringInStoreDraft of(final ProductTailoringInStoreDraft instance.setMetaKeywords(template.getMetaKeywords()); instance.setSlug(template.getSlug()); instance.setPublish(template.getPublish()); + instance.setVariants(template.getVariants()); return instance; } @@ -221,6 +246,11 @@ public static ProductTailoringInStoreDraft deepCopy(@Nullable final ProductTailo com.commercetools.api.models.common.LocalizedString.deepCopy(template.getMetaKeywords())); instance.setSlug(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getSlug())); instance.setPublish(template.getPublish()); + instance.setVariants(Optional.ofNullable(template.getVariants()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java index 7e163ee88dd..a9beac0f175 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftBuilder.java @@ -50,6 +50,9 @@ public class ProductTailoringInStoreDraftBuilder implements Builder variants; + /** *

User-defined unique identifier of the ProductTailoring.

* @param key value to be set @@ -325,6 +328,101 @@ public ProductTailoringInStoreDraftBuilder publish(@Nullable final Boolean publi return this; } + /** + *

Tailored Variants of the Product.

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

Tailored Variants of the Product.

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

Tailored Variants of the Product.

+ * @param variants value to be set + * @return Builder + */ + + public ProductTailoringInStoreDraftBuilder plusVariants( + @Nullable final com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft... variants) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.addAll(Arrays.asList(variants)); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringInStoreDraftBuilder plusVariants( + Function builder) { + if (this.variants == null) { + this.variants = new ArrayList<>(); + } + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of()) + .build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringInStoreDraftBuilder withVariants( + Function builder) { + this.variants = new ArrayList<>(); + this.variants.add( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of()) + .build()); + return this; + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringInStoreDraftBuilder addVariants( + Function builder) { + return plusVariants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of())); + } + + /** + *

Tailored Variants of the Product.

+ * @param builder function to build the variants value + * @return Builder + */ + + public ProductTailoringInStoreDraftBuilder setVariants( + Function builder) { + return variants( + builder.apply(com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftBuilder.of())); + } + /** *

User-defined unique identifier of the ProductTailoring.

* @return key @@ -414,6 +512,16 @@ public Boolean getPublish() { return this.publish; } + /** + *

Tailored Variants of the Product.

+ * @return variants + */ + + @Nullable + public java.util.List getVariants() { + return this.variants; + } + /** * builds ProductTailoringInStoreDraft with checking for non-null required values * @return ProductTailoringInStoreDraft @@ -421,7 +529,7 @@ public Boolean getPublish() { public ProductTailoringInStoreDraft build() { Objects.requireNonNull(product, ProductTailoringInStoreDraft.class + ": product is missing"); return new ProductTailoringInStoreDraftImpl(key, product, name, description, metaTitle, metaDescription, - metaKeywords, slug, publish); + metaKeywords, slug, publish, variants); } /** @@ -430,7 +538,7 @@ public ProductTailoringInStoreDraft build() { */ public ProductTailoringInStoreDraft buildUnchecked() { return new ProductTailoringInStoreDraftImpl(key, product, name, description, metaTitle, metaDescription, - metaKeywords, slug, publish); + metaKeywords, slug, publish, variants); } /** @@ -457,6 +565,7 @@ public static ProductTailoringInStoreDraftBuilder of(final ProductTailoringInSto builder.metaKeywords = template.getMetaKeywords(); builder.slug = template.getSlug(); builder.publish = template.getPublish(); + builder.variants = template.getVariants(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java index 3e3b95dc0fe..952dd02fb68 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftImpl.java @@ -40,6 +40,8 @@ public class ProductTailoringInStoreDraftImpl implements ProductTailoringInStore private Boolean publish; + private java.util.List variants; + /** * create instance with all properties */ @@ -52,7 +54,8 @@ public class ProductTailoringInStoreDraftImpl implements ProductTailoringInStore @JsonProperty("metaDescription") final com.commercetools.api.models.common.LocalizedString metaDescription, @JsonProperty("metaKeywords") final com.commercetools.api.models.common.LocalizedString metaKeywords, @JsonProperty("slug") final com.commercetools.api.models.common.LocalizedString slug, - @JsonProperty("publish") final Boolean publish) { + @JsonProperty("publish") final Boolean publish, + @JsonProperty("variants") final java.util.List variants) { this.key = key; this.product = product; this.name = name; @@ -62,6 +65,7 @@ public class ProductTailoringInStoreDraftImpl implements ProductTailoringInStore this.metaKeywords = metaKeywords; this.slug = slug; this.publish = publish; + this.variants = variants; } /** @@ -142,6 +146,14 @@ public Boolean getPublish() { return this.publish; } + /** + *

Tailored Variants of the Product.

+ */ + + public java.util.List getVariants() { + return this.variants; + } + public void setKey(final String key) { this.key = key; } @@ -178,6 +190,16 @@ public void setPublish(final Boolean publish) { this.publish = publish; } + public void setVariants( + final com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraft... variants) { + this.variants = new ArrayList<>(Arrays.asList(variants)); + } + + public void setVariants( + final java.util.List variants) { + this.variants = variants; + } + @Override public boolean equals(Object o) { if (this == o) @@ -197,6 +219,7 @@ public boolean equals(Object o) { .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) .append(publish, that.publish) + .append(variants, that.variants) .append(key, that.key) .append(product, that.product) .append(name, that.name) @@ -206,6 +229,7 @@ public boolean equals(Object o) { .append(metaKeywords, that.metaKeywords) .append(slug, that.slug) .append(publish, that.publish) + .append(variants, that.variants) .isEquals(); } @@ -220,6 +244,7 @@ public int hashCode() { .append(metaKeywords) .append(slug) .append(publish) + .append(variants) .toHashCode(); } @@ -234,6 +259,7 @@ public String toString() { .append("metaKeywords", metaKeywords) .append("slug", slug) .append("publish", publish) + .append("variants", variants) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java new file mode 100644 index 00000000000..b519d94005d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionAction.java @@ -0,0 +1,200 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringMoveImageToPositionAction productTailoringMoveImageToPositionAction = ProductTailoringMoveImageToPositionAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .position(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringMoveImageToPositionActionImpl.class) +public interface ProductTailoringMoveImageToPositionAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringMoveImageToPositionAction + */ + String MOVE_IMAGE_TO_POSITION = "moveImageToPosition"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to update.

+ * @return imageUrl + */ + @NotNull + @JsonProperty("imageUrl") + public String getImageUrl(); + + /** + *

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

+ * @return position + */ + @NotNull + @JsonProperty("position") + public Long getPosition(); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to update.

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

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

+ * @param position value to be set + */ + + public void setPosition(final Long position); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringMoveImageToPositionAction + */ + public static ProductTailoringMoveImageToPositionAction of() { + return new ProductTailoringMoveImageToPositionActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringMoveImageToPositionAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringMoveImageToPositionAction of( + final ProductTailoringMoveImageToPositionAction template) { + ProductTailoringMoveImageToPositionActionImpl instance = new ProductTailoringMoveImageToPositionActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImageUrl(template.getImageUrl()); + instance.setPosition(template.getPosition()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringMoveImageToPositionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringMoveImageToPositionAction deepCopy( + @Nullable final ProductTailoringMoveImageToPositionAction template) { + if (template == null) { + return null; + } + ProductTailoringMoveImageToPositionActionImpl instance = new ProductTailoringMoveImageToPositionActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImageUrl(template.getImageUrl()); + instance.setPosition(template.getPosition()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringMoveImageToPositionAction + * @return builder + */ + public static ProductTailoringMoveImageToPositionActionBuilder builder() { + return ProductTailoringMoveImageToPositionActionBuilder.of(); + } + + /** + * create builder for ProductTailoringMoveImageToPositionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringMoveImageToPositionActionBuilder builder( + final ProductTailoringMoveImageToPositionAction template) { + return ProductTailoringMoveImageToPositionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringMoveImageToPositionAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java new file mode 100644 index 00000000000..6b5ad714ac8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionBuilder.java @@ -0,0 +1,186 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringMoveImageToPositionActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringMoveImageToPositionAction productTailoringMoveImageToPositionAction = ProductTailoringMoveImageToPositionAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .position(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringMoveImageToPositionActionBuilder + implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + private String imageUrl; + + private Long position; + + @Nullable + private Boolean staged; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

The URL of the image to update.

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

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

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

If true, only the staged images is updated. If false, both the current and staged images is updated.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to update.

+ * @return imageUrl + */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

+ * @return position + */ + + public Long getPosition() { + return this.position; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringMoveImageToPositionAction with checking for non-null required values + * @return ProductTailoringMoveImageToPositionAction + */ + public ProductTailoringMoveImageToPositionAction build() { + Objects.requireNonNull(imageUrl, ProductTailoringMoveImageToPositionAction.class + ": imageUrl is missing"); + Objects.requireNonNull(position, ProductTailoringMoveImageToPositionAction.class + ": position is missing"); + return new ProductTailoringMoveImageToPositionActionImpl(variantId, sku, imageUrl, position, staged); + } + + /** + * builds ProductTailoringMoveImageToPositionAction without checking for non-null required values + * @return ProductTailoringMoveImageToPositionAction + */ + public ProductTailoringMoveImageToPositionAction buildUnchecked() { + return new ProductTailoringMoveImageToPositionActionImpl(variantId, sku, imageUrl, position, staged); + } + + /** + * factory method for an instance of ProductTailoringMoveImageToPositionActionBuilder + * @return builder + */ + public static ProductTailoringMoveImageToPositionActionBuilder of() { + return new ProductTailoringMoveImageToPositionActionBuilder(); + } + + /** + * create builder for ProductTailoringMoveImageToPositionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringMoveImageToPositionActionBuilder of( + final ProductTailoringMoveImageToPositionAction template) { + ProductTailoringMoveImageToPositionActionBuilder builder = new ProductTailoringMoveImageToPositionActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.imageUrl = template.getImageUrl(); + builder.position = template.getPosition(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java new file mode 100644 index 00000000000..2502334289b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionImpl.java @@ -0,0 +1,175 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringMoveImageToPositionActionImpl + implements ProductTailoringMoveImageToPositionAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private String imageUrl; + + private Long position; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringMoveImageToPositionActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("imageUrl") final String imageUrl, + @JsonProperty("position") final Long position, @JsonProperty("staged") final Boolean staged) { + this.variantId = variantId; + this.sku = sku; + this.imageUrl = imageUrl; + this.position = position; + this.staged = staged; + this.action = MOVE_IMAGE_TO_POSITION; + } + + /** + * create empty instance + */ + public ProductTailoringMoveImageToPositionActionImpl() { + this.action = MOVE_IMAGE_TO_POSITION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to update.

+ */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

Position in images where the image should be moved. Must be between 0 and the total number of images minus 1.

+ */ + + public Long getPosition() { + return this.position; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImageUrl(final String imageUrl) { + this.imageUrl = imageUrl; + } + + public void setPosition(final Long position) { + this.position = position; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringMoveImageToPositionActionImpl that = (ProductTailoringMoveImageToPositionActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(imageUrl, that.imageUrl) + .append(position, that.position) + .append(staged, that.staged) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(imageUrl, that.imageUrl) + .append(position, that.position) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(imageUrl) + .append(position) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("imageUrl", imageUrl) + .append("position", position) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java new file mode 100644 index 00000000000..90957fc787d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetAction.java @@ -0,0 +1,193 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to remove must be specified using either assetId or assetKey.

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

+ *     ProductTailoringRemoveAssetAction productTailoringRemoveAssetAction = ProductTailoringRemoveAssetAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringRemoveAssetActionImpl.class) +public interface ProductTailoringRemoveAssetAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringRemoveAssetAction + */ + String REMOVE_ASSET = "removeAsset"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to remove.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to remove.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

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

The id of the Asset to remove.

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

The key of the Asset to remove.

+ * @param assetKey value to be set + */ + + public void setAssetKey(final String assetKey); + + /** + * factory method + * @return instance of ProductTailoringRemoveAssetAction + */ + public static ProductTailoringRemoveAssetAction of() { + return new ProductTailoringRemoveAssetActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringRemoveAssetAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringRemoveAssetAction of(final ProductTailoringRemoveAssetAction template) { + ProductTailoringRemoveAssetActionImpl instance = new ProductTailoringRemoveAssetActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringRemoveAssetAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringRemoveAssetAction deepCopy( + @Nullable final ProductTailoringRemoveAssetAction template) { + if (template == null) { + return null; + } + ProductTailoringRemoveAssetActionImpl instance = new ProductTailoringRemoveAssetActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringRemoveAssetAction + * @return builder + */ + public static ProductTailoringRemoveAssetActionBuilder builder() { + return ProductTailoringRemoveAssetActionBuilder.of(); + } + + /** + * create builder for ProductTailoringRemoveAssetAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveAssetActionBuilder builder(final ProductTailoringRemoveAssetAction template) { + return ProductTailoringRemoveAssetActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringRemoveAssetAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java new file mode 100644 index 00000000000..23b0c0e7d3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringRemoveAssetActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringRemoveAssetAction productTailoringRemoveAssetAction = ProductTailoringRemoveAssetAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveAssetActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

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

The id of the Asset to remove.

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

The key of the Asset to remove.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to remove.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to remove.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + * builds ProductTailoringRemoveAssetAction with checking for non-null required values + * @return ProductTailoringRemoveAssetAction + */ + public ProductTailoringRemoveAssetAction build() { + return new ProductTailoringRemoveAssetActionImpl(variantId, sku, staged, assetId, assetKey); + } + + /** + * builds ProductTailoringRemoveAssetAction without checking for non-null required values + * @return ProductTailoringRemoveAssetAction + */ + public ProductTailoringRemoveAssetAction buildUnchecked() { + return new ProductTailoringRemoveAssetActionImpl(variantId, sku, staged, assetId, assetKey); + } + + /** + * factory method for an instance of ProductTailoringRemoveAssetActionBuilder + * @return builder + */ + public static ProductTailoringRemoveAssetActionBuilder of() { + return new ProductTailoringRemoveAssetActionBuilder(); + } + + /** + * create builder for ProductTailoringRemoveAssetAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveAssetActionBuilder of(final ProductTailoringRemoveAssetAction template) { + ProductTailoringRemoveAssetActionBuilder builder = new ProductTailoringRemoveAssetActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java new file mode 100644 index 00000000000..838f2bf24f9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionImpl.java @@ -0,0 +1,174 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to remove must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveAssetActionImpl implements ProductTailoringRemoveAssetAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringRemoveAssetActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.action = REMOVE_ASSET; + } + + /** + * create empty instance + */ + public ProductTailoringRemoveAssetActionImpl() { + this.action = REMOVE_ASSET; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is removed. If false, both the current and staged Asset is removed.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to remove.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to remove.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringRemoveAssetActionImpl that = (ProductTailoringRemoveAssetActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java new file mode 100644 index 00000000000..98da1659ee4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageAction.java @@ -0,0 +1,179 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringRemoveImageAction productTailoringRemoveImageAction = ProductTailoringRemoveImageAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringRemoveImageActionImpl.class) +public interface ProductTailoringRemoveImageAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringRemoveImageAction + */ + String REMOVE_IMAGE = "removeImage"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to remove.

+ * @return imageUrl + */ + @NotNull + @JsonProperty("imageUrl") + public String getImageUrl(); + + /** + *

If true, only the staged image is removed. If false, both the current and staged image is removed.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to remove.

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

If true, only the staged image is removed. If false, both the current and staged image is removed.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringRemoveImageAction + */ + public static ProductTailoringRemoveImageAction of() { + return new ProductTailoringRemoveImageActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringRemoveImageAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringRemoveImageAction of(final ProductTailoringRemoveImageAction template) { + ProductTailoringRemoveImageActionImpl instance = new ProductTailoringRemoveImageActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImageUrl(template.getImageUrl()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringRemoveImageAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringRemoveImageAction deepCopy( + @Nullable final ProductTailoringRemoveImageAction template) { + if (template == null) { + return null; + } + ProductTailoringRemoveImageActionImpl instance = new ProductTailoringRemoveImageActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImageUrl(template.getImageUrl()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringRemoveImageAction + * @return builder + */ + public static ProductTailoringRemoveImageActionBuilder builder() { + return ProductTailoringRemoveImageActionBuilder.of(); + } + + /** + * create builder for ProductTailoringRemoveImageAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveImageActionBuilder builder(final ProductTailoringRemoveImageAction template) { + return ProductTailoringRemoveImageActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringRemoveImageAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java new file mode 100644 index 00000000000..a23636bf47f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionBuilder.java @@ -0,0 +1,159 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringRemoveImageActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringRemoveImageAction productTailoringRemoveImageAction = ProductTailoringRemoveImageAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveImageActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + private String imageUrl; + + @Nullable + private Boolean staged; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

The URL of the image to remove.

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

If true, only the staged image is removed. If false, both the current and staged image is removed.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to remove.

+ * @return imageUrl + */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

If true, only the staged image is removed. If false, both the current and staged image is removed.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringRemoveImageAction with checking for non-null required values + * @return ProductTailoringRemoveImageAction + */ + public ProductTailoringRemoveImageAction build() { + Objects.requireNonNull(imageUrl, ProductTailoringRemoveImageAction.class + ": imageUrl is missing"); + return new ProductTailoringRemoveImageActionImpl(variantId, sku, imageUrl, staged); + } + + /** + * builds ProductTailoringRemoveImageAction without checking for non-null required values + * @return ProductTailoringRemoveImageAction + */ + public ProductTailoringRemoveImageAction buildUnchecked() { + return new ProductTailoringRemoveImageActionImpl(variantId, sku, imageUrl, staged); + } + + /** + * factory method for an instance of ProductTailoringRemoveImageActionBuilder + * @return builder + */ + public static ProductTailoringRemoveImageActionBuilder of() { + return new ProductTailoringRemoveImageActionBuilder(); + } + + /** + * create builder for ProductTailoringRemoveImageAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveImageActionBuilder of(final ProductTailoringRemoveImageAction template) { + ProductTailoringRemoveImageActionBuilder builder = new ProductTailoringRemoveImageActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.imageUrl = template.getImageUrl(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java new file mode 100644 index 00000000000..b8a083582f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionImpl.java @@ -0,0 +1,155 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveImageActionImpl implements ProductTailoringRemoveImageAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private String imageUrl; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringRemoveImageActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("imageUrl") final String imageUrl, + @JsonProperty("staged") final Boolean staged) { + this.variantId = variantId; + this.sku = sku; + this.imageUrl = imageUrl; + this.staged = staged; + this.action = REMOVE_IMAGE; + } + + /** + * create empty instance + */ + public ProductTailoringRemoveImageActionImpl() { + this.action = REMOVE_IMAGE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

The URL of the image to remove.

+ */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

If true, only the staged image is removed. If false, both the current and staged image is removed.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImageUrl(final String imageUrl) { + this.imageUrl = imageUrl; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringRemoveImageActionImpl that = (ProductTailoringRemoveImageActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(imageUrl, that.imageUrl) + .append(staged, that.staged) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(imageUrl, that.imageUrl) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(imageUrl) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("imageUrl", imageUrl) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java new file mode 100644 index 00000000000..604b720d6b4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantAction.java @@ -0,0 +1,160 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either id or sku is required. Produces the ProductVariantTailoringDeleted Message.

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

+ *     ProductTailoringRemoveVariantAction productTailoringRemoveVariantAction = ProductTailoringRemoveVariantAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringRemoveVariantActionImpl.class) +public interface ProductTailoringRemoveVariantAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringRemoveVariantAction + */ + String REMOVE_VARIANT = "removeVariant"; + + /** + *

The id of the ProductVariant to remove from the Tailoring.

+ * @return id + */ + + @JsonProperty("id") + public Long getId(); + + /** + *

The sku of the ProductVariant to remove from the Tailoring.

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

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the ProductVariant to remove from the Tailoring.

+ * @param id value to be set + */ + + public void setId(final Long id); + + /** + *

The sku of the ProductVariant to remove from the Tailoring.

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

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringRemoveVariantAction + */ + public static ProductTailoringRemoveVariantAction of() { + return new ProductTailoringRemoveVariantActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringRemoveVariantAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringRemoveVariantAction of(final ProductTailoringRemoveVariantAction template) { + ProductTailoringRemoveVariantActionImpl instance = new ProductTailoringRemoveVariantActionImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringRemoveVariantAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringRemoveVariantAction deepCopy( + @Nullable final ProductTailoringRemoveVariantAction template) { + if (template == null) { + return null; + } + ProductTailoringRemoveVariantActionImpl instance = new ProductTailoringRemoveVariantActionImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringRemoveVariantAction + * @return builder + */ + public static ProductTailoringRemoveVariantActionBuilder builder() { + return ProductTailoringRemoveVariantActionBuilder.of(); + } + + /** + * create builder for ProductTailoringRemoveVariantAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveVariantActionBuilder builder( + final ProductTailoringRemoveVariantAction template) { + return ProductTailoringRemoveVariantActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringRemoveVariantAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java new file mode 100644 index 00000000000..91fd8c8df31 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionBuilder.java @@ -0,0 +1,134 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringRemoveVariantActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringRemoveVariantAction productTailoringRemoveVariantAction = ProductTailoringRemoveVariantAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveVariantActionBuilder implements Builder { + + @Nullable + private Long id; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + /** + *

The id of the ProductVariant to remove from the Tailoring.

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

The sku of the ProductVariant to remove from the Tailoring.

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

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

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

The id of the ProductVariant to remove from the Tailoring.

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

The sku of the ProductVariant to remove from the Tailoring.

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

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringRemoveVariantAction with checking for non-null required values + * @return ProductTailoringRemoveVariantAction + */ + public ProductTailoringRemoveVariantAction build() { + return new ProductTailoringRemoveVariantActionImpl(id, sku, staged); + } + + /** + * builds ProductTailoringRemoveVariantAction without checking for non-null required values + * @return ProductTailoringRemoveVariantAction + */ + public ProductTailoringRemoveVariantAction buildUnchecked() { + return new ProductTailoringRemoveVariantActionImpl(id, sku, staged); + } + + /** + * factory method for an instance of ProductTailoringRemoveVariantActionBuilder + * @return builder + */ + public static ProductTailoringRemoveVariantActionBuilder of() { + return new ProductTailoringRemoveVariantActionBuilder(); + } + + /** + * create builder for ProductTailoringRemoveVariantAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringRemoveVariantActionBuilder of(final ProductTailoringRemoveVariantAction template) { + ProductTailoringRemoveVariantActionBuilder builder = new ProductTailoringRemoveVariantActionBuilder(); + builder.id = template.getId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java new file mode 100644 index 00000000000..2aa4661b834 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionImpl.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either id or sku is required. Produces the ProductVariantTailoringDeleted Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringRemoveVariantActionImpl implements ProductTailoringRemoveVariantAction, ModelBase { + + private String action; + + private Long id; + + private String sku; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringRemoveVariantActionImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, + @JsonProperty("staged") final Boolean staged) { + this.id = id; + this.sku = sku; + this.staged = staged; + this.action = REMOVE_VARIANT; + } + + /** + * create empty instance + */ + public ProductTailoringRemoveVariantActionImpl() { + this.action = REMOVE_VARIANT; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the ProductVariant to remove from the Tailoring.

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

The sku of the ProductVariant to remove from the Tailoring.

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

If true, only the staged Product Variant Tailoring is removed. If false, both the current and staged Product Variant Tailoring is removed.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringRemoveVariantActionImpl that = (ProductTailoringRemoveVariantActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(id, that.id) + .append(sku, that.sku) + .append(staged, that.staged) + .append(action, that.action) + .append(id, that.id) + .append(sku, that.sku) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(id).append(sku).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("id", id) + .append("sku", sku) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldAction.java new file mode 100644 index 00000000000..b031f48e834 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldAction.java @@ -0,0 +1,233 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringSetAssetCustomFieldAction productTailoringSetAssetCustomFieldAction = ProductTailoringSetAssetCustomFieldAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetCustomFieldActionImpl.class) +public interface ProductTailoringSetAssetCustomFieldAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetCustomFieldAction + */ + String SET_ASSET_CUSTOM_FIELD = "setAssetCustomField"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductTailoringSetAssetCustomFieldAction + */ + public static ProductTailoringSetAssetCustomFieldAction of() { + return new ProductTailoringSetAssetCustomFieldActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetCustomFieldAction of( + final ProductTailoringSetAssetCustomFieldAction template) { + ProductTailoringSetAssetCustomFieldActionImpl instance = new ProductTailoringSetAssetCustomFieldActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetCustomFieldAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetCustomFieldAction deepCopy( + @Nullable final ProductTailoringSetAssetCustomFieldAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetCustomFieldActionImpl instance = new ProductTailoringSetAssetCustomFieldActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetCustomFieldAction + * @return builder + */ + public static ProductTailoringSetAssetCustomFieldActionBuilder builder() { + return ProductTailoringSetAssetCustomFieldActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetCustomFieldActionBuilder builder( + final ProductTailoringSetAssetCustomFieldAction template) { + return ProductTailoringSetAssetCustomFieldActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetCustomFieldAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionBuilder.java new file mode 100644 index 00000000000..c6bca63cbac --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionBuilder.java @@ -0,0 +1,238 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetCustomFieldActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetCustomFieldAction productTailoringSetAssetCustomFieldAction = ProductTailoringSetAssetCustomFieldAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetCustomFieldActionBuilder + implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + private String name; + + @Nullable + private java.lang.Object value; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductTailoringSetAssetCustomFieldAction with checking for non-null required values + * @return ProductTailoringSetAssetCustomFieldAction + */ + public ProductTailoringSetAssetCustomFieldAction build() { + Objects.requireNonNull(name, ProductTailoringSetAssetCustomFieldAction.class + ": name is missing"); + return new ProductTailoringSetAssetCustomFieldActionImpl(variantId, sku, staged, assetId, assetKey, name, + value); + } + + /** + * builds ProductTailoringSetAssetCustomFieldAction without checking for non-null required values + * @return ProductTailoringSetAssetCustomFieldAction + */ + public ProductTailoringSetAssetCustomFieldAction buildUnchecked() { + return new ProductTailoringSetAssetCustomFieldActionImpl(variantId, sku, staged, assetId, assetKey, name, + value); + } + + /** + * factory method for an instance of ProductTailoringSetAssetCustomFieldActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetCustomFieldActionBuilder of() { + return new ProductTailoringSetAssetCustomFieldActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetCustomFieldAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetCustomFieldActionBuilder of( + final ProductTailoringSetAssetCustomFieldAction template) { + ProductTailoringSetAssetCustomFieldActionBuilder builder = new ProductTailoringSetAssetCustomFieldActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionImpl.java new file mode 100644 index 00000000000..254295bdcda --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionImpl.java @@ -0,0 +1,214 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetCustomFieldActionImpl + implements ProductTailoringSetAssetCustomFieldAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetCustomFieldActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("name") final String name, @JsonProperty("value") final java.lang.Object value) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.name = name; + this.value = value; + this.action = SET_ASSET_CUSTOM_FIELD; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetCustomFieldActionImpl() { + this.action = SET_ASSET_CUSTOM_FIELD; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Name of the Custom Field.

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

If value is absent or null, this field will be removed if it exists. Removing a field that does not exist returns an InvalidOperation error. If value is provided, it is set for the field defined by name.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetCustomFieldActionImpl that = (ProductTailoringSetAssetCustomFieldActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(name, that.name) + .append(value, that.value) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(name) + .append(value) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeAction.java new file mode 100644 index 00000000000..73939e0f320 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeAction.java @@ -0,0 +1,233 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.type.FieldContainer; +import com.commercetools.api.models.type.TypeResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringSetAssetCustomTypeAction productTailoringSetAssetCustomTypeAction = ProductTailoringSetAssetCustomTypeAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetCustomTypeActionImpl.class) +public interface ProductTailoringSetAssetCustomTypeAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetCustomTypeAction + */ + String SET_ASSET_CUSTOM_TYPE = "setAssetCustomType"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ * @return type + */ + @Valid + @JsonProperty("type") + public TypeResourceIdentifier getType(); + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @return fields + */ + @Valid + @JsonProperty("fields") + public FieldContainer getFields(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ * @param type value to be set + */ + + public void setType(final TypeResourceIdentifier type); + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @param fields value to be set + */ + + public void setFields(final FieldContainer fields); + + /** + * factory method + * @return instance of ProductTailoringSetAssetCustomTypeAction + */ + public static ProductTailoringSetAssetCustomTypeAction of() { + return new ProductTailoringSetAssetCustomTypeActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetCustomTypeAction of(final ProductTailoringSetAssetCustomTypeAction template) { + ProductTailoringSetAssetCustomTypeActionImpl instance = new ProductTailoringSetAssetCustomTypeActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setType(template.getType()); + instance.setFields(template.getFields()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetCustomTypeAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetCustomTypeAction deepCopy( + @Nullable final ProductTailoringSetAssetCustomTypeAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetCustomTypeActionImpl instance = new ProductTailoringSetAssetCustomTypeActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setType(com.commercetools.api.models.type.TypeResourceIdentifier.deepCopy(template.getType())); + instance.setFields(com.commercetools.api.models.type.FieldContainer.deepCopy(template.getFields())); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetCustomTypeAction + * @return builder + */ + public static ProductTailoringSetAssetCustomTypeActionBuilder builder() { + return ProductTailoringSetAssetCustomTypeActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetCustomTypeActionBuilder builder( + final ProductTailoringSetAssetCustomTypeAction template) { + return ProductTailoringSetAssetCustomTypeActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetCustomTypeAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionBuilder.java new file mode 100644 index 00000000000..af64525a70e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionBuilder.java @@ -0,0 +1,289 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetCustomTypeActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetCustomTypeAction productTailoringSetAssetCustomTypeAction = ProductTailoringSetAssetCustomTypeAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetCustomTypeActionBuilder + implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + @Nullable + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + @Nullable + private com.commercetools.api.models.type.FieldContainer fields; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

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

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ * @param builder function to build the type value + * @return Builder + */ + + public ProductTailoringSetAssetCustomTypeActionBuilder withType( + Function builder) { + this.type = builder.apply(com.commercetools.api.models.type.TypeResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ * @param type value to be set + * @return Builder + */ + + public ProductTailoringSetAssetCustomTypeActionBuilder type( + @Nullable final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + return this; + } + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @param builder function to build the fields value + * @return Builder + */ + + public ProductTailoringSetAssetCustomTypeActionBuilder fields( + Function builder) { + this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()).build(); + return this; + } + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @param builder function to build the fields value + * @return Builder + */ + + public ProductTailoringSetAssetCustomTypeActionBuilder withFields( + Function builder) { + this.fields = builder.apply(com.commercetools.api.models.type.FieldContainerBuilder.of()); + return this; + } + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @param fields value to be set + * @return Builder + */ + + public ProductTailoringSetAssetCustomTypeActionBuilder fields( + @Nullable final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + return this; + } + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ * @return type + */ + + @Nullable + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

Sets the Custom Fields fields for the Asset.

+ * @return fields + */ + + @Nullable + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + /** + * builds ProductTailoringSetAssetCustomTypeAction with checking for non-null required values + * @return ProductTailoringSetAssetCustomTypeAction + */ + public ProductTailoringSetAssetCustomTypeAction build() { + return new ProductTailoringSetAssetCustomTypeActionImpl(variantId, sku, staged, assetId, assetKey, type, + fields); + } + + /** + * builds ProductTailoringSetAssetCustomTypeAction without checking for non-null required values + * @return ProductTailoringSetAssetCustomTypeAction + */ + public ProductTailoringSetAssetCustomTypeAction buildUnchecked() { + return new ProductTailoringSetAssetCustomTypeActionImpl(variantId, sku, staged, assetId, assetKey, type, + fields); + } + + /** + * factory method for an instance of ProductTailoringSetAssetCustomTypeActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetCustomTypeActionBuilder of() { + return new ProductTailoringSetAssetCustomTypeActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetCustomTypeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetCustomTypeActionBuilder of( + final ProductTailoringSetAssetCustomTypeAction template) { + ProductTailoringSetAssetCustomTypeActionBuilder builder = new ProductTailoringSetAssetCustomTypeActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.type = template.getType(); + builder.fields = template.getFields(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionImpl.java new file mode 100644 index 00000000000..b428f45d301 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionImpl.java @@ -0,0 +1,215 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetCustomTypeActionImpl + implements ProductTailoringSetAssetCustomTypeAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private com.commercetools.api.models.type.TypeResourceIdentifier type; + + private com.commercetools.api.models.type.FieldContainer fields; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetCustomTypeActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("type") final com.commercetools.api.models.type.TypeResourceIdentifier type, + @JsonProperty("fields") final com.commercetools.api.models.type.FieldContainer fields) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.type = type; + this.fields = fields; + this.action = SET_ASSET_CUSTOM_TYPE; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetCustomTypeActionImpl() { + this.action = SET_ASSET_CUSTOM_TYPE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Defines the Type that extends the Asset with Custom Fields. If absent, any existing Type and Custom Fields are removed from the Asset.

+ */ + + public com.commercetools.api.models.type.TypeResourceIdentifier getType() { + return this.type; + } + + /** + *

Sets the Custom Fields fields for the Asset.

+ */ + + public com.commercetools.api.models.type.FieldContainer getFields() { + return this.fields; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setType(final com.commercetools.api.models.type.TypeResourceIdentifier type) { + this.type = type; + } + + public void setFields(final com.commercetools.api.models.type.FieldContainer fields) { + this.fields = fields; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetCustomTypeActionImpl that = (ProductTailoringSetAssetCustomTypeActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(type, that.type) + .append(fields, that.fields) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(type, that.type) + .append(fields, that.fields) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(type) + .append(fields) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("type", type) + .append("fields", fields) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionAction.java new file mode 100644 index 00000000000..f9647f23068 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionAction.java @@ -0,0 +1,217 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.LocalizedString; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringSetAssetDescriptionAction productTailoringSetAssetDescriptionAction = ProductTailoringSetAssetDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetDescriptionActionImpl.class) +public interface ProductTailoringSetAssetDescriptionAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetDescriptionAction + */ + String SET_ASSET_DESCRIPTION = "setAssetDescription"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Value to set. If empty, any existing value will be removed.

+ * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + * factory method + * @return instance of ProductTailoringSetAssetDescriptionAction + */ + public static ProductTailoringSetAssetDescriptionAction of() { + return new ProductTailoringSetAssetDescriptionActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetDescriptionAction of( + final ProductTailoringSetAssetDescriptionAction template) { + ProductTailoringSetAssetDescriptionActionImpl instance = new ProductTailoringSetAssetDescriptionActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setDescription(template.getDescription()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetDescriptionAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetDescriptionAction deepCopy( + @Nullable final ProductTailoringSetAssetDescriptionAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetDescriptionActionImpl instance = new ProductTailoringSetAssetDescriptionActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setDescription( + com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetDescriptionAction + * @return builder + */ + public static ProductTailoringSetAssetDescriptionActionBuilder builder() { + return ProductTailoringSetAssetDescriptionActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetDescriptionActionBuilder builder( + final ProductTailoringSetAssetDescriptionAction template) { + return ProductTailoringSetAssetDescriptionActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetDescriptionAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionBuilder.java new file mode 100644 index 00000000000..331ddd733ee --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionBuilder.java @@ -0,0 +1,239 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetDescriptionActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetDescriptionAction productTailoringSetAssetDescriptionAction = ProductTailoringSetAssetDescriptionAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetDescriptionActionBuilder + implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + @Nullable + private com.commercetools.api.models.common.LocalizedString description; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

Value to set. If empty, any existing value will be removed.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return description + */ + + @Nullable + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + * builds ProductTailoringSetAssetDescriptionAction with checking for non-null required values + * @return ProductTailoringSetAssetDescriptionAction + */ + public ProductTailoringSetAssetDescriptionAction build() { + return new ProductTailoringSetAssetDescriptionActionImpl(variantId, sku, staged, assetId, assetKey, + description); + } + + /** + * builds ProductTailoringSetAssetDescriptionAction without checking for non-null required values + * @return ProductTailoringSetAssetDescriptionAction + */ + public ProductTailoringSetAssetDescriptionAction buildUnchecked() { + return new ProductTailoringSetAssetDescriptionActionImpl(variantId, sku, staged, assetId, assetKey, + description); + } + + /** + * factory method for an instance of ProductTailoringSetAssetDescriptionActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetDescriptionActionBuilder of() { + return new ProductTailoringSetAssetDescriptionActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetDescriptionAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetDescriptionActionBuilder of( + final ProductTailoringSetAssetDescriptionAction template) { + ProductTailoringSetAssetDescriptionActionBuilder builder = new ProductTailoringSetAssetDescriptionActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.description = template.getDescription(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionImpl.java new file mode 100644 index 00000000000..7cc2458a64f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionImpl.java @@ -0,0 +1,195 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetDescriptionActionImpl + implements ProductTailoringSetAssetDescriptionAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private com.commercetools.api.models.common.LocalizedString description; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetDescriptionActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.description = description; + this.action = SET_ASSET_DESCRIPTION; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetDescriptionActionImpl() { + this.action = SET_ASSET_DESCRIPTION; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ */ + + public com.commercetools.api.models.common.LocalizedString getDescription() { + return this.description; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setDescription(final com.commercetools.api.models.common.LocalizedString description) { + this.description = description; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetDescriptionActionImpl that = (ProductTailoringSetAssetDescriptionActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(description, that.description) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(description, that.description) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(description) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("description", description) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyAction.java new file mode 100644 index 00000000000..6f96915c2f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyAction.java @@ -0,0 +1,196 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringSetAssetKeyAction productTailoringSetAssetKeyAction = ProductTailoringSetAssetKeyAction.builder()
+ *             .assetId("{assetId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetKeyActionImpl.class) +public interface ProductTailoringSetAssetKeyAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetKeyAction + */ + String SET_ASSET_KEY = "setAssetKey"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + @NotNull + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

Value to set. If empty, any existing value will be removed.

+ * @param assetKey value to be set + */ + + public void setAssetKey(final String assetKey); + + /** + * factory method + * @return instance of ProductTailoringSetAssetKeyAction + */ + public static ProductTailoringSetAssetKeyAction of() { + return new ProductTailoringSetAssetKeyActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetKeyAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetKeyAction of(final ProductTailoringSetAssetKeyAction template) { + ProductTailoringSetAssetKeyActionImpl instance = new ProductTailoringSetAssetKeyActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetKeyAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetKeyAction deepCopy( + @Nullable final ProductTailoringSetAssetKeyAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetKeyActionImpl instance = new ProductTailoringSetAssetKeyActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetKeyAction + * @return builder + */ + public static ProductTailoringSetAssetKeyActionBuilder builder() { + return ProductTailoringSetAssetKeyActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetKeyActionBuilder builder(final ProductTailoringSetAssetKeyAction template) { + return ProductTailoringSetAssetKeyActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetKeyAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionBuilder.java new file mode 100644 index 00000000000..3fea2daaf37 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetKeyActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetKeyAction productTailoringSetAssetKeyAction = ProductTailoringSetAssetKeyAction.builder()
+ *             .assetId("{assetId}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetKeyActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + private String assetId; + + @Nullable + private String assetKey; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

Value to set. If empty, any existing value will be removed.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + * builds ProductTailoringSetAssetKeyAction with checking for non-null required values + * @return ProductTailoringSetAssetKeyAction + */ + public ProductTailoringSetAssetKeyAction build() { + Objects.requireNonNull(assetId, ProductTailoringSetAssetKeyAction.class + ": assetId is missing"); + return new ProductTailoringSetAssetKeyActionImpl(variantId, sku, staged, assetId, assetKey); + } + + /** + * builds ProductTailoringSetAssetKeyAction without checking for non-null required values + * @return ProductTailoringSetAssetKeyAction + */ + public ProductTailoringSetAssetKeyAction buildUnchecked() { + return new ProductTailoringSetAssetKeyActionImpl(variantId, sku, staged, assetId, assetKey); + } + + /** + * factory method for an instance of ProductTailoringSetAssetKeyActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetKeyActionBuilder of() { + return new ProductTailoringSetAssetKeyActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetKeyActionBuilder of(final ProductTailoringSetAssetKeyAction template) { + ProductTailoringSetAssetKeyActionBuilder builder = new ProductTailoringSetAssetKeyActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionImpl.java new file mode 100644 index 00000000000..5562d9a2e00 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionImpl.java @@ -0,0 +1,174 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetKeyActionImpl implements ProductTailoringSetAssetKeyAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetKeyActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.action = SET_ASSET_KEY; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetKeyActionImpl() { + this.action = SET_ASSET_KEY; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetKeyActionImpl that = (ProductTailoringSetAssetKeyActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesAction.java new file mode 100644 index 00000000000..5fd10b01464 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesAction.java @@ -0,0 +1,230 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.AssetSource; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringSetAssetSourcesAction productTailoringSetAssetSourcesAction = ProductTailoringSetAssetSourcesAction.builder()
+ *             .plusSources(sourcesBuilder -> sourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetSourcesActionImpl.class) +public interface ProductTailoringSetAssetSourcesAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetSourcesAction + */ + String SET_ASSET_SOURCES = "setAssetSources"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

Value to set.

+ * @return sources + */ + @NotNull + @Valid + @JsonProperty("sources") + public List getSources(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Value to set.

+ * @param sources values to be set + */ + + @JsonIgnore + public void setSources(final AssetSource... sources); + + /** + *

Value to set.

+ * @param sources values to be set + */ + + public void setSources(final List sources); + + /** + * factory method + * @return instance of ProductTailoringSetAssetSourcesAction + */ + public static ProductTailoringSetAssetSourcesAction of() { + return new ProductTailoringSetAssetSourcesActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetSourcesAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetSourcesAction of(final ProductTailoringSetAssetSourcesAction template) { + ProductTailoringSetAssetSourcesActionImpl instance = new ProductTailoringSetAssetSourcesActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setSources(template.getSources()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetSourcesAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetSourcesAction deepCopy( + @Nullable final ProductTailoringSetAssetSourcesAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetSourcesActionImpl instance = new ProductTailoringSetAssetSourcesActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setSources(Optional.ofNullable(template.getSources()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.AssetSource::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetSourcesAction + * @return builder + */ + public static ProductTailoringSetAssetSourcesActionBuilder builder() { + return ProductTailoringSetAssetSourcesActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetSourcesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetSourcesActionBuilder builder( + final ProductTailoringSetAssetSourcesAction template) { + return ProductTailoringSetAssetSourcesActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetSourcesAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionBuilder.java new file mode 100644 index 00000000000..38947c281dc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionBuilder.java @@ -0,0 +1,289 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetSourcesActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetSourcesAction productTailoringSetAssetSourcesAction = ProductTailoringSetAssetSourcesAction.builder()
+ *             .plusSources(sourcesBuilder -> sourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetSourcesActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + private java.util.List sources; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Value to set.

+ * @param sources value to be set + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder sources( + final com.commercetools.api.models.common.AssetSource... sources) { + this.sources = new ArrayList<>(Arrays.asList(sources)); + return this; + } + + /** + *

Value to set.

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

Value to set.

+ * @param sources value to be set + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder plusSources( + final com.commercetools.api.models.common.AssetSource... sources) { + if (this.sources == null) { + this.sources = new ArrayList<>(); + } + this.sources.addAll(Arrays.asList(sources)); + return this; + } + + /** + *

Value to set.

+ * @param builder function to build the sources value + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder plusSources( + Function builder) { + if (this.sources == null) { + this.sources = new ArrayList<>(); + } + this.sources.add(builder.apply(com.commercetools.api.models.common.AssetSourceBuilder.of()).build()); + return this; + } + + /** + *

Value to set.

+ * @param builder function to build the sources value + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder withSources( + Function builder) { + this.sources = new ArrayList<>(); + this.sources.add(builder.apply(com.commercetools.api.models.common.AssetSourceBuilder.of()).build()); + return this; + } + + /** + *

Value to set.

+ * @param builder function to build the sources value + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder addSources( + Function builder) { + return plusSources(builder.apply(com.commercetools.api.models.common.AssetSourceBuilder.of())); + } + + /** + *

Value to set.

+ * @param builder function to build the sources value + * @return Builder + */ + + public ProductTailoringSetAssetSourcesActionBuilder setSources( + Function builder) { + return sources(builder.apply(com.commercetools.api.models.common.AssetSourceBuilder.of())); + } + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Value to set.

+ * @return sources + */ + + public java.util.List getSources() { + return this.sources; + } + + /** + * builds ProductTailoringSetAssetSourcesAction with checking for non-null required values + * @return ProductTailoringSetAssetSourcesAction + */ + public ProductTailoringSetAssetSourcesAction build() { + Objects.requireNonNull(sources, ProductTailoringSetAssetSourcesAction.class + ": sources is missing"); + return new ProductTailoringSetAssetSourcesActionImpl(variantId, sku, staged, assetId, assetKey, sources); + } + + /** + * builds ProductTailoringSetAssetSourcesAction without checking for non-null required values + * @return ProductTailoringSetAssetSourcesAction + */ + public ProductTailoringSetAssetSourcesAction buildUnchecked() { + return new ProductTailoringSetAssetSourcesActionImpl(variantId, sku, staged, assetId, assetKey, sources); + } + + /** + * factory method for an instance of ProductTailoringSetAssetSourcesActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetSourcesActionBuilder of() { + return new ProductTailoringSetAssetSourcesActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetSourcesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetSourcesActionBuilder of( + final ProductTailoringSetAssetSourcesAction template) { + ProductTailoringSetAssetSourcesActionBuilder builder = new ProductTailoringSetAssetSourcesActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.sources = template.getSources(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionImpl.java new file mode 100644 index 00000000000..098dfaed13b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionImpl.java @@ -0,0 +1,198 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetSourcesActionImpl implements ProductTailoringSetAssetSourcesAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private java.util.List sources; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetSourcesActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("sources") final java.util.List sources) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.sources = sources; + this.action = SET_ASSET_SOURCES; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetSourcesActionImpl() { + this.action = SET_ASSET_SOURCES; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Value to set.

+ */ + + public java.util.List getSources() { + return this.sources; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setSources(final com.commercetools.api.models.common.AssetSource... sources) { + this.sources = new ArrayList<>(Arrays.asList(sources)); + } + + public void setSources(final java.util.List sources) { + this.sources = sources; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetSourcesActionImpl that = (ProductTailoringSetAssetSourcesActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(sources, that.sources) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(sources, that.sources) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(sources) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("sources", sources) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsAction.java new file mode 100644 index 00000000000..bd65def505c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsAction.java @@ -0,0 +1,218 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

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

+ *     ProductTailoringSetAssetTagsAction productTailoringSetAssetTagsAction = ProductTailoringSetAssetTagsAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAssetTagsActionImpl.class) +public interface ProductTailoringSetAssetTagsAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAssetTagsAction + */ + String SET_ASSET_TAGS = "setAssetTags"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @JsonProperty("assetId") + public String getAssetId(); + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @JsonProperty("assetKey") + public String getAssetKey(); + + /** + *

Keywords for categorizing and organizing Assets.

+ * @return tags + */ + + @JsonProperty("tags") + public List getTags(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Keywords for categorizing and organizing Assets.

+ * @param tags values to be set + */ + + @JsonIgnore + public void setTags(final String... tags); + + /** + *

Keywords for categorizing and organizing Assets.

+ * @param tags values to be set + */ + + public void setTags(final List tags); + + /** + * factory method + * @return instance of ProductTailoringSetAssetTagsAction + */ + public static ProductTailoringSetAssetTagsAction of() { + return new ProductTailoringSetAssetTagsActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAssetTagsAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAssetTagsAction of(final ProductTailoringSetAssetTagsAction template) { + ProductTailoringSetAssetTagsActionImpl instance = new ProductTailoringSetAssetTagsActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setTags(template.getTags()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAssetTagsAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAssetTagsAction deepCopy( + @Nullable final ProductTailoringSetAssetTagsAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAssetTagsActionImpl instance = new ProductTailoringSetAssetTagsActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setStaged(template.getStaged()); + instance.setAssetId(template.getAssetId()); + instance.setAssetKey(template.getAssetKey()); + instance.setTags(Optional.ofNullable(template.getTags()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAssetTagsAction + * @return builder + */ + public static ProductTailoringSetAssetTagsActionBuilder builder() { + return ProductTailoringSetAssetTagsActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAssetTagsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetTagsActionBuilder builder(final ProductTailoringSetAssetTagsAction template) { + return ProductTailoringSetAssetTagsActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAssetTagsAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionBuilder.java new file mode 100644 index 00000000000..e781953b15b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionBuilder.java @@ -0,0 +1,234 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAssetTagsActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAssetTagsAction productTailoringSetAssetTagsAction = ProductTailoringSetAssetTagsAction.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetTagsActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + @Nullable + private Boolean staged; + + @Nullable + private String assetId; + + @Nullable + private String assetKey; + + @Nullable + private java.util.List tags; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

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

The id of the Asset to update.

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

The key of the Asset to update.

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

Keywords for categorizing and organizing Assets.

+ * @param tags value to be set + * @return Builder + */ + + public ProductTailoringSetAssetTagsActionBuilder tags(@Nullable final String... tags) { + this.tags = new ArrayList<>(Arrays.asList(tags)); + return this; + } + + /** + *

Keywords for categorizing and organizing Assets.

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

Keywords for categorizing and organizing Assets.

+ * @param tags value to be set + * @return Builder + */ + + public ProductTailoringSetAssetTagsActionBuilder plusTags(@Nullable final String... tags) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.addAll(Arrays.asList(tags)); + return this; + } + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ * @return assetId + */ + + @Nullable + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ * @return assetKey + */ + + @Nullable + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Keywords for categorizing and organizing Assets.

+ * @return tags + */ + + @Nullable + public java.util.List getTags() { + return this.tags; + } + + /** + * builds ProductTailoringSetAssetTagsAction with checking for non-null required values + * @return ProductTailoringSetAssetTagsAction + */ + public ProductTailoringSetAssetTagsAction build() { + return new ProductTailoringSetAssetTagsActionImpl(variantId, sku, staged, assetId, assetKey, tags); + } + + /** + * builds ProductTailoringSetAssetTagsAction without checking for non-null required values + * @return ProductTailoringSetAssetTagsAction + */ + public ProductTailoringSetAssetTagsAction buildUnchecked() { + return new ProductTailoringSetAssetTagsActionImpl(variantId, sku, staged, assetId, assetKey, tags); + } + + /** + * factory method for an instance of ProductTailoringSetAssetTagsActionBuilder + * @return builder + */ + public static ProductTailoringSetAssetTagsActionBuilder of() { + return new ProductTailoringSetAssetTagsActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAssetTagsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAssetTagsActionBuilder of(final ProductTailoringSetAssetTagsAction template) { + ProductTailoringSetAssetTagsActionBuilder builder = new ProductTailoringSetAssetTagsActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.staged = template.getStaged(); + builder.assetId = template.getAssetId(); + builder.assetKey = template.getAssetKey(); + builder.tags = template.getTags(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionImpl.java new file mode 100644 index 00000000000..1bbfbbea33b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionImpl.java @@ -0,0 +1,198 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. The Asset to update must be specified using either assetId or assetKey.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAssetTagsActionImpl implements ProductTailoringSetAssetTagsAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private Boolean staged; + + private String assetId; + + private String assetKey; + + private java.util.List tags; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAssetTagsActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("staged") final Boolean staged, + @JsonProperty("assetId") final String assetId, @JsonProperty("assetKey") final String assetKey, + @JsonProperty("tags") final java.util.List tags) { + this.variantId = variantId; + this.sku = sku; + this.staged = staged; + this.assetId = assetId; + this.assetKey = assetKey; + this.tags = tags; + this.action = SET_ASSET_TAGS; + } + + /** + * create empty instance + */ + public ProductTailoringSetAssetTagsActionImpl() { + this.action = SET_ASSET_TAGS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

If true, only the staged Asset is updated. If false, both the current and staged Asset is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + /** + *

The id of the Asset to update.

+ */ + + public String getAssetId() { + return this.assetId; + } + + /** + *

The key of the Asset to update.

+ */ + + public String getAssetKey() { + return this.assetKey; + } + + /** + *

Keywords for categorizing and organizing Assets.

+ */ + + public java.util.List getTags() { + return this.tags; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + public void setAssetId(final String assetId) { + this.assetId = assetId; + } + + public void setAssetKey(final String assetKey) { + this.assetKey = assetKey; + } + + public void setTags(final String... tags) { + this.tags = new ArrayList<>(Arrays.asList(tags)); + } + + public void setTags(final java.util.List tags) { + this.tags = tags; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAssetTagsActionImpl that = (ProductTailoringSetAssetTagsActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(tags, that.tags) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(staged, that.staged) + .append(assetId, that.assetId) + .append(assetKey, that.assetKey) + .append(tags, that.tags) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(staged) + .append(assetId) + .append(assetKey) + .append(tags) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("staged", staged) + .append("assetId", assetId) + .append("assetKey", assetKey) + .append("tags", tags) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java new file mode 100644 index 00000000000..9dc9b912250 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesAction.java @@ -0,0 +1,197 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Image; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImagesSet Message.

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

+ *     ProductTailoringSetExternalImagesAction productTailoringSetExternalImagesAction = ProductTailoringSetExternalImagesAction.builder()
+ *             .plusImages(imagesBuilder -> imagesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetExternalImagesActionImpl.class) +public interface ProductTailoringSetExternalImagesAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetExternalImagesAction + */ + String SET_IMAGES = "setImages"; + + /** + *

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to set to images.

+ * @return images + */ + @NotNull + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to set to images.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Value to set to images.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetExternalImagesAction + */ + public static ProductTailoringSetExternalImagesAction of() { + return new ProductTailoringSetExternalImagesActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetExternalImagesAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetExternalImagesAction of(final ProductTailoringSetExternalImagesAction template) { + ProductTailoringSetExternalImagesActionImpl instance = new ProductTailoringSetExternalImagesActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImages(template.getImages()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetExternalImagesAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetExternalImagesAction deepCopy( + @Nullable final ProductTailoringSetExternalImagesAction template) { + if (template == null) { + return null; + } + ProductTailoringSetExternalImagesActionImpl instance = new ProductTailoringSetExternalImagesActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetExternalImagesAction + * @return builder + */ + public static ProductTailoringSetExternalImagesActionBuilder builder() { + return ProductTailoringSetExternalImagesActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetExternalImagesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetExternalImagesActionBuilder builder( + final ProductTailoringSetExternalImagesAction template) { + return ProductTailoringSetExternalImagesActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetExternalImagesAction( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java new file mode 100644 index 00000000000..92b56432053 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionBuilder.java @@ -0,0 +1,240 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetExternalImagesActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetExternalImagesAction productTailoringSetExternalImagesAction = ProductTailoringSetExternalImagesAction.builder()
+ *             .plusImages(imagesBuilder -> imagesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetExternalImagesActionBuilder + implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + private java.util.List images; + + @Nullable + private Boolean staged; + + /** + *

The id of the tailored ProductVariant to update.

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

The sku of the tailored ProductVariant to update.

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

Value to set to images.

+ * @param images value to be set + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder images( + final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + return this; + } + + /** + *

Value to set to images.

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

Value to set to images.

+ * @param images value to be set + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder plusImages( + final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Value to set to images.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Value to set to images.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Value to set to images.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Value to set to images.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductTailoringSetExternalImagesActionBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to set to images.

+ * @return images + */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetExternalImagesAction with checking for non-null required values + * @return ProductTailoringSetExternalImagesAction + */ + public ProductTailoringSetExternalImagesAction build() { + Objects.requireNonNull(images, ProductTailoringSetExternalImagesAction.class + ": images is missing"); + return new ProductTailoringSetExternalImagesActionImpl(variantId, sku, images, staged); + } + + /** + * builds ProductTailoringSetExternalImagesAction without checking for non-null required values + * @return ProductTailoringSetExternalImagesAction + */ + public ProductTailoringSetExternalImagesAction buildUnchecked() { + return new ProductTailoringSetExternalImagesActionImpl(variantId, sku, images, staged); + } + + /** + * factory method for an instance of ProductTailoringSetExternalImagesActionBuilder + * @return builder + */ + public static ProductTailoringSetExternalImagesActionBuilder of() { + return new ProductTailoringSetExternalImagesActionBuilder(); + } + + /** + * create builder for ProductTailoringSetExternalImagesAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetExternalImagesActionBuilder of( + final ProductTailoringSetExternalImagesAction template) { + ProductTailoringSetExternalImagesActionBuilder builder = new ProductTailoringSetExternalImagesActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.images = template.getImages(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java new file mode 100644 index 00000000000..f4f4fd4f275 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionImpl.java @@ -0,0 +1,160 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists. Produces the ProductTailoringImagesSet Message.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetExternalImagesActionImpl implements ProductTailoringSetExternalImagesAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private java.util.List images; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetExternalImagesActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, + @JsonProperty("images") final java.util.List images, + @JsonProperty("staged") final Boolean staged) { + this.variantId = variantId; + this.sku = sku; + this.images = images; + this.staged = staged; + this.action = SET_IMAGES; + } + + /** + * create empty instance + */ + public ProductTailoringSetExternalImagesActionImpl() { + this.action = SET_IMAGES; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

Value to set to images.

+ */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

If true, only the staged images is updated. If false, both the current and staged images is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetExternalImagesActionImpl that = (ProductTailoringSetExternalImagesActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(images, that.images) + .append(staged, that.staged) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(images, that.images) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(images) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("images", images) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java new file mode 100644 index 00000000000..dd4a04894a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelAction.java @@ -0,0 +1,197 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

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

+ *     ProductTailoringSetImageLabelAction productTailoringSetImageLabelAction = ProductTailoringSetImageLabelAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetImageLabelActionImpl.class) +public interface ProductTailoringSetImageLabelAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetImageLabelAction + */ + String SET_IMAGE_LABEL = "setImageLabel"; + + /** + *

The sku of the tailored ProductVariant to update.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @JsonProperty("variantId") + public Long getVariantId(); + + /** + *

The URL of the image to set the label.

+ * @return imageUrl + */ + @NotNull + @JsonProperty("imageUrl") + public String getImageUrl(); + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return label + */ + + @JsonProperty("label") + public String getLabel(); + + /** + *

If true, only the staged image is updated. If false, both the current and staged image is updated.

+ * @return staged + */ + + @JsonProperty("staged") + public Boolean getStaged(); + + /** + *

The sku of the tailored ProductVariant to update.

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

The id of the tailored ProductVariant to update.

+ * @param variantId value to be set + */ + + public void setVariantId(final Long variantId); + + /** + *

The URL of the image to set the label.

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

Value to set. If empty, any existing value will be removed.

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

If true, only the staged image is updated. If false, both the current and staged image is updated.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetImageLabelAction + */ + public static ProductTailoringSetImageLabelAction of() { + return new ProductTailoringSetImageLabelActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetImageLabelAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetImageLabelAction of(final ProductTailoringSetImageLabelAction template) { + ProductTailoringSetImageLabelActionImpl instance = new ProductTailoringSetImageLabelActionImpl(); + instance.setSku(template.getSku()); + instance.setVariantId(template.getVariantId()); + instance.setImageUrl(template.getImageUrl()); + instance.setLabel(template.getLabel()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetImageLabelAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetImageLabelAction deepCopy( + @Nullable final ProductTailoringSetImageLabelAction template) { + if (template == null) { + return null; + } + ProductTailoringSetImageLabelActionImpl instance = new ProductTailoringSetImageLabelActionImpl(); + instance.setSku(template.getSku()); + instance.setVariantId(template.getVariantId()); + instance.setImageUrl(template.getImageUrl()); + instance.setLabel(template.getLabel()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetImageLabelAction + * @return builder + */ + public static ProductTailoringSetImageLabelActionBuilder builder() { + return ProductTailoringSetImageLabelActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetImageLabelAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetImageLabelActionBuilder builder( + final ProductTailoringSetImageLabelAction template) { + return ProductTailoringSetImageLabelActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetImageLabelAction(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java new file mode 100644 index 00000000000..04e5e173fec --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionBuilder.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetImageLabelActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetImageLabelAction productTailoringSetImageLabelAction = ProductTailoringSetImageLabelAction.builder()
+ *             .imageUrl("{imageUrl}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetImageLabelActionBuilder implements Builder { + + @Nullable + private String sku; + + @Nullable + private Long variantId; + + private String imageUrl; + + @Nullable + private String label; + + @Nullable + private Boolean staged; + + /** + *

The sku of the tailored ProductVariant to update.

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

The id of the tailored ProductVariant to update.

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

The URL of the image to set the label.

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

Value to set. If empty, any existing value will be removed.

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

If true, only the staged image is updated. If false, both the current and staged image is updated.

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

The sku of the tailored ProductVariant to update.

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

The id of the tailored ProductVariant to update.

+ * @return variantId + */ + + @Nullable + public Long getVariantId() { + return this.variantId; + } + + /** + *

The URL of the image to set the label.

+ * @return imageUrl + */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ * @return label + */ + + @Nullable + public String getLabel() { + return this.label; + } + + /** + *

If true, only the staged image is updated. If false, both the current and staged image is updated.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetImageLabelAction with checking for non-null required values + * @return ProductTailoringSetImageLabelAction + */ + public ProductTailoringSetImageLabelAction build() { + Objects.requireNonNull(imageUrl, ProductTailoringSetImageLabelAction.class + ": imageUrl is missing"); + return new ProductTailoringSetImageLabelActionImpl(sku, variantId, imageUrl, label, staged); + } + + /** + * builds ProductTailoringSetImageLabelAction without checking for non-null required values + * @return ProductTailoringSetImageLabelAction + */ + public ProductTailoringSetImageLabelAction buildUnchecked() { + return new ProductTailoringSetImageLabelActionImpl(sku, variantId, imageUrl, label, staged); + } + + /** + * factory method for an instance of ProductTailoringSetImageLabelActionBuilder + * @return builder + */ + public static ProductTailoringSetImageLabelActionBuilder of() { + return new ProductTailoringSetImageLabelActionBuilder(); + } + + /** + * create builder for ProductTailoringSetImageLabelAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetImageLabelActionBuilder of(final ProductTailoringSetImageLabelAction template) { + ProductTailoringSetImageLabelActionBuilder builder = new ProductTailoringSetImageLabelActionBuilder(); + builder.sku = template.getSku(); + builder.variantId = template.getVariantId(); + builder.imageUrl = template.getImageUrl(); + builder.label = template.getLabel(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java new file mode 100644 index 00000000000..5447c7a860d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionImpl.java @@ -0,0 +1,174 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetImageLabelActionImpl implements ProductTailoringSetImageLabelAction, ModelBase { + + private String action; + + private String sku; + + private Long variantId; + + private String imageUrl; + + private String label; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetImageLabelActionImpl(@JsonProperty("sku") final String sku, + @JsonProperty("variantId") final Long variantId, @JsonProperty("imageUrl") final String imageUrl, + @JsonProperty("label") final String label, @JsonProperty("staged") final Boolean staged) { + this.sku = sku; + this.variantId = variantId; + this.imageUrl = imageUrl; + this.label = label; + this.staged = staged; + this.action = SET_IMAGE_LABEL; + } + + /** + * create empty instance + */ + public ProductTailoringSetImageLabelActionImpl() { + this.action = SET_IMAGE_LABEL; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The sku of the tailored ProductVariant to update.

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

The id of the tailored ProductVariant to update.

+ */ + + public Long getVariantId() { + return this.variantId; + } + + /** + *

The URL of the image to set the label.

+ */ + + public String getImageUrl() { + return this.imageUrl; + } + + /** + *

Value to set. If empty, any existing value will be removed.

+ */ + + public String getLabel() { + return this.label; + } + + /** + *

If true, only the staged image is updated. If false, both the current and staged image is updated.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setImageUrl(final String imageUrl) { + this.imageUrl = imageUrl; + } + + public void setLabel(final String label) { + this.label = label; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetImageLabelActionImpl that = (ProductTailoringSetImageLabelActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(sku, that.sku) + .append(variantId, that.variantId) + .append(imageUrl, that.imageUrl) + .append(label, that.label) + .append(staged, that.staged) + .append(action, that.action) + .append(sku, that.sku) + .append(variantId, that.variantId) + .append(imageUrl, that.imageUrl) + .append(label, that.label) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(sku) + .append(variantId) + .append(imageUrl) + .append(label) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("sku", sku) + .append("variantId", variantId) + .append("imageUrl", imageUrl) + .append("label", label) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java index fad04748978..54594222adf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java @@ -21,14 +21,32 @@ * Example to create a subtype instance using the builder pattern *
*

- *     ProductTailoringUpdateAction productTailoringUpdateAction = ProductTailoringUpdateAction.publishBuilder()
+ *     ProductTailoringUpdateAction productTailoringUpdateAction = ProductTailoringUpdateAction.addAssetBuilder()
+ *             asset(assetBuilder -> assetBuilder)
  *             .build()
  * 
*
*/ @JsonSubTypes({ + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionImpl.class, name = ProductTailoringAddAssetAction.ADD_ASSET), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageActionImpl.class, name = ProductTailoringAddExternalImageAction.ADD_EXTERNAL_IMAGE), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantActionImpl.class, name = ProductTailoringAddVariantAction.ADD_VARIANT), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameActionImpl.class, name = ProductTailoringChangeAssetNameAction.CHANGE_ASSET_NAME), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderActionImpl.class, name = ProductTailoringChangeAssetOrderAction.CHANGE_ASSET_ORDER), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionActionImpl.class, name = ProductTailoringMoveImageToPositionAction.MOVE_IMAGE_TO_POSITION), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionImpl.class, name = ProductTailoringPublishAction.PUBLISH), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetActionImpl.class, name = ProductTailoringRemoveAssetAction.REMOVE_ASSET), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageActionImpl.class, name = ProductTailoringRemoveImageAction.REMOVE_IMAGE), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantActionImpl.class, name = ProductTailoringRemoveVariantAction.REMOVE_VARIANT), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldActionImpl.class, name = ProductTailoringSetAssetCustomFieldAction.SET_ASSET_CUSTOM_FIELD), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeActionImpl.class, name = ProductTailoringSetAssetCustomTypeAction.SET_ASSET_CUSTOM_TYPE), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionActionImpl.class, name = ProductTailoringSetAssetDescriptionAction.SET_ASSET_DESCRIPTION), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionImpl.class, name = ProductTailoringSetAssetKeyAction.SET_ASSET_KEY), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionImpl.class, name = ProductTailoringSetAssetSourcesAction.SET_ASSET_SOURCES), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionImpl.class, name = ProductTailoringSetAssetTagsAction.SET_ASSET_TAGS), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionImpl.class, name = ProductTailoringSetDescriptionAction.SET_DESCRIPTION), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionImpl.class, name = ProductTailoringSetExternalImagesAction.SET_IMAGES), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionImpl.class, name = ProductTailoringSetImageLabelAction.SET_IMAGE_LABEL), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionImpl.class, name = ProductTailoringSetMetaAttributesAction.SET_META_ATTRIBUTES), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaDescriptionActionImpl.class, name = ProductTailoringSetMetaDescriptionAction.SET_META_DESCRIPTION), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaKeywordsActionImpl.class, name = ProductTailoringSetMetaKeywordsAction.SET_META_KEYWORDS), @@ -59,14 +77,82 @@ public static ProductTailoringUpdateAction deepCopy(@Nullable final ProductTailo if (template == null) { return null; } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetAction + .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionAction) template); + } if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringPublishAction) { return com.commercetools.api.models.product_tailoring.ProductTailoringPublishAction .deepCopy((com.commercetools.api.models.product_tailoring.ProductTailoringPublishAction) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsAction) template); + } if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction) { return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction.deepCopy( (com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelAction) template); + } if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesAction) { return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesAction.deepCopy( (com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesAction) template); @@ -99,6 +185,54 @@ public static ProductTailoringUpdateAction deepCopy(@Nullable final ProductTailo return instance; } + /** + * builder for addAsset subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionBuilder addAssetBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionBuilder.of(); + } + + /** + * builder for addExternalImage subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageActionBuilder addExternalImageBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageActionBuilder.of(); + } + + /** + * builder for addVariant subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantActionBuilder addVariantBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantActionBuilder.of(); + } + + /** + * builder for changeAssetName subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameActionBuilder changeAssetNameBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameActionBuilder.of(); + } + + /** + * builder for changeAssetOrder subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderActionBuilder changeAssetOrderBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderActionBuilder.of(); + } + + /** + * builder for moveImageToPosition subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionActionBuilder moveImageToPositionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionActionBuilder.of(); + } + /** * builder for publish subtype * @return builder @@ -107,6 +241,78 @@ public static com.commercetools.api.models.product_tailoring.ProductTailoringPub return com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder.of(); } + /** + * builder for removeAsset subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetActionBuilder removeAssetBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetActionBuilder.of(); + } + + /** + * builder for removeImage subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageActionBuilder removeImageBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageActionBuilder.of(); + } + + /** + * builder for removeVariant subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantActionBuilder removeVariantBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantActionBuilder.of(); + } + + /** + * builder for setAssetCustomField subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldActionBuilder setAssetCustomFieldBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldActionBuilder.of(); + } + + /** + * builder for setAssetCustomType subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeActionBuilder setAssetCustomTypeBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeActionBuilder.of(); + } + + /** + * builder for setAssetDescription subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionActionBuilder setAssetDescriptionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionActionBuilder.of(); + } + + /** + * builder for setAssetKey subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionBuilder setAssetKeyBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionBuilder.of(); + } + + /** + * builder for setAssetSources subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionBuilder setAssetSourcesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionBuilder.of(); + } + + /** + * builder for setAssetTags subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder setAssetTagsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder.of(); + } + /** * builder for setDescription subtype * @return builder @@ -115,6 +321,22 @@ public static com.commercetools.api.models.product_tailoring.ProductTailoringSet return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder.of(); } + /** + * builder for setImages subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionBuilder setImagesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionBuilder.of(); + } + + /** + * builder for setImageLabel subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder setImageLabelBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder.of(); + } + /** * builder for setMetaAttributes subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java index edd1e54069e..6836f3393ba 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java @@ -11,14 +11,82 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class ProductTailoringUpdateActionBuilder { + public com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionBuilder addAssetBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddAssetActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageActionBuilder addExternalImageBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddExternalImageActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantActionBuilder addVariantBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringAddVariantActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameActionBuilder changeAssetNameBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetNameActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderActionBuilder changeAssetOrderBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringChangeAssetOrderActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionActionBuilder moveImageToPositionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringMoveImageToPositionActionBuilder.of(); + } + public com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder publishBuilder() { return com.commercetools.api.models.product_tailoring.ProductTailoringPublishActionBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetActionBuilder removeAssetBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveAssetActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageActionBuilder removeImageBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveImageActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantActionBuilder removeVariantBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringRemoveVariantActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldActionBuilder setAssetCustomFieldBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomFieldActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeActionBuilder setAssetCustomTypeBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetCustomTypeActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionActionBuilder setAssetDescriptionBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetDescriptionActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionBuilder setAssetKeyBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionBuilder setAssetSourcesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder setAssetTagsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder.of(); + } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder setDescriptionBuilder() { return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionBuilder setImagesBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder setImageLabelBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionBuilder.of(); + } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder setMetaAttributesBuilder() { return com.commercetools.api.models.product_tailoring.ProductTailoringSetMetaAttributesActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java new file mode 100644 index 00000000000..a4b5e772cd2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java @@ -0,0 +1,184 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Asset; +import com.commercetools.api.models.common.Image; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *

The tailoring of a ProductVariant.

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

+ *     ProductVariantTailoring productVariantTailoring = ProductVariantTailoring.builder()
+ *             .id(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductVariantTailoringImpl.class) +public interface ProductVariantTailoring { + + /** + *

The id of the tailored ProductVariant.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public Long getId(); + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @return assets + */ + @Valid + @JsonProperty("assets") + public List getAssets(); + + /** + *

The id of the tailored ProductVariant.

+ * @param id value to be set + */ + + public void setId(final Long id); + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param assets values to be set + */ + + @JsonIgnore + public void setAssets(final Asset... assets); + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param assets values to be set + */ + + public void setAssets(final List assets); + + /** + * factory method + * @return instance of ProductVariantTailoring + */ + public static ProductVariantTailoring of() { + return new ProductVariantTailoringImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoring + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoring of(final ProductVariantTailoring template) { + ProductVariantTailoringImpl instance = new ProductVariantTailoringImpl(); + instance.setId(template.getId()); + instance.setImages(template.getImages()); + instance.setAssets(template.getAssets()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoring + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoring deepCopy(@Nullable final ProductVariantTailoring template) { + if (template == null) { + return null; + } + ProductVariantTailoringImpl instance = new ProductVariantTailoringImpl(); + instance.setId(template.getId()); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAssets(Optional.ofNullable(template.getAssets()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Asset::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductVariantTailoring + * @return builder + */ + public static ProductVariantTailoringBuilder builder() { + return ProductVariantTailoringBuilder.of(); + } + + /** + * create builder for ProductVariantTailoring instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringBuilder builder(final ProductVariantTailoring template) { + return ProductVariantTailoringBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoring(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java new file mode 100644 index 00000000000..f741272c466 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java @@ -0,0 +1,289 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoring productVariantTailoring = ProductVariantTailoring.builder()
+ *             .id(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringBuilder implements Builder { + + private Long id; + + @Nullable + private java.util.List images; + + @Nullable + private java.util.List assets; + + /** + *

The id of the tailored ProductVariant.

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

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

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

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

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

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param images value to be set + * @return Builder + */ + + public ProductVariantTailoringBuilder plusImages( + @Nullable final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

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

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

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

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param assets value to be set + * @return Builder + */ + + public ProductVariantTailoringBuilder plusAssets( + @Nullable final com.commercetools.api.models.common.Asset... assets) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.addAll(Arrays.asList(assets)); + return this; + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringBuilder plusAssets( + Function builder) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringBuilder withAssets( + Function builder) { + this.assets = new ArrayList<>(); + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringBuilder addAssets( + Function builder) { + return plusAssets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringBuilder setAssets( + Function builder) { + return assets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); + } + + /** + *

The id of the tailored ProductVariant.

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

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ * @return assets + */ + + @Nullable + public java.util.List getAssets() { + return this.assets; + } + + /** + * builds ProductVariantTailoring with checking for non-null required values + * @return ProductVariantTailoring + */ + public ProductVariantTailoring build() { + Objects.requireNonNull(id, ProductVariantTailoring.class + ": id is missing"); + return new ProductVariantTailoringImpl(id, images, assets); + } + + /** + * builds ProductVariantTailoring without checking for non-null required values + * @return ProductVariantTailoring + */ + public ProductVariantTailoring buildUnchecked() { + return new ProductVariantTailoringImpl(id, images, assets); + } + + /** + * factory method for an instance of ProductVariantTailoringBuilder + * @return builder + */ + public static ProductVariantTailoringBuilder of() { + return new ProductVariantTailoringBuilder(); + } + + /** + * create builder for ProductVariantTailoring instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringBuilder of(final ProductVariantTailoring template) { + ProductVariantTailoringBuilder builder = new ProductVariantTailoringBuilder(); + builder.id = template.getId(); + builder.images = template.getImages(); + builder.assets = template.getAssets(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java new file mode 100644 index 00000000000..a51778d874e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java @@ -0,0 +1,199 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.common.Asset; +import com.commercetools.api.models.common.Image; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + *

Either id or sku is required to reference a ProductVariant that exists.

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

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

The id of the ProductVariant to be tailored.

+ * @return id + */ + + @JsonProperty("id") + public Long getId(); + + /** + *

The sku of the ProductVariant to be tailored.

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

Images of the tailored Product Variant.

+ * @return images + */ + @Valid + @JsonProperty("images") + public List getImages(); + + /** + *

Media assets of the tailored Product Variant.

+ * @return assets + */ + @Valid + @JsonProperty("assets") + public List getAssets(); + + /** + *

The id of the ProductVariant to be tailored.

+ * @param id value to be set + */ + + public void setId(final Long id); + + /** + *

The sku of the ProductVariant to be tailored.

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

Images of the tailored Product Variant.

+ * @param images values to be set + */ + + @JsonIgnore + public void setImages(final Image... images); + + /** + *

Images of the tailored Product Variant.

+ * @param images values to be set + */ + + public void setImages(final List images); + + /** + *

Media assets of the tailored Product Variant.

+ * @param assets values to be set + */ + + @JsonIgnore + public void setAssets(final Asset... assets); + + /** + *

Media assets of the tailored Product Variant.

+ * @param assets values to be set + */ + + public void setAssets(final List assets); + + /** + * factory method + * @return instance of ProductVariantTailoringDraft + */ + public static ProductVariantTailoringDraft of() { + return new ProductVariantTailoringDraftImpl(); + } + + /** + * factory method to create a shallow copy ProductVariantTailoringDraft + * @param template instance to be copied + * @return copy instance + */ + public static ProductVariantTailoringDraft of(final ProductVariantTailoringDraft template) { + ProductVariantTailoringDraftImpl instance = new ProductVariantTailoringDraftImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setImages(template.getImages()); + instance.setAssets(template.getAssets()); + return instance; + } + + /** + * factory method to create a deep copy of ProductVariantTailoringDraft + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductVariantTailoringDraft deepCopy(@Nullable final ProductVariantTailoringDraft template) { + if (template == null) { + return null; + } + ProductVariantTailoringDraftImpl instance = new ProductVariantTailoringDraftImpl(); + instance.setId(template.getId()); + instance.setSku(template.getSku()); + instance.setImages(Optional.ofNullable(template.getImages()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Image::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setAssets(Optional.ofNullable(template.getAssets()) + .map(t -> t.stream() + .map(com.commercetools.api.models.common.Asset::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for ProductVariantTailoringDraft + * @return builder + */ + public static ProductVariantTailoringDraftBuilder builder() { + return ProductVariantTailoringDraftBuilder.of(); + } + + /** + * create builder for ProductVariantTailoringDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringDraftBuilder builder(final ProductVariantTailoringDraft template) { + return ProductVariantTailoringDraftBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductVariantTailoringDraft(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java new file mode 100644 index 00000000000..70cc7fc3545 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java @@ -0,0 +1,316 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductVariantTailoringDraftBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductVariantTailoringDraft productVariantTailoringDraft = ProductVariantTailoringDraft.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringDraftBuilder implements Builder { + + @Nullable + private Long id; + + @Nullable + private String sku; + + @Nullable + private java.util.List images; + + @Nullable + private java.util.List assets; + + /** + *

The id of the ProductVariant to be tailored.

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

The sku of the ProductVariant to be tailored.

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

Images of the tailored Product Variant.

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

Images of the tailored Product Variant.

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

Images of the tailored Product Variant.

+ * @param images value to be set + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusImages( + @Nullable final com.commercetools.api.models.common.Image... images) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(Arrays.asList(images)); + return this; + } + + /** + *

Images of the tailored Product Variant.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusImages( + Function builder) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images of the tailored Product Variant.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder withImages( + Function builder) { + this.images = new ArrayList<>(); + this.images.add(builder.apply(com.commercetools.api.models.common.ImageBuilder.of()).build()); + return this; + } + + /** + *

Images of the tailored Product Variant.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder addImages( + Function builder) { + return plusImages(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Images of the tailored Product Variant.

+ * @param builder function to build the images value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder setImages( + Function builder) { + return images(builder.apply(com.commercetools.api.models.common.ImageBuilder.of())); + } + + /** + *

Media assets of the tailored Product Variant.

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

Media assets of the tailored Product Variant.

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

Media assets of the tailored Product Variant.

+ * @param assets value to be set + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusAssets( + @Nullable final com.commercetools.api.models.common.Asset... assets) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.addAll(Arrays.asList(assets)); + return this; + } + + /** + *

Media assets of the tailored Product Variant.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusAssets( + Function builder) { + if (this.assets == null) { + this.assets = new ArrayList<>(); + } + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

Media assets of the tailored Product Variant.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder withAssets( + Function builder) { + this.assets = new ArrayList<>(); + this.assets.add(builder.apply(com.commercetools.api.models.common.AssetBuilder.of()).build()); + return this; + } + + /** + *

Media assets of the tailored Product Variant.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder addAssets( + Function builder) { + return plusAssets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); + } + + /** + *

Media assets of the tailored Product Variant.

+ * @param builder function to build the assets value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder setAssets( + Function builder) { + return assets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); + } + + /** + *

The id of the ProductVariant to be tailored.

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

The sku of the ProductVariant to be tailored.

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

Images of the tailored Product Variant.

+ * @return images + */ + + @Nullable + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets of the tailored Product Variant.

+ * @return assets + */ + + @Nullable + public java.util.List getAssets() { + return this.assets; + } + + /** + * builds ProductVariantTailoringDraft with checking for non-null required values + * @return ProductVariantTailoringDraft + */ + public ProductVariantTailoringDraft build() { + return new ProductVariantTailoringDraftImpl(id, sku, images, assets); + } + + /** + * builds ProductVariantTailoringDraft without checking for non-null required values + * @return ProductVariantTailoringDraft + */ + public ProductVariantTailoringDraft buildUnchecked() { + return new ProductVariantTailoringDraftImpl(id, sku, images, assets); + } + + /** + * factory method for an instance of ProductVariantTailoringDraftBuilder + * @return builder + */ + public static ProductVariantTailoringDraftBuilder of() { + return new ProductVariantTailoringDraftBuilder(); + } + + /** + * create builder for ProductVariantTailoringDraft instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductVariantTailoringDraftBuilder of(final ProductVariantTailoringDraft template) { + ProductVariantTailoringDraftBuilder builder = new ProductVariantTailoringDraftBuilder(); + builder.id = template.getId(); + builder.sku = template.getSku(); + builder.images = template.getImages(); + builder.assets = template.getAssets(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java new file mode 100644 index 00000000000..5544accddad --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java @@ -0,0 +1,143 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either id or sku is required to reference a ProductVariant that exists.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringDraftImpl implements ProductVariantTailoringDraft, ModelBase { + + private Long id; + + private String sku; + + private java.util.List images; + + private java.util.List assets; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringDraftImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, + @JsonProperty("images") final java.util.List images, + @JsonProperty("assets") final java.util.List assets) { + this.id = id; + this.sku = sku; + this.images = images; + this.assets = assets; + } + + /** + * create empty instance + */ + public ProductVariantTailoringDraftImpl() { + } + + /** + *

The id of the ProductVariant to be tailored.

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

The sku of the ProductVariant to be tailored.

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

Images of the tailored Product Variant.

+ */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets of the tailored Product Variant.

+ */ + + public java.util.List getAssets() { + return this.assets; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + public void setAssets(final com.commercetools.api.models.common.Asset... assets) { + this.assets = new ArrayList<>(Arrays.asList(assets)); + } + + public void setAssets(final java.util.List assets) { + this.assets = assets; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringDraftImpl that = (ProductVariantTailoringDraftImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(sku, that.sku) + .append(images, that.images) + .append(assets, that.assets) + .append(id, that.id) + .append(sku, that.sku) + .append(images, that.images) + .append(assets, that.assets) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(sku).append(images).append(assets).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("sku", sku) + .append("images", images) + .append("assets", assets) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java new file mode 100644 index 00000000000..c8422e1e6e8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java @@ -0,0 +1,125 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The tailoring of a ProductVariant.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductVariantTailoringImpl implements ProductVariantTailoring, ModelBase { + + private Long id; + + private java.util.List images; + + private java.util.List assets; + + /** + * create instance with all properties + */ + @JsonCreator + ProductVariantTailoringImpl(@JsonProperty("id") final Long id, + @JsonProperty("images") final java.util.List images, + @JsonProperty("assets") final java.util.List assets) { + this.id = id; + this.images = images; + this.assets = assets; + } + + /** + * create empty instance + */ + public ProductVariantTailoringImpl() { + } + + /** + *

The id of the tailored ProductVariant.

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

Images of the tailored Product Variant. If present, these images will override the images of the corresponding ProductVariant in total.

+ */ + + public java.util.List getImages() { + return this.images; + } + + /** + *

Media assets of the tailored Product Variant. If present, these assets will override the assets of the corresponding ProductVariant in total.

+ */ + + public java.util.List getAssets() { + return this.assets; + } + + public void setId(final Long id) { + this.id = id; + } + + public void setImages(final com.commercetools.api.models.common.Image... images) { + this.images = new ArrayList<>(Arrays.asList(images)); + } + + public void setImages(final java.util.List images) { + this.images = images; + } + + public void setAssets(final com.commercetools.api.models.common.Asset... assets) { + this.assets = new ArrayList<>(Arrays.asList(assets)); + } + + public void setAssets(final java.util.List assets) { + this.assets = assets; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductVariantTailoringImpl that = (ProductVariantTailoringImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(images, that.images) + .append(assets, that.assets) + .append(id, that.id) + .append(images, that.images) + .append(assets, that.assets) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(images).append(assets).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("images", images) + .append("assets", assets) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImageAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImageAddedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..785c64764ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImageAddedMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductTailoringImageAddedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductTailoringImageAddedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductTailoringImageAddedMessageExpansionBuilderDsl of() { + return new ProductTailoringImageAddedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductTailoringImageAddedMessageExpansionBuilderDsl of(final List path) { + return new ProductTailoringImageAddedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl product() { + return com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl + .of(appendOne(path, "product")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImagesSetMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImagesSetMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..1f161e3d778 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductTailoringImagesSetMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductTailoringImagesSetMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductTailoringImagesSetMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductTailoringImagesSetMessageExpansionBuilderDsl of() { + return new ProductTailoringImagesSetMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductTailoringImagesSetMessageExpansionBuilderDsl of(final List path) { + return new ProductTailoringImagesSetMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl product() { + return com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl + .of(appendOne(path, "product")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringAddedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringAddedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..0e71e70f6aa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringAddedMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductVariantTailoringAddedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductVariantTailoringAddedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductVariantTailoringAddedMessageExpansionBuilderDsl of() { + return new ProductVariantTailoringAddedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductVariantTailoringAddedMessageExpansionBuilderDsl of(final List path) { + return new ProductVariantTailoringAddedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl product() { + return com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl + .of(appendOne(path, "product")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringRemovedMessageExpansionBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringRemovedMessageExpansionBuilderDsl.java new file mode 100644 index 00000000000..9d44dde6535 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/message/ProductVariantTailoringRemovedMessageExpansionBuilderDsl.java @@ -0,0 +1,51 @@ + +package com.commercetools.api.predicates.expansion.message; + +import static com.commercetools.api.predicates.expansion.ExpansionUtil.appendOne; + +import java.util.Collections; +import java.util.List; + +import com.commercetools.api.predicates.expansion.ExpansionDsl; + +public class ProductVariantTailoringRemovedMessageExpansionBuilderDsl implements ExpansionDsl { + + private final List path; + + private ProductVariantTailoringRemovedMessageExpansionBuilderDsl(final List path) { + this.path = path; + } + + public static ProductVariantTailoringRemovedMessageExpansionBuilderDsl of() { + return new ProductVariantTailoringRemovedMessageExpansionBuilderDsl(Collections.emptyList()); + } + + public static ProductVariantTailoringRemovedMessageExpansionBuilderDsl of(final List path) { + return new ProductVariantTailoringRemovedMessageExpansionBuilderDsl(path); + } + + @Override + public List getPath() { + return path; + } + + public com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl lastModifiedBy() { + return com.commercetools.api.predicates.expansion.common.LastModifiedByExpansionBuilderDsl + .of(appendOne(path, "lastModifiedBy")); + } + + public com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl createdBy() { + return com.commercetools.api.predicates.expansion.common.CreatedByExpansionBuilderDsl + .of(appendOne(path, "createdBy")); + } + + public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl resource() { + return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl + .of(appendOne(path, "resource")); + } + + public com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl product() { + return com.commercetools.api.predicates.expansion.product.ProductReferenceExpansionBuilderDsl + .of(appendOne(path, "product")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java index cdb5364692c..247bd194047 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessagePayloadQueryBuilderDsl.java @@ -1032,6 +1032,21 @@ public CombinationQueryPredicate asProductTailori MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringImageAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringImageAddedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringImagesSet( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringImagesSetMessagePayloadQueryBuilderDsl.of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductTailoringNameSet( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( @@ -1085,6 +1100,22 @@ public CombinationQueryPredicate asProductVariant MessagePayloadQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductVariantTailoringAdded( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductVariantTailoringRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl + .of()), + MessagePayloadQueryBuilderDsl::of); + } + public CombinationQueryPredicate asQuoteCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java index 59a2698d522..80d8e54ad52 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/MessageQueryBuilderDsl.java @@ -1064,6 +1064,22 @@ public CombinationQueryPredicate asProductTailoringDescr MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductTailoringImageAdded( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringImageAddedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductTailoringImagesSet( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductTailoringImagesSetMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asProductTailoringNameSet( Function> fn) { return new CombinationQueryPredicate<>( @@ -1115,6 +1131,21 @@ public CombinationQueryPredicate asProductVariantDeleted MessageQueryBuilderDsl::of); } + public CombinationQueryPredicate asProductVariantTailoringAdded( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.message.ProductVariantTailoringAddedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asProductVariantTailoringRemoved( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.message.ProductVariantTailoringRemovedMessageQueryBuilderDsl.of()), + MessageQueryBuilderDsl::of); + } + public CombinationQueryPredicate asQuoteCreated( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java index 3efe217d098..a0ade0ea30c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessagePayloadQueryBuilderDsl.java @@ -73,6 +73,48 @@ public CombinationQueryPredicate metaTitle( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaTitle")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate metaDescription( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaDescription")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate metaKeywords( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaKeywords")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public CombinationQueryPredicate variants( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variants")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder variants() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variants")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessagePayloadQueryBuilderDsl::of)); + } + public BooleanComparisonPredicateBuilder published() { return new BooleanComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java index eb1f2891065..5e8da403761 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringCreatedMessageQueryBuilderDsl.java @@ -145,6 +145,48 @@ public CombinationQueryPredicate ProductTailoringCreatedMessageQueryBuilderDsl::of); } + public CombinationQueryPredicate metaTitle( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaTitle")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate metaDescription( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaDescription")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate metaKeywords( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("metaKeywords")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate variants( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variants")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductTailoringCreatedMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder variants() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variants")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringCreatedMessageQueryBuilderDsl::of)); + } + public BooleanComparisonPredicateBuilder published() { return new BooleanComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("published")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..c8ea49c504d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,59 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringImageAddedMessagePayloadQueryBuilderDsl { + public ProductTailoringImageAddedMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringImageAddedMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringImageAddedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate image( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("image")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImageAddedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..70cf16295b8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImageAddedMessageQueryBuilderDsl.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringImageAddedMessageQueryBuilderDsl { + public ProductTailoringImageAddedMessageQueryBuilderDsl() { + } + + public static ProductTailoringImageAddedMessageQueryBuilderDsl of() { + return new ProductTailoringImageAddedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImageAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate image( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("image")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImageAddedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..c70445b55e9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,78 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringImagesSetMessagePayloadQueryBuilderDsl { + public ProductTailoringImagesSetMessagePayloadQueryBuilderDsl() { + } + + public static ProductTailoringImagesSetMessagePayloadQueryBuilderDsl of() { + return new ProductTailoringImagesSetMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate oldImages( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldImages")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder oldImages() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldImages")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessagePayloadQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..ec29276b6e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductTailoringImagesSetMessageQueryBuilderDsl.java @@ -0,0 +1,150 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringImagesSetMessageQueryBuilderDsl { + public ProductTailoringImagesSetMessageQueryBuilderDsl() { + } + + public static ProductTailoringImagesSetMessageQueryBuilderDsl of() { + return new ProductTailoringImagesSetMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate oldImages( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("oldImages")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder oldImages() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("oldImages")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringImagesSetMessageQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringImagesSetMessageQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..1d2e32b33f7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl { + public ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl() { + } + + public static ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl of() { + return new ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate variant( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variant")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductVariantTailoringAddedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..f5af601d1fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringAddedMessageQueryBuilderDsl.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringAddedMessageQueryBuilderDsl { + public ProductVariantTailoringAddedMessageQueryBuilderDsl() { + } + + public static ProductVariantTailoringAddedMessageQueryBuilderDsl of() { + return new ProductVariantTailoringAddedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringAddedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate variant( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variant")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductVariantTailoringAddedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl.java new file mode 100644 index 00000000000..33631118dd6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl { + public ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl() { + } + + public static ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl of() { + return new ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate variant( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variant")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductVariantTailoringRemovedMessagePayloadQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessageQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessageQueryBuilderDsl.java new file mode 100644 index 00000000000..90d8d8388d2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/ProductVariantTailoringRemovedMessageQueryBuilderDsl.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.predicates.query.message; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringRemovedMessageQueryBuilderDsl { + public ProductVariantTailoringRemovedMessageQueryBuilderDsl() { + } + + public static ProductVariantTailoringRemovedMessageQueryBuilderDsl of() { + return new ProductVariantTailoringRemovedMessageQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder version() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("version")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder createdAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("createdAt")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate lastModifiedBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("lastModifiedBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LastModifiedByQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate createdBy( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("createdBy")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.CreatedByQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder sequenceNumber() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sequenceNumber")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resource( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resource")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder resourceVersion() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("resourceVersion")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder type() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("type")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate resourceUserProvidedIdentifiers( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("resourceUserProvidedIdentifiers")) + .inner(fn.apply( + com.commercetools.api.predicates.query.message.UserProvidedIdentifiersQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public CombinationQueryPredicate store( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("store")) + .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public StringComparisonPredicateBuilder productKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("productKey")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate product( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("product")) + .inner(fn.apply(com.commercetools.api.predicates.query.product.ProductReferenceQueryBuilderDsl.of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringRemovedMessageQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate variant( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variant")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductVariantTailoringRemovedMessageQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddAssetActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddAssetActionQueryBuilderDsl.java new file mode 100644 index 00000000000..f0735a845ab --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddAssetActionQueryBuilderDsl.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringAddAssetActionQueryBuilderDsl { + public ProductTailoringAddAssetActionQueryBuilderDsl() { + } + + public static ProductTailoringAddAssetActionQueryBuilderDsl of() { + return new ProductTailoringAddAssetActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddAssetActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddAssetActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddAssetActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddAssetActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate asset( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("asset")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AssetDraftQueryBuilderDsl.of())), + ProductTailoringAddAssetActionQueryBuilderDsl::of); + } + + public LongComparisonPredicateBuilder position() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("position")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddAssetActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddExternalImageActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddExternalImageActionQueryBuilderDsl.java new file mode 100644 index 00000000000..b646e39f5cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddExternalImageActionQueryBuilderDsl.java @@ -0,0 +1,48 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringAddExternalImageActionQueryBuilderDsl { + public ProductTailoringAddExternalImageActionQueryBuilderDsl() { + } + + public static ProductTailoringAddExternalImageActionQueryBuilderDsl of() { + return new ProductTailoringAddExternalImageActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddExternalImageActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddExternalImageActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddExternalImageActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate image( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("image")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringAddExternalImageActionQueryBuilderDsl::of); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddExternalImageActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java new file mode 100644 index 00000000000..b0e9a57ef28 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringAddVariantActionQueryBuilderDsl { + public ProductTailoringAddVariantActionQueryBuilderDsl() { + } + + public static ProductTailoringAddVariantActionQueryBuilderDsl of() { + return new ProductTailoringAddVariantActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder id() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringAddVariantActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate assets( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("assets")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AssetDraftQueryBuilderDsl.of())), + ProductTailoringAddVariantActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder assets() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assets")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetNameActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetNameActionQueryBuilderDsl.java new file mode 100644 index 00000000000..6eb921dbdde --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetNameActionQueryBuilderDsl.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringChangeAssetNameActionQueryBuilderDsl { + public ProductTailoringChangeAssetNameActionQueryBuilderDsl() { + } + + public static ProductTailoringChangeAssetNameActionQueryBuilderDsl of() { + return new ProductTailoringChangeAssetNameActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetNameActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate name( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("name")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringChangeAssetNameActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetOrderActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetOrderActionQueryBuilderDsl.java new file mode 100644 index 00000000000..8b3d71bf1cd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringChangeAssetOrderActionQueryBuilderDsl.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringChangeAssetOrderActionQueryBuilderDsl { + public ProductTailoringChangeAssetOrderActionQueryBuilderDsl() { + } + + public static ProductTailoringChangeAssetOrderActionQueryBuilderDsl of() { + return new ProductTailoringChangeAssetOrderActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetOrderActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetOrderActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetOrderActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetOrderActionQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder assetOrder() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetOrder")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringChangeAssetOrderActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.java index 75dd083a5d1..c5321814275 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDataQueryBuilderDsl.java @@ -67,4 +67,19 @@ public CombinationQueryPredicate slug( ProductTailoringDataQueryBuilderDsl::of); } + public CombinationQueryPredicate variants( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variants")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringQueryBuilderDsl + .of())), + ProductTailoringDataQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder variants() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variants")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDataQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java index e093a2d2ea3..4d444a6914a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringDraftQueryBuilderDsl.java @@ -98,4 +98,19 @@ public BooleanComparisonPredicateBuilder p p -> new CombinationQueryPredicate<>(p, ProductTailoringDraftQueryBuilderDsl::of)); } + public CombinationQueryPredicate variants( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variants")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringDraftQueryBuilderDsl + .of())), + ProductTailoringDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder variants() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variants")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringDraftQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java index d9c9bb0dd04..d9d71fe40e6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringInStoreDraftQueryBuilderDsl.java @@ -88,4 +88,19 @@ public BooleanComparisonPredicateBuilder new CombinationQueryPredicate<>(p, ProductTailoringInStoreDraftQueryBuilderDsl::of)); } + public CombinationQueryPredicate variants( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("variants")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductVariantTailoringDraftQueryBuilderDsl + .of())), + ProductTailoringInStoreDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder variants() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variants")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringInStoreDraftQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringMoveImageToPositionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringMoveImageToPositionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..0dd528f0547 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringMoveImageToPositionActionQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringMoveImageToPositionActionQueryBuilderDsl { + public ProductTailoringMoveImageToPositionActionQueryBuilderDsl() { + } + + public static ProductTailoringMoveImageToPositionActionQueryBuilderDsl of() { + return new ProductTailoringMoveImageToPositionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder imageUrl() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("imageUrl")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder position() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("position")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringMoveImageToPositionActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveAssetActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveAssetActionQueryBuilderDsl.java new file mode 100644 index 00000000000..65e0c88f4c6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveAssetActionQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringRemoveAssetActionQueryBuilderDsl { + public ProductTailoringRemoveAssetActionQueryBuilderDsl() { + } + + public static ProductTailoringRemoveAssetActionQueryBuilderDsl of() { + return new ProductTailoringRemoveAssetActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveAssetActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveImageActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveImageActionQueryBuilderDsl.java new file mode 100644 index 00000000000..31b7655394b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveImageActionQueryBuilderDsl.java @@ -0,0 +1,43 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringRemoveImageActionQueryBuilderDsl { + public ProductTailoringRemoveImageActionQueryBuilderDsl() { + } + + public static ProductTailoringRemoveImageActionQueryBuilderDsl of() { + return new ProductTailoringRemoveImageActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveImageActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveImageActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveImageActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder imageUrl() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("imageUrl")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveImageActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveImageActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveVariantActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveVariantActionQueryBuilderDsl.java new file mode 100644 index 00000000000..93df769f20b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringRemoveVariantActionQueryBuilderDsl.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringRemoveVariantActionQueryBuilderDsl { + public ProductTailoringRemoveVariantActionQueryBuilderDsl() { + } + + public static ProductTailoringRemoveVariantActionQueryBuilderDsl of() { + return new ProductTailoringRemoveVariantActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveVariantActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder id() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveVariantActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveVariantActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringRemoveVariantActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl.java new file mode 100644 index 00000000000..cad8e14055e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl.java @@ -0,0 +1,61 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl { + public ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl.java new file mode 100644 index 00000000000..c9d56ab0a3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl.java @@ -0,0 +1,70 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl { + public ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate type( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("type")) + .inner(fn.apply( + com.commercetools.api.predicates.query.type.TypeResourceIdentifierQueryBuilderDsl.of())), + ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate fields( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("fields")) + .inner(fn.apply(com.commercetools.api.predicates.query.type.FieldContainerQueryBuilderDsl.of())), + ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetDescriptionActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetDescriptionActionQueryBuilderDsl.java new file mode 100644 index 00000000000..f1161145cf7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetDescriptionActionQueryBuilderDsl.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetDescriptionActionQueryBuilderDsl { + public ProductTailoringSetAssetDescriptionActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetDescriptionActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetDescriptionActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate description( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("description")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.LocalizedStringQueryBuilderDsl.of())), + ProductTailoringSetAssetDescriptionActionQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetKeyActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetKeyActionQueryBuilderDsl.java new file mode 100644 index 00000000000..cfe3cba3f15 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetKeyActionQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetKeyActionQueryBuilderDsl { + public ProductTailoringSetAssetKeyActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetKeyActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetKeyActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetKeyActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetSourcesActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetSourcesActionQueryBuilderDsl.java new file mode 100644 index 00000000000..3e565f8ab17 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetSourcesActionQueryBuilderDsl.java @@ -0,0 +1,65 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetSourcesActionQueryBuilderDsl { + public ProductTailoringSetAssetSourcesActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetSourcesActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetSourcesActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate sources( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("sources")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AssetSourceQueryBuilderDsl.of())), + ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder sources() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sources")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetSourcesActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetTagsActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetTagsActionQueryBuilderDsl.java new file mode 100644 index 00000000000..dfb74ff7c12 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAssetTagsActionQueryBuilderDsl.java @@ -0,0 +1,55 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAssetTagsActionQueryBuilderDsl { + public ProductTailoringSetAssetTagsActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAssetTagsActionQueryBuilderDsl of() { + return new ProductTailoringSetAssetTagsActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetId() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder assetKey() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assetKey")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + + public StringCollectionPredicateBuilder tags() { + return new StringCollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("tags")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAssetTagsActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetExternalImagesActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetExternalImagesActionQueryBuilderDsl.java new file mode 100644 index 00000000000..19b96a58ed5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetExternalImagesActionQueryBuilderDsl.java @@ -0,0 +1,53 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetExternalImagesActionQueryBuilderDsl { + public ProductTailoringSetExternalImagesActionQueryBuilderDsl() { + } + + public static ProductTailoringSetExternalImagesActionQueryBuilderDsl of() { + return new ProductTailoringSetExternalImagesActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetExternalImagesActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetExternalImagesActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetExternalImagesActionQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductTailoringSetExternalImagesActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetExternalImagesActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetExternalImagesActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetImageLabelActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetImageLabelActionQueryBuilderDsl.java new file mode 100644 index 00000000000..fff11d649c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetImageLabelActionQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetImageLabelActionQueryBuilderDsl { + public ProductTailoringSetImageLabelActionQueryBuilderDsl() { + } + + public static ProductTailoringSetImageLabelActionQueryBuilderDsl of() { + return new ProductTailoringSetImageLabelActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder imageUrl() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("imageUrl")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder label() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("label")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetImageLabelActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java index fc4d8866581..bef1a89ec53 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java @@ -19,6 +19,54 @@ public StringComparisonPredicateBuilder new CombinationQueryPredicate<>(p, ProductTailoringUpdateActionQueryBuilderDsl::of)); } + public CombinationQueryPredicate asAddAsset( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAddAssetActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asAddExternalImage( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAddExternalImageActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asAddVariant( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAddVariantActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asChangeAssetName( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringChangeAssetNameActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asChangeAssetOrder( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringChangeAssetOrderActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asMoveImageToPosition( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringMoveImageToPositionActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asPublish( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( @@ -26,6 +74,78 @@ public CombinationQueryPredicate as ProductTailoringUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asRemoveAsset( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringRemoveAssetActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRemoveImage( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringRemoveImageActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asRemoveVariant( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringRemoveVariantActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetCustomField( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetCustomFieldActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetCustomType( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetCustomTypeActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetDescription( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetDescriptionActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetKey( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetKeyActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetSources( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetSourcesActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAssetTags( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAssetTagsActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetDescription( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( @@ -34,6 +154,22 @@ public CombinationQueryPredicate as ProductTailoringUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetImages( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetExternalImagesActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetImageLabel( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetImageLabelActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetMetaAttributes( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java new file mode 100644 index 00000000000..f5b6292e4a7 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringDraftQueryBuilderDsl { + public ProductVariantTailoringDraftQueryBuilderDsl() { + } + + public static ProductVariantTailoringDraftQueryBuilderDsl of() { + return new ProductVariantTailoringDraftQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder id() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductVariantTailoringDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate assets( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("assets")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AssetQueryBuilderDsl.of())), + ProductVariantTailoringDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder assets() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assets")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java new file mode 100644 index 00000000000..2d2ba12b909 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ProductVariantTailoringQueryBuilderDsl { + public ProductVariantTailoringQueryBuilderDsl() { + } + + public static ProductVariantTailoringQueryBuilderDsl of() { + return new ProductVariantTailoringQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder id() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate images( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("images")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.ImageQueryBuilderDsl.of())), + ProductVariantTailoringQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder images() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("images")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate assets( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("assets")) + .inner(fn.apply(com.commercetools.api.predicates.query.common.AssetQueryBuilderDsl.of())), + ProductVariantTailoringQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder assets() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("assets")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.java new file mode 100644 index 00000000000..409d6ef092e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.java @@ -0,0 +1,172 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @TestTemplate + @UseDataProvider("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withFilename("filename") + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring/images?filename=filename", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withVariant(7) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring/images?variant=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withSku("sku") + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring/images?sku=sku", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withStaged(true) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring/images?staged=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/test_productID/product-tailoring/images", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withFilename("filename"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withVariant(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withSku("sku"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)) + .withStaged(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductId("test_productID") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsByProductIDProductTailoringImagesTest.class)), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.java new file mode 100644 index 00000000000..dc2d4512427 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.java @@ -0,0 +1,172 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @TestTemplate + @UseDataProvider("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withFilename("filename") + .createHttpRequest(), + "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring/images?filename=filename", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withVariant(7) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring/images?variant=7", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withSku("sku") + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring/images?sku=sku", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withStaged(true) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring/images?staged=true", }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .createHttpRequest(), "post", + "test_projectKey/in-store/key=test_storeKey/products/key=test_productKey/product-tailoring/images", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withFilename("filename"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withVariant(7), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withSku("sku"), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)) + .withStaged(true), }, + new Object[] { apiRoot.withProjectKey("test_projectKey") + .inStoreKeyWithStoreKeyValue("test_storeKey") + .products() + .withProductKey("test_productKey") + .productTailoring() + .images() + .post(FileTestUtils.testFileFor( + ByProjectKeyInStoreKeyByStoreKeyProductsKeyByProductKeyProductTailoringImagesTest.class)), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java index 283988c7072..09e5fcb42b4 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessagePayloadTest.java @@ -1,6 +1,8 @@ package com.commercetools.api.models.message; +import java.util.Collections; + import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; @@ -37,6 +39,15 @@ public static Object[][] objectBuilder() { .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, new Object[] { ProductTailoringCreatedMessagePayload.builder() .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessagePayload.builder() + .variants(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())) }, new Object[] { ProductTailoringCreatedMessagePayload.builder().published(true) } }; } @@ -92,6 +103,40 @@ public void slug() { Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); } + @Test + public void metaTitle() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setMetaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaTitle()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaDescription() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setMetaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaKeywords() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setMetaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaKeywords()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void variants() { + ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); + value.setVariants(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + Assertions.assertThat(value.getVariants()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + } + @Test public void published() { ProductTailoringCreatedMessagePayload value = ProductTailoringCreatedMessagePayload.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java index ae056981550..5d1c48541a5 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringCreatedMessageTest.java @@ -1,6 +1,8 @@ package com.commercetools.api.models.message; +import java.util.Collections; + import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; @@ -36,6 +38,15 @@ public static Object[][] objectBuilder() { .name(new com.commercetools.api.models.common.LocalizedStringImpl()) }, new Object[] { ProductTailoringCreatedMessage.builder() .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .metaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .metaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringCreatedMessage.builder() + .variants(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())) }, new Object[] { ProductTailoringCreatedMessage.builder().published(true) } }; } @@ -91,6 +102,40 @@ public void slug() { Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); } + @Test + public void metaTitle() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setMetaTitle(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaTitle()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaDescription() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setMetaDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void metaKeywords() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setMetaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getMetaKeywords()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } + + @Test + public void variants() { + ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); + value.setVariants(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + Assertions.assertThat(value.getVariants()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + } + @Test public void published() { ProductTailoringCreatedMessage value = ProductTailoringCreatedMessage.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadTest.java new file mode 100644 index 00000000000..be0c4708d6e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessagePayloadTest.java @@ -0,0 +1,75 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringImageAddedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringImageAddedMessagePayloadBuilder builder) { + ProductTailoringImageAddedMessagePayload productTailoringImageAddedMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringImageAddedMessagePayload) + .isInstanceOf(ProductTailoringImageAddedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringImageAddedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringImageAddedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringImageAddedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringImageAddedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductTailoringImageAddedMessagePayload.builder() + .image(new com.commercetools.api.models.common.ImageImpl()) } }; + } + + @Test + public void store() { + ProductTailoringImageAddedMessagePayload value = ProductTailoringImageAddedMessagePayload.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductTailoringImageAddedMessagePayload value = ProductTailoringImageAddedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringImageAddedMessagePayload value = ProductTailoringImageAddedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductTailoringImageAddedMessagePayload value = ProductTailoringImageAddedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void image() { + ProductTailoringImageAddedMessagePayload value = ProductTailoringImageAddedMessagePayload.of(); + value.setImage(new com.commercetools.api.models.common.ImageImpl()); + Assertions.assertThat(value.getImage()).isEqualTo(new com.commercetools.api.models.common.ImageImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageTest.java new file mode 100644 index 00000000000..48bc0497756 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImageAddedMessageTest.java @@ -0,0 +1,74 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringImageAddedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringImageAddedMessageBuilder builder) { + ProductTailoringImageAddedMessage productTailoringImageAddedMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringImageAddedMessage).isInstanceOf(ProductTailoringImageAddedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringImageAddedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringImageAddedMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringImageAddedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringImageAddedMessage.builder().variantId(5L) }, + new Object[] { ProductTailoringImageAddedMessage.builder() + .image(new com.commercetools.api.models.common.ImageImpl()) } }; + } + + @Test + public void store() { + ProductTailoringImageAddedMessage value = ProductTailoringImageAddedMessage.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductTailoringImageAddedMessage value = ProductTailoringImageAddedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringImageAddedMessage value = ProductTailoringImageAddedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductTailoringImageAddedMessage value = ProductTailoringImageAddedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void image() { + ProductTailoringImageAddedMessage value = ProductTailoringImageAddedMessage.of(); + value.setImage(new com.commercetools.api.models.common.ImageImpl()); + Assertions.assertThat(value.getImage()).isEqualTo(new com.commercetools.api.models.common.ImageImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadTest.java new file mode 100644 index 00000000000..3ba521fab36 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessagePayloadTest.java @@ -0,0 +1,88 @@ + +package com.commercetools.api.models.message; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringImagesSetMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringImagesSetMessagePayloadBuilder builder) { + ProductTailoringImagesSetMessagePayload productTailoringImagesSetMessagePayload = builder.buildUnchecked(); + Assertions.assertThat(productTailoringImagesSetMessagePayload) + .isInstanceOf(ProductTailoringImagesSetMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringImagesSetMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringImagesSetMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductTailoringImagesSetMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringImagesSetMessagePayload.builder().variantId(5L) }, + new Object[] { ProductTailoringImagesSetMessagePayload.builder() + .oldImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductTailoringImagesSetMessagePayload.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) } }; + } + + @Test + public void store() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void oldImages() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setOldImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getOldImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void images() { + ProductTailoringImagesSetMessagePayload value = ProductTailoringImagesSetMessagePayload.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageTest.java new file mode 100644 index 00000000000..5bb6f185617 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductTailoringImagesSetMessageTest.java @@ -0,0 +1,87 @@ + +package com.commercetools.api.models.message; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringImagesSetMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringImagesSetMessageBuilder builder) { + ProductTailoringImagesSetMessage productTailoringImagesSetMessage = builder.buildUnchecked(); + Assertions.assertThat(productTailoringImagesSetMessage).isInstanceOf(ProductTailoringImagesSetMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductTailoringImagesSetMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductTailoringImagesSetMessage.builder().productKey("productKey") }, + new Object[] { ProductTailoringImagesSetMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductTailoringImagesSetMessage.builder().variantId(5L) }, + new Object[] { ProductTailoringImagesSetMessage.builder() + .oldImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductTailoringImagesSetMessage.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) } }; + } + + @Test + public void store() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void oldImages() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setOldImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getOldImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void images() { + ProductTailoringImagesSetMessage value = ProductTailoringImagesSetMessage.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadTest.java new file mode 100644 index 00000000000..72784bedac0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessagePayloadTest.java @@ -0,0 +1,77 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringAddedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringAddedMessagePayloadBuilder builder) { + ProductVariantTailoringAddedMessagePayload productVariantTailoringAddedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productVariantTailoringAddedMessagePayload) + .isInstanceOf(ProductVariantTailoringAddedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductVariantTailoringAddedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductVariantTailoringAddedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductVariantTailoringAddedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductVariantTailoringAddedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductVariantTailoringAddedMessagePayload.builder() + .variant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()) } }; + } + + @Test + public void store() { + ProductVariantTailoringAddedMessagePayload value = ProductVariantTailoringAddedMessagePayload.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductVariantTailoringAddedMessagePayload value = ProductVariantTailoringAddedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductVariantTailoringAddedMessagePayload value = ProductVariantTailoringAddedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductVariantTailoringAddedMessagePayload value = ProductVariantTailoringAddedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void variant() { + ProductVariantTailoringAddedMessagePayload value = ProductVariantTailoringAddedMessagePayload.of(); + value.setVariant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageTest.java new file mode 100644 index 00000000000..35ce785be12 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringAddedMessageTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringAddedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringAddedMessageBuilder builder) { + ProductVariantTailoringAddedMessage productVariantTailoringAddedMessage = builder.buildUnchecked(); + Assertions.assertThat(productVariantTailoringAddedMessage) + .isInstanceOf(ProductVariantTailoringAddedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductVariantTailoringAddedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductVariantTailoringAddedMessage.builder().productKey("productKey") }, + new Object[] { ProductVariantTailoringAddedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductVariantTailoringAddedMessage.builder().variantId(5L) }, + new Object[] { ProductVariantTailoringAddedMessage.builder() + .variant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()) } }; + } + + @Test + public void store() { + ProductVariantTailoringAddedMessage value = ProductVariantTailoringAddedMessage.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductVariantTailoringAddedMessage value = ProductVariantTailoringAddedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductVariantTailoringAddedMessage value = ProductVariantTailoringAddedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductVariantTailoringAddedMessage value = ProductVariantTailoringAddedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void variant() { + ProductVariantTailoringAddedMessage value = ProductVariantTailoringAddedMessage.of(); + value.setVariant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadTest.java new file mode 100644 index 00000000000..068b8ee0987 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessagePayloadTest.java @@ -0,0 +1,77 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringRemovedMessagePayloadTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringRemovedMessagePayloadBuilder builder) { + ProductVariantTailoringRemovedMessagePayload productVariantTailoringRemovedMessagePayload = builder + .buildUnchecked(); + Assertions.assertThat(productVariantTailoringRemovedMessagePayload) + .isInstanceOf(ProductVariantTailoringRemovedMessagePayload.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductVariantTailoringRemovedMessagePayload.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductVariantTailoringRemovedMessagePayload.builder().productKey("productKey") }, + new Object[] { ProductVariantTailoringRemovedMessagePayload.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductVariantTailoringRemovedMessagePayload.builder().variantId(5L) }, + new Object[] { ProductVariantTailoringRemovedMessagePayload.builder() + .variant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()) } }; + } + + @Test + public void store() { + ProductVariantTailoringRemovedMessagePayload value = ProductVariantTailoringRemovedMessagePayload.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductVariantTailoringRemovedMessagePayload value = ProductVariantTailoringRemovedMessagePayload.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductVariantTailoringRemovedMessagePayload value = ProductVariantTailoringRemovedMessagePayload.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductVariantTailoringRemovedMessagePayload value = ProductVariantTailoringRemovedMessagePayload.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void variant() { + ProductVariantTailoringRemovedMessagePayload value = ProductVariantTailoringRemovedMessagePayload.of(); + value.setVariant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageTest.java new file mode 100644 index 00000000000..a801c7a14be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/ProductVariantTailoringRemovedMessageTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.models.message; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringRemovedMessageTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringRemovedMessageBuilder builder) { + ProductVariantTailoringRemovedMessage productVariantTailoringRemovedMessage = builder.buildUnchecked(); + Assertions.assertThat(productVariantTailoringRemovedMessage) + .isInstanceOf(ProductVariantTailoringRemovedMessage.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { ProductVariantTailoringRemovedMessage.builder() + .store(new com.commercetools.api.models.store.StoreKeyReferenceImpl()) }, + new Object[] { ProductVariantTailoringRemovedMessage.builder().productKey("productKey") }, + new Object[] { ProductVariantTailoringRemovedMessage.builder() + .product(new com.commercetools.api.models.product.ProductReferenceImpl()) }, + new Object[] { ProductVariantTailoringRemovedMessage.builder().variantId(5L) }, + new Object[] { ProductVariantTailoringRemovedMessage.builder() + .variant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()) } }; + } + + @Test + public void store() { + ProductVariantTailoringRemovedMessage value = ProductVariantTailoringRemovedMessage.of(); + value.setStore(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + Assertions.assertThat(value.getStore()) + .isEqualTo(new com.commercetools.api.models.store.StoreKeyReferenceImpl()); + } + + @Test + public void productKey() { + ProductVariantTailoringRemovedMessage value = ProductVariantTailoringRemovedMessage.of(); + value.setProductKey("productKey"); + Assertions.assertThat(value.getProductKey()).isEqualTo("productKey"); + } + + @Test + public void product() { + ProductVariantTailoringRemovedMessage value = ProductVariantTailoringRemovedMessage.of(); + value.setProduct(new com.commercetools.api.models.product.ProductReferenceImpl()); + Assertions.assertThat(value.getProduct()) + .isEqualTo(new com.commercetools.api.models.product.ProductReferenceImpl()); + } + + @Test + public void variantId() { + ProductVariantTailoringRemovedMessage value = ProductVariantTailoringRemovedMessage.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void variant() { + ProductVariantTailoringRemovedMessage value = ProductVariantTailoringRemovedMessage.of(); + value.setVariant(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + Assertions.assertThat(value.getVariant()) + .isEqualTo(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionTest.java new file mode 100644 index 00000000000..59892fcce91 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddAssetActionTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringAddAssetActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringAddAssetActionBuilder builder) { + ProductTailoringAddAssetAction productTailoringAddAssetAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringAddAssetAction).isInstanceOf(ProductTailoringAddAssetAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringAddAssetAction.builder().variantId(5L) }, + new Object[] { ProductTailoringAddAssetAction.builder().sku("sku") }, + new Object[] { ProductTailoringAddAssetAction.builder().staged(true) }, + new Object[] { ProductTailoringAddAssetAction.builder() + .asset(new com.commercetools.api.models.common.AssetDraftImpl()) }, + new Object[] { ProductTailoringAddAssetAction.builder().position(4) } }; + } + + @Test + public void variantId() { + ProductTailoringAddAssetAction value = ProductTailoringAddAssetAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringAddAssetAction value = ProductTailoringAddAssetAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringAddAssetAction value = ProductTailoringAddAssetAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void asset() { + ProductTailoringAddAssetAction value = ProductTailoringAddAssetAction.of(); + value.setAsset(new com.commercetools.api.models.common.AssetDraftImpl()); + Assertions.assertThat(value.getAsset()).isEqualTo(new com.commercetools.api.models.common.AssetDraftImpl()); + } + + @Test + public void position() { + ProductTailoringAddAssetAction value = ProductTailoringAddAssetAction.of(); + value.setPosition(4); + Assertions.assertThat(value.getPosition()).isEqualTo(4); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionTest.java new file mode 100644 index 00000000000..63c998a90bf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddExternalImageActionTest.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringAddExternalImageActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringAddExternalImageActionBuilder builder) { + ProductTailoringAddExternalImageAction productTailoringAddExternalImageAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringAddExternalImageAction) + .isInstanceOf(ProductTailoringAddExternalImageAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringAddExternalImageAction.builder().variantId(5L) }, + new Object[] { ProductTailoringAddExternalImageAction.builder().sku("sku") }, + new Object[] { ProductTailoringAddExternalImageAction.builder() + .image(new com.commercetools.api.models.common.ImageImpl()) }, + new Object[] { ProductTailoringAddExternalImageAction.builder().staged(true) } }; + } + + @Test + public void variantId() { + ProductTailoringAddExternalImageAction value = ProductTailoringAddExternalImageAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringAddExternalImageAction value = ProductTailoringAddExternalImageAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void image() { + ProductTailoringAddExternalImageAction value = ProductTailoringAddExternalImageAction.of(); + value.setImage(new com.commercetools.api.models.common.ImageImpl()); + Assertions.assertThat(value.getImage()).isEqualTo(new com.commercetools.api.models.common.ImageImpl()); + } + + @Test + public void staged() { + ProductTailoringAddExternalImageAction value = ProductTailoringAddExternalImageAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java new file mode 100644 index 00000000000..dfb075f9a8f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java @@ -0,0 +1,74 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringAddVariantActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringAddVariantActionBuilder builder) { + ProductTailoringAddVariantAction productTailoringAddVariantAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringAddVariantAction).isInstanceOf(ProductTailoringAddVariantAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringAddVariantAction.builder().id(2L) }, + new Object[] { ProductTailoringAddVariantAction.builder().sku("sku") }, + new Object[] { ProductTailoringAddVariantAction.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductTailoringAddVariantAction.builder() + .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetDraftImpl())) }, + new Object[] { ProductTailoringAddVariantAction.builder().staged(true) } }; + } + + @Test + public void id() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setId(2L); + Assertions.assertThat(value.getId()).isEqualTo(2L); + } + + @Test + public void sku() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void images() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void assets() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setAssets(Collections.singletonList(new com.commercetools.api.models.common.AssetDraftImpl())); + Assertions.assertThat(value.getAssets()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetDraftImpl())); + } + + @Test + public void staged() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionTest.java new file mode 100644 index 00000000000..51601490ba8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetNameActionTest.java @@ -0,0 +1,78 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringChangeAssetNameActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringChangeAssetNameActionBuilder builder) { + ProductTailoringChangeAssetNameAction productTailoringChangeAssetNameAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringChangeAssetNameAction) + .isInstanceOf(ProductTailoringChangeAssetNameAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringChangeAssetNameAction.builder().variantId(5L) }, + new Object[] { ProductTailoringChangeAssetNameAction.builder().sku("sku") }, + new Object[] { ProductTailoringChangeAssetNameAction.builder().staged(true) }, + new Object[] { ProductTailoringChangeAssetNameAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringChangeAssetNameAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringChangeAssetNameAction.builder() + .name(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void variantId() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void name() { + ProductTailoringChangeAssetNameAction value = ProductTailoringChangeAssetNameAction.of(); + value.setName(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionTest.java new file mode 100644 index 00000000000..fb0e59023fa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringChangeAssetOrderActionTest.java @@ -0,0 +1,64 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringChangeAssetOrderActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringChangeAssetOrderActionBuilder builder) { + ProductTailoringChangeAssetOrderAction productTailoringChangeAssetOrderAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringChangeAssetOrderAction) + .isInstanceOf(ProductTailoringChangeAssetOrderAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringChangeAssetOrderAction.builder().variantId(5L) }, + new Object[] { ProductTailoringChangeAssetOrderAction.builder().sku("sku") }, + new Object[] { ProductTailoringChangeAssetOrderAction.builder().staged(true) }, + new Object[] { ProductTailoringChangeAssetOrderAction.builder() + .assetOrder(Collections.singletonList("assetOrder")) } }; + } + + @Test + public void variantId() { + ProductTailoringChangeAssetOrderAction value = ProductTailoringChangeAssetOrderAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringChangeAssetOrderAction value = ProductTailoringChangeAssetOrderAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringChangeAssetOrderAction value = ProductTailoringChangeAssetOrderAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetOrder() { + ProductTailoringChangeAssetOrderAction value = ProductTailoringChangeAssetOrderAction.of(); + value.setAssetOrder(Collections.singletonList("assetOrder")); + Assertions.assertThat(value.getAssetOrder()).isEqualTo(Collections.singletonList("assetOrder")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java index f1d0dd7c89b..b6271c8218d 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDataTest.java @@ -1,6 +1,8 @@ package com.commercetools.api.models.product_tailoring; +import java.util.Collections; + import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; @@ -36,7 +38,10 @@ public static Object[][] objectBuilder() { new Object[] { ProductTailoringData.builder() .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, new Object[] { ProductTailoringData.builder() - .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, + new Object[] { ProductTailoringData.builder() + .variants(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())) } }; } @Test @@ -84,4 +89,14 @@ public void slug() { value.setSlug(new com.commercetools.api.models.common.LocalizedStringImpl()); Assertions.assertThat(value.getSlug()).isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); } + + @Test + public void variants() { + ProductTailoringData value = ProductTailoringData.of(); + value.setVariants(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + Assertions.assertThat(value.getVariants()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java index 695e9f5257f..6472b68eb7c 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringDraftTest.java @@ -1,6 +1,8 @@ package com.commercetools.api.models.product_tailoring; +import java.util.Collections; + import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; @@ -41,7 +43,10 @@ public static Object[][] objectBuilder() { .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, new Object[] { ProductTailoringDraft.builder() .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, - new Object[] { ProductTailoringDraft.builder().publish(true) } }; + new Object[] { ProductTailoringDraft.builder().publish(true) }, + new Object[] { ProductTailoringDraft.builder() + .variants(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())) } }; } @Test @@ -119,4 +124,14 @@ public void publish() { value.setPublish(true); Assertions.assertThat(value.getPublish()).isEqualTo(true); } + + @Test + public void variants() { + ProductTailoringDraft value = ProductTailoringDraft.of(); + value.setVariants(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())); + Assertions.assertThat(value.getVariants()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java index 1749d7ae964..1105e72d175 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringInStoreDraftTest.java @@ -1,6 +1,8 @@ package com.commercetools.api.models.product_tailoring; +import java.util.Collections; + import com.tngtech.junit.dataprovider.DataProvider; import com.tngtech.junit.dataprovider.DataProviderExtension; import com.tngtech.junit.dataprovider.UseDataProvider; @@ -39,7 +41,10 @@ public static Object[][] objectBuilder() { .metaKeywords(new com.commercetools.api.models.common.LocalizedStringImpl()) }, new Object[] { ProductTailoringInStoreDraft.builder() .slug(new com.commercetools.api.models.common.LocalizedStringImpl()) }, - new Object[] { ProductTailoringInStoreDraft.builder().publish(true) } }; + new Object[] { ProductTailoringInStoreDraft.builder().publish(true) }, + new Object[] { ProductTailoringInStoreDraft.builder() + .variants(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())) } }; } @Test @@ -109,4 +114,14 @@ public void publish() { value.setPublish(true); Assertions.assertThat(value.getPublish()).isEqualTo(true); } + + @Test + public void variants() { + ProductTailoringInStoreDraft value = ProductTailoringInStoreDraft.of(); + value.setVariants(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())); + Assertions.assertThat(value.getVariants()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductVariantTailoringDraftImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionTest.java new file mode 100644 index 00000000000..9cbda089d46 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringMoveImageToPositionActionTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringMoveImageToPositionActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringMoveImageToPositionActionBuilder builder) { + ProductTailoringMoveImageToPositionAction productTailoringMoveImageToPositionAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringMoveImageToPositionAction) + .isInstanceOf(ProductTailoringMoveImageToPositionAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringMoveImageToPositionAction.builder().variantId(5L) }, + new Object[] { ProductTailoringMoveImageToPositionAction.builder().sku("sku") }, + new Object[] { ProductTailoringMoveImageToPositionAction.builder().imageUrl("imageUrl") }, + new Object[] { ProductTailoringMoveImageToPositionAction.builder().position(4L) }, + new Object[] { ProductTailoringMoveImageToPositionAction.builder().staged(true) } }; + } + + @Test + public void variantId() { + ProductTailoringMoveImageToPositionAction value = ProductTailoringMoveImageToPositionAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringMoveImageToPositionAction value = ProductTailoringMoveImageToPositionAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void imageUrl() { + ProductTailoringMoveImageToPositionAction value = ProductTailoringMoveImageToPositionAction.of(); + value.setImageUrl("imageUrl"); + Assertions.assertThat(value.getImageUrl()).isEqualTo("imageUrl"); + } + + @Test + public void position() { + ProductTailoringMoveImageToPositionAction value = ProductTailoringMoveImageToPositionAction.of(); + value.setPosition(4L); + Assertions.assertThat(value.getPosition()).isEqualTo(4L); + } + + @Test + public void staged() { + ProductTailoringMoveImageToPositionAction value = ProductTailoringMoveImageToPositionAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionTest.java new file mode 100644 index 00000000000..8ec2507b640 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveAssetActionTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringRemoveAssetActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringRemoveAssetActionBuilder builder) { + ProductTailoringRemoveAssetAction productTailoringRemoveAssetAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringRemoveAssetAction).isInstanceOf(ProductTailoringRemoveAssetAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringRemoveAssetAction.builder().variantId(5L) }, + new Object[] { ProductTailoringRemoveAssetAction.builder().sku("sku") }, + new Object[] { ProductTailoringRemoveAssetAction.builder().staged(true) }, + new Object[] { ProductTailoringRemoveAssetAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringRemoveAssetAction.builder().assetKey("assetKey") } }; + } + + @Test + public void variantId() { + ProductTailoringRemoveAssetAction value = ProductTailoringRemoveAssetAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringRemoveAssetAction value = ProductTailoringRemoveAssetAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringRemoveAssetAction value = ProductTailoringRemoveAssetAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringRemoveAssetAction value = ProductTailoringRemoveAssetAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringRemoveAssetAction value = ProductTailoringRemoveAssetAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionTest.java new file mode 100644 index 00000000000..7f4b7b4cae4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveImageActionTest.java @@ -0,0 +1,60 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringRemoveImageActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringRemoveImageActionBuilder builder) { + ProductTailoringRemoveImageAction productTailoringRemoveImageAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringRemoveImageAction).isInstanceOf(ProductTailoringRemoveImageAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringRemoveImageAction.builder().variantId(5L) }, + new Object[] { ProductTailoringRemoveImageAction.builder().sku("sku") }, + new Object[] { ProductTailoringRemoveImageAction.builder().imageUrl("imageUrl") }, + new Object[] { ProductTailoringRemoveImageAction.builder().staged(true) } }; + } + + @Test + public void variantId() { + ProductTailoringRemoveImageAction value = ProductTailoringRemoveImageAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringRemoveImageAction value = ProductTailoringRemoveImageAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void imageUrl() { + ProductTailoringRemoveImageAction value = ProductTailoringRemoveImageAction.of(); + value.setImageUrl("imageUrl"); + Assertions.assertThat(value.getImageUrl()).isEqualTo("imageUrl"); + } + + @Test + public void staged() { + ProductTailoringRemoveImageAction value = ProductTailoringRemoveImageAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionTest.java new file mode 100644 index 00000000000..b9bbadb1886 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringRemoveVariantActionTest.java @@ -0,0 +1,53 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringRemoveVariantActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringRemoveVariantActionBuilder builder) { + ProductTailoringRemoveVariantAction productTailoringRemoveVariantAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringRemoveVariantAction) + .isInstanceOf(ProductTailoringRemoveVariantAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringRemoveVariantAction.builder().id(2L) }, + new Object[] { ProductTailoringRemoveVariantAction.builder().sku("sku") }, + new Object[] { ProductTailoringRemoveVariantAction.builder().staged(true) } }; + } + + @Test + public void id() { + ProductTailoringRemoveVariantAction value = ProductTailoringRemoveVariantAction.of(); + value.setId(2L); + Assertions.assertThat(value.getId()).isEqualTo(2L); + } + + @Test + public void sku() { + ProductTailoringRemoveVariantAction value = ProductTailoringRemoveVariantAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringRemoveVariantAction value = ProductTailoringRemoveVariantAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionTest.java new file mode 100644 index 00000000000..c2e1ef30857 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomFieldActionTest.java @@ -0,0 +1,85 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetCustomFieldActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetCustomFieldActionBuilder builder) { + ProductTailoringSetAssetCustomFieldAction productTailoringSetAssetCustomFieldAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetCustomFieldAction) + .isInstanceOf(ProductTailoringSetAssetCustomFieldAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().name("name") }, + new Object[] { ProductTailoringSetAssetCustomFieldAction.builder().value("value") } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void name() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductTailoringSetAssetCustomFieldAction value = ProductTailoringSetAssetCustomFieldAction.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionTest.java new file mode 100644 index 00000000000..0ffcf4f11c8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetCustomTypeActionTest.java @@ -0,0 +1,88 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetCustomTypeActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetCustomTypeActionBuilder builder) { + ProductTailoringSetAssetCustomTypeAction productTailoringSetAssetCustomTypeAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetCustomTypeAction) + .isInstanceOf(ProductTailoringSetAssetCustomTypeAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetCustomTypeAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder() + .type(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()) }, + new Object[] { ProductTailoringSetAssetCustomTypeAction.builder() + .fields(new com.commercetools.api.models.type.FieldContainerImpl()) } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void type() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setType(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + Assertions.assertThat(value.getType()) + .isEqualTo(new com.commercetools.api.models.type.TypeResourceIdentifierImpl()); + } + + @Test + public void fields() { + ProductTailoringSetAssetCustomTypeAction value = ProductTailoringSetAssetCustomTypeAction.of(); + value.setFields(new com.commercetools.api.models.type.FieldContainerImpl()); + Assertions.assertThat(value.getFields()).isEqualTo(new com.commercetools.api.models.type.FieldContainerImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionTest.java new file mode 100644 index 00000000000..755e51fecfe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetDescriptionActionTest.java @@ -0,0 +1,79 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetDescriptionActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetDescriptionActionBuilder builder) { + ProductTailoringSetAssetDescriptionAction productTailoringSetAssetDescriptionAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetDescriptionAction) + .isInstanceOf(ProductTailoringSetAssetDescriptionAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetDescriptionAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetDescriptionAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetDescriptionAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetDescriptionAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetDescriptionAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringSetAssetDescriptionAction.builder() + .description(new com.commercetools.api.models.common.LocalizedStringImpl()) } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void description() { + ProductTailoringSetAssetDescriptionAction value = ProductTailoringSetAssetDescriptionAction.of(); + value.setDescription(new com.commercetools.api.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.api.models.common.LocalizedStringImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionTest.java new file mode 100644 index 00000000000..366a410f695 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetKeyActionTest.java @@ -0,0 +1,68 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetKeyActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetKeyActionBuilder builder) { + ProductTailoringSetAssetKeyAction productTailoringSetAssetKeyAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetKeyAction).isInstanceOf(ProductTailoringSetAssetKeyAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetKeyAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetKeyAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetKeyAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetKeyAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetKeyAction.builder().assetKey("assetKey") } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetKeyAction value = ProductTailoringSetAssetKeyAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetKeyAction value = ProductTailoringSetAssetKeyAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetKeyAction value = ProductTailoringSetAssetKeyAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetKeyAction value = ProductTailoringSetAssetKeyAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetKeyAction value = ProductTailoringSetAssetKeyAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionTest.java new file mode 100644 index 00000000000..2cef43726a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetSourcesActionTest.java @@ -0,0 +1,82 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetSourcesActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetSourcesActionBuilder builder) { + ProductTailoringSetAssetSourcesAction productTailoringSetAssetSourcesAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetSourcesAction) + .isInstanceOf(ProductTailoringSetAssetSourcesAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetSourcesAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetSourcesAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetSourcesAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetSourcesAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetSourcesAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringSetAssetSourcesAction.builder() + .sources( + Collections.singletonList(new com.commercetools.api.models.common.AssetSourceImpl())) } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void sources() { + ProductTailoringSetAssetSourcesAction value = ProductTailoringSetAssetSourcesAction.of(); + value.setSources(Collections.singletonList(new com.commercetools.api.models.common.AssetSourceImpl())); + Assertions.assertThat(value.getSources()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetSourceImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionTest.java new file mode 100644 index 00000000000..60faeed6ae4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAssetTagsActionTest.java @@ -0,0 +1,79 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetAssetTagsActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAssetTagsActionBuilder builder) { + ProductTailoringSetAssetTagsAction productTailoringSetAssetTagsAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAssetTagsAction) + .isInstanceOf(ProductTailoringSetAssetTagsAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAssetTagsAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAssetTagsAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAssetTagsAction.builder().staged(true) }, + new Object[] { ProductTailoringSetAssetTagsAction.builder().assetId("assetId") }, + new Object[] { ProductTailoringSetAssetTagsAction.builder().assetKey("assetKey") }, + new Object[] { ProductTailoringSetAssetTagsAction.builder().tags(Collections.singletonList("tags")) } }; + } + + @Test + public void variantId() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void staged() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } + + @Test + public void assetId() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setAssetId("assetId"); + Assertions.assertThat(value.getAssetId()).isEqualTo("assetId"); + } + + @Test + public void assetKey() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setAssetKey("assetKey"); + Assertions.assertThat(value.getAssetKey()).isEqualTo("assetKey"); + } + + @Test + public void tags() { + ProductTailoringSetAssetTagsAction value = ProductTailoringSetAssetTagsAction.of(); + value.setTags(Collections.singletonList("tags")); + Assertions.assertThat(value.getTags()).isEqualTo(Collections.singletonList("tags")); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionTest.java new file mode 100644 index 00000000000..c4df4aa3dbc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetExternalImagesActionTest.java @@ -0,0 +1,65 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetExternalImagesActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetExternalImagesActionBuilder builder) { + ProductTailoringSetExternalImagesAction productTailoringSetExternalImagesAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetExternalImagesAction) + .isInstanceOf(ProductTailoringSetExternalImagesAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetExternalImagesAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetExternalImagesAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetExternalImagesAction.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductTailoringSetExternalImagesAction.builder().staged(true) } }; + } + + @Test + public void variantId() { + ProductTailoringSetExternalImagesAction value = ProductTailoringSetExternalImagesAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetExternalImagesAction value = ProductTailoringSetExternalImagesAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void images() { + ProductTailoringSetExternalImagesAction value = ProductTailoringSetExternalImagesAction.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void staged() { + ProductTailoringSetExternalImagesAction value = ProductTailoringSetExternalImagesAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionTest.java new file mode 100644 index 00000000000..39f58f52671 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetImageLabelActionTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.product_tailoring; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductTailoringSetImageLabelActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetImageLabelActionBuilder builder) { + ProductTailoringSetImageLabelAction productTailoringSetImageLabelAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetImageLabelAction) + .isInstanceOf(ProductTailoringSetImageLabelAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetImageLabelAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetImageLabelAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetImageLabelAction.builder().imageUrl("imageUrl") }, + new Object[] { ProductTailoringSetImageLabelAction.builder().label("label") }, + new Object[] { ProductTailoringSetImageLabelAction.builder().staged(true) } }; + } + + @Test + public void sku() { + ProductTailoringSetImageLabelAction value = ProductTailoringSetImageLabelAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void variantId() { + ProductTailoringSetImageLabelAction value = ProductTailoringSetImageLabelAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void imageUrl() { + ProductTailoringSetImageLabelAction value = ProductTailoringSetImageLabelAction.of(); + value.setImageUrl("imageUrl"); + Assertions.assertThat(value.getImageUrl()).isEqualTo("imageUrl"); + } + + @Test + public void label() { + ProductTailoringSetImageLabelAction value = ProductTailoringSetImageLabelAction.of(); + value.setLabel("label"); + Assertions.assertThat(value.getLabel()).isEqualTo("label"); + } + + @Test + public void staged() { + ProductTailoringSetImageLabelAction value = ProductTailoringSetImageLabelAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java new file mode 100644 index 00000000000..0ac95fa85e6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringDraftTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringDraftBuilder builder) { + ProductVariantTailoringDraft productVariantTailoringDraft = builder.buildUnchecked(); + Assertions.assertThat(productVariantTailoringDraft).isInstanceOf(ProductVariantTailoringDraft.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductVariantTailoringDraft.builder().id(2L) }, + new Object[] { ProductVariantTailoringDraft.builder().sku("sku") }, + new Object[] { ProductVariantTailoringDraft.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductVariantTailoringDraft.builder() + .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) } }; + } + + @Test + public void id() { + ProductVariantTailoringDraft value = ProductVariantTailoringDraft.of(); + value.setId(2L); + Assertions.assertThat(value.getId()).isEqualTo(2L); + } + + @Test + public void sku() { + ProductVariantTailoringDraft value = ProductVariantTailoringDraft.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void images() { + ProductVariantTailoringDraft value = ProductVariantTailoringDraft.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void assets() { + ProductVariantTailoringDraft value = ProductVariantTailoringDraft.of(); + value.setAssets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); + Assertions.assertThat(value.getAssets()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java new file mode 100644 index 00000000000..a6c88c860e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java @@ -0,0 +1,58 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProductVariantTailoringTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductVariantTailoringBuilder builder) { + ProductVariantTailoring productVariantTailoring = builder.buildUnchecked(); + Assertions.assertThat(productVariantTailoring).isInstanceOf(ProductVariantTailoring.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductVariantTailoring.builder().id(2L) }, + new Object[] { ProductVariantTailoring.builder() + .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, + new Object[] { ProductVariantTailoring.builder() + .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) } }; + } + + @Test + public void id() { + ProductVariantTailoring value = ProductVariantTailoring.of(); + value.setId(2L); + Assertions.assertThat(value.getId()).isEqualTo(2L); + } + + @Test + public void images() { + ProductVariantTailoring value = ProductVariantTailoring.of(); + value.setImages(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + Assertions.assertThat(value.getImages()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())); + } + + @Test + public void assets() { + ProductVariantTailoring value = ProductVariantTailoring.of(); + value.setAssets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); + Assertions.assertThat(value.getAssets()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); + } +} diff --git a/references.txt b/references.txt index 570c2687b83..6b5615115e2 100644 --- a/references.txt +++ b/references.txt @@ -263,3 +263,4 @@ a535e06bc2906c4f8b803f5a7686cbb920afd40a 4e0ef097a71501b7c84a50ca321310ab42e27011 c59cca7c5461c092dba5dc5bd547a9d62e404ad5 dd8eca14a0c47d154e4c705909a3d2696369bfd1 +63b10d36aea8ef676ec3c5cdbcf59eab1242d827 From 8e79739ca0428169daeec224f12f7609ee62e624 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 08:48:58 +0000 Subject: [PATCH 2/3] build(codegen): updating SDK --- changes.md | 15 + .../ByProjectKeyCustomersRequestBuilder.java | 8 + .../ByProjectKeyCustomersSearchHead.java | 109 ++++++++ ...ctKeyCustomersSearchIndexingStatusGet.java | 110 ++++++++ ...ersSearchIndexingStatusRequestBuilder.java | 23 ++ .../ByProjectKeyCustomersSearchPost.java | 130 +++++++++ ...ByProjectKeyCustomersSearchPostString.java | 129 +++++++++ ...ojectKeyCustomersSearchRequestBuilder.java | 38 +++ .../CustomerIndexingProgress.java | 158 +++++++++++ .../CustomerIndexingProgressBuilder.java | 132 +++++++++ .../CustomerIndexingProgressImpl.java | 117 ++++++++ .../CustomerPagedSearchResponse.java | 191 +++++++++++++ .../CustomerPagedSearchResponseBuilder.java | 239 ++++++++++++++++ .../CustomerPagedSearchResponseImpl.java | 140 ++++++++++ .../CustomerSearchIndexingStatusResponse.java | 196 +++++++++++++ ...erSearchIndexingStatusResponseBuilder.java | 213 ++++++++++++++ ...tomerSearchIndexingStatusResponseImpl.java | 161 +++++++++++ .../CustomerSearchRequest.java | 187 +++++++++++++ .../CustomerSearchRequestBuilder.java | 262 ++++++++++++++++++ .../CustomerSearchRequestImpl.java | 139 ++++++++++ .../customer_search/CustomerSearchResult.java | 140 ++++++++++ .../CustomerSearchResultBuilder.java | 107 +++++++ .../CustomerSearchResultImpl.java | 97 +++++++ .../CustomerSearchProjectNotIndexedError.java | 96 +++++++ ...tomerSearchProjectNotIndexedErrorImpl.java | 117 ++++++++ .../api/models/error/ErrorObject.java | 4 + ...LCustomerSearchProjectNotIndexedError.java | 80 ++++++ ...tomerSearchProjectNotIndexedErrorImpl.java | 99 +++++++ .../api/models/error/GraphQLErrorObject.java | 4 + .../project/CustomerIndexingStatus.java | 131 +++++++++ .../models/project/CustomerSearchStatus.java | 115 ++++++++ ...ojectChangeCustomerSearchStatusAction.java | 130 +++++++++ ...angeCustomerSearchStatusActionBuilder.java | 85 ++++++ ...tChangeCustomerSearchStatusActionImpl.java | 95 +++++++ .../models/project/ProjectUpdateAction.java | 13 + .../project/ProjectUpdateActionBuilder.java | 4 + ...stomerIndexingProgressQueryBuilderDsl.java | 32 +++ ...merPagedSearchResponseQueryBuilderDsl.java | 46 +++ ...IndexingStatusResponseQueryBuilderDsl.java | 50 ++++ .../CustomerSearchRequestQueryBuilderDsl.java | 50 ++++ .../CustomerSearchResultQueryBuilderDsl.java | 25 ++ ...ProjectNotIndexedErrorQueryBuilderDsl.java | 26 ++ .../error/ErrorObjectQueryBuilderDsl.java | 8 + ...ProjectNotIndexedErrorQueryBuilderDsl.java | 20 ++ .../GraphQLErrorObjectQueryBuilderDsl.java | 8 + ...omerSearchStatusActionQueryBuilderDsl.java | 26 ++ .../ProjectUpdateActionQueryBuilderDsl.java | 7 + ...tKeyCustomersSearchIndexingStatusTest.java | 76 +++++ .../ByProjectKeyCustomersSearchTest.java | 86 ++++++ .../CustomerIndexingProgressTest.java | 52 ++++ .../CustomerPagedSearchResponseTest.java | 67 +++++ ...tomerSearchIndexingStatusResponseTest.java | 78 ++++++ .../CustomerSearchRequestTest.java | 66 +++++ .../CustomerSearchResultTest.java | 44 +++ ...tChangeCustomerSearchStatusActionTest.java | 39 +++ references.txt | 1 + 56 files changed, 4821 insertions(+) create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchHead.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusGet.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPost.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPostString.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgress.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponse.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponse.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResult.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedError.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedErrorImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedError.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedErrorImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerIndexingStatus.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerSearchStatus.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusAction.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerIndexingProgressQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerPagedSearchResponseQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchIndexingStatusResponseQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchRequestQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchResultQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/CustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectChangeCustomerSearchStatusActionQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchIndexingStatusTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultTest.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionTest.java diff --git a/changes.md b/changes.md index 76bc3a99a1e..11aa58940d8 100644 --- a/changes.md +++ b/changes.md @@ -21,6 +21,8 @@
Added Resource(s) +- added resource `/{projectKey}/customers/search` +- added resource `/{projectKey}/customers/search/indexing-status` - added resource `/{projectKey}/in-store/key={storeKey}/quote-requests` - added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes` - added resource `/{projectKey}/in-store/key={storeKey}/quotes` @@ -54,6 +56,9 @@
Added Method(s) +- added method `apiRoot.withProjectKey().customers().search().post()` +- added method `apiRoot.withProjectKey().customers().search().head()` +- added method `apiRoot.withProjectKey().customers().searchIndexingStatus().get()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().get()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().head()` - added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().post()` @@ -96,6 +101,14 @@
Added Type(s) +- added type `CustomerIndexingProgress` +- added type `CustomerIndexingStatus` +- added type `CustomerPagedSearchResponse` +- added type `CustomerSearchIndexingStatusResponse` +- added type `CustomerSearchRequest` +- added type `CustomerSearchResult` +- added type `CustomerSearchProjectNotIndexedError` +- added type `GraphQLCustomerSearchProjectNotIndexedError` - added type `ProductTailoringImageAddedMessage` - added type `ProductTailoringImagesSetMessage` - added type `ProductVariantTailoringAddedMessage` @@ -123,6 +136,8 @@ - added type `ProductTailoringSetAssetTagsAction` - added type `ProductTailoringSetExternalImagesAction` - added type `ProductTailoringSetImageLabelAction` +- added type `CustomerSearchStatus` +- added type `ProjectChangeCustomerSearchStatusAction`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersRequestBuilder.java index a455704f3a8..96a52227edc 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersRequestBuilder.java @@ -75,4 +75,12 @@ public ByProjectKeyCustomersByIDRequestBuilder withId(String ID) { return new ByProjectKeyCustomersByIDRequestBuilder(apiHttpClient, projectKey, ID); } + public ByProjectKeyCustomersSearchRequestBuilder search() { + return new ByProjectKeyCustomersSearchRequestBuilder(apiHttpClient, projectKey); + } + + public ByProjectKeyCustomersSearchIndexingStatusRequestBuilder searchIndexingStatus() { + return new ByProjectKeyCustomersSearchIndexingStatusRequestBuilder(apiHttpClient, projectKey); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchHead.java new file mode 100644 index 00000000000..78931770430 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchHead.java @@ -0,0 +1,109 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + *

Checks whether a search index for the Project's Customers exists. Returns a 200 OK status if the index exists or 404 Not Found otherwise.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .customers()
+ *            .search()
+ *            .head()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchHead + extends TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyCustomersSearchHead(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyCustomersSearchHead(ByProjectKeyCustomersSearchHead t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/customers/search", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking(final ApiHttpClient client, + final Duration timeout) { + return executeBlocking(client, timeout, com.fasterxml.jackson.databind.JsonNode.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.fasterxml.jackson.databind.JsonNode.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCustomersSearchHead that = (ByProjectKeyCustomersSearchHead) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyCustomersSearchHead copy() { + return new ByProjectKeyCustomersSearchHead(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusGet.java new file mode 100644 index 00000000000..706e541f70c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusGet.java @@ -0,0 +1,110 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .customers()
+ *            .searchIndexingStatus()
+ *            .get()
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchIndexingStatusGet extends + TypeApiMethod + implements com.commercetools.api.client.ErrorableTrait, + com.commercetools.api.client.Deprecatable200Trait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + public ByProjectKeyCustomersSearchIndexingStatusGet(final ApiHttpClient apiHttpClient, String projectKey) { + super(apiHttpClient); + this.projectKey = projectKey; + } + + public ByProjectKeyCustomersSearchIndexingStatusGet(ByProjectKeyCustomersSearchIndexingStatusGet t) { + super(t); + this.projectKey = t.projectKey; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/customers/search/indexing-status", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.api.models.customer_search.CustomerSearchIndexingStatusResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.customer_search.CustomerSearchIndexingStatusResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCustomersSearchIndexingStatusGet that = (ByProjectKeyCustomersSearchIndexingStatusGet) o; + + return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); + } + + @Override + protected ByProjectKeyCustomersSearchIndexingStatusGet copy() { + return new ByProjectKeyCustomersSearchIndexingStatusGet(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusRequestBuilder.java new file mode 100644 index 00000000000..7bb28775dff --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchIndexingStatusRequestBuilder.java @@ -0,0 +1,23 @@ + +package com.commercetools.api.client; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchIndexingStatusRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyCustomersSearchIndexingStatusRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyCustomersSearchIndexingStatusGet get() { + return new ByProjectKeyCustomersSearchIndexingStatusGet(apiHttpClient, projectKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPost.java new file mode 100644 index 00000000000..713f0d27bf8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPost.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .customers()
+ *            .search()
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchPost extends + TypeBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private com.commercetools.api.models.customer_search.CustomerSearchRequest customerSearchRequest; + + public ByProjectKeyCustomersSearchPost(final ApiHttpClient apiHttpClient, String projectKey, + com.commercetools.api.models.customer_search.CustomerSearchRequest customerSearchRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.customerSearchRequest = customerSearchRequest; + } + + public ByProjectKeyCustomersSearchPost(ByProjectKeyCustomersSearchPost t) { + super(t); + this.projectKey = t.projectKey; + this.customerSearchRequest = t.customerSearchRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/customers/search", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils + .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(customerSearchRequest))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.api.models.customer_search.CustomerPagedSearchResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.customer_search.CustomerPagedSearchResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public com.commercetools.api.models.customer_search.CustomerSearchRequest getBody() { + return customerSearchRequest; + } + + public ByProjectKeyCustomersSearchPost withBody( + com.commercetools.api.models.customer_search.CustomerSearchRequest customerSearchRequest) { + ByProjectKeyCustomersSearchPost t = copy(); + t.customerSearchRequest = customerSearchRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCustomersSearchPost that = (ByProjectKeyCustomersSearchPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(customerSearchRequest, that.customerSearchRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(customerSearchRequest).toHashCode(); + } + + @Override + protected ByProjectKeyCustomersSearchPost copy() { + return new ByProjectKeyCustomersSearchPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPostString.java new file mode 100644 index 00000000000..c248e24562c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchPostString.java @@ -0,0 +1,129 @@ + +package com.commercetools.api.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; + +/** + * + * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKey("{projectKey}")
+ *            .customers()
+ *            .search()
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchPostString extends + StringBodyApiMethod + implements com.commercetools.api.client.ErrorableTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + + private String customerSearchRequest; + + public ByProjectKeyCustomersSearchPostString(final ApiHttpClient apiHttpClient, String projectKey, + String customerSearchRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.customerSearchRequest = customerSearchRequest; + } + + public ByProjectKeyCustomersSearchPostString(ByProjectKeyCustomersSearchPostString t) { + super(t); + this.projectKey = t.projectKey; + this.customerSearchRequest = t.customerSearchRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/customers/search", this.projectKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + customerSearchRequest.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, + com.commercetools.api.models.customer_search.CustomerPagedSearchResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.api.models.customer_search.CustomerPagedSearchResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public String getBody() { + return customerSearchRequest; + } + + public ByProjectKeyCustomersSearchPostString withBody(String customerSearchRequest) { + ByProjectKeyCustomersSearchPostString t = copy(); + t.customerSearchRequest = customerSearchRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyCustomersSearchPostString that = (ByProjectKeyCustomersSearchPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(customerSearchRequest, that.customerSearchRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey).append(customerSearchRequest).toHashCode(); + } + + @Override + protected ByProjectKeyCustomersSearchPostString copy() { + return new ByProjectKeyCustomersSearchPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchRequestBuilder.java new file mode 100644 index 00000000000..10003891b6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyCustomersSearchRequestBuilder.java @@ -0,0 +1,38 @@ + +package com.commercetools.api.client; + +import java.util.function.UnaryOperator; + +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyCustomersSearchRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyCustomersSearchRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyCustomersSearchPost post( + com.commercetools.api.models.customer_search.CustomerSearchRequest customerSearchRequest) { + return new ByProjectKeyCustomersSearchPost(apiHttpClient, projectKey, customerSearchRequest); + } + + public ByProjectKeyCustomersSearchPostString post(final String customerSearchRequest) { + return new ByProjectKeyCustomersSearchPostString(apiHttpClient, projectKey, customerSearchRequest); + } + + public ByProjectKeyCustomersSearchPost post( + UnaryOperator op) { + return post(op.apply(com.commercetools.api.models.customer_search.CustomerSearchRequestBuilder.of()).build()); + } + + public ByProjectKeyCustomersSearchHead head() { + return new ByProjectKeyCustomersSearchHead(apiHttpClient, projectKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgress.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgress.java new file mode 100644 index 00000000000..ba836177bf4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgress.java @@ -0,0 +1,158 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * CustomerIndexingProgress + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerIndexingProgress customerIndexingProgress = CustomerIndexingProgress.builder()
+ *             .indexed(0.3)
+ *             .failed(0.3)
+ *             .estimatedTotal(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerIndexingProgressImpl.class) +public interface CustomerIndexingProgress { + + /** + *

The number of Customers successfully indexed.

+ * @return indexed + */ + @NotNull + @JsonProperty("indexed") + public Integer getIndexed(); + + /** + *

The number of Customers that failed to be indexed.

+ * @return failed + */ + @NotNull + @JsonProperty("failed") + public Integer getFailed(); + + /** + *

The estimated total number of Customers to be indexed.

+ * @return estimatedTotal + */ + @NotNull + @JsonProperty("estimatedTotal") + public Integer getEstimatedTotal(); + + /** + *

The number of Customers successfully indexed.

+ * @param indexed value to be set + */ + + public void setIndexed(final Integer indexed); + + /** + *

The number of Customers that failed to be indexed.

+ * @param failed value to be set + */ + + public void setFailed(final Integer failed); + + /** + *

The estimated total number of Customers to be indexed.

+ * @param estimatedTotal value to be set + */ + + public void setEstimatedTotal(final Integer estimatedTotal); + + /** + * factory method + * @return instance of CustomerIndexingProgress + */ + public static CustomerIndexingProgress of() { + return new CustomerIndexingProgressImpl(); + } + + /** + * factory method to create a shallow copy CustomerIndexingProgress + * @param template instance to be copied + * @return copy instance + */ + public static CustomerIndexingProgress of(final CustomerIndexingProgress template) { + CustomerIndexingProgressImpl instance = new CustomerIndexingProgressImpl(); + instance.setIndexed(template.getIndexed()); + instance.setFailed(template.getFailed()); + instance.setEstimatedTotal(template.getEstimatedTotal()); + return instance; + } + + /** + * factory method to create a deep copy of CustomerIndexingProgress + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerIndexingProgress deepCopy(@Nullable final CustomerIndexingProgress template) { + if (template == null) { + return null; + } + CustomerIndexingProgressImpl instance = new CustomerIndexingProgressImpl(); + instance.setIndexed(template.getIndexed()); + instance.setFailed(template.getFailed()); + instance.setEstimatedTotal(template.getEstimatedTotal()); + return instance; + } + + /** + * builder factory method for CustomerIndexingProgress + * @return builder + */ + public static CustomerIndexingProgressBuilder builder() { + return CustomerIndexingProgressBuilder.of(); + } + + /** + * create builder for CustomerIndexingProgress instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerIndexingProgressBuilder builder(final CustomerIndexingProgress template) { + return CustomerIndexingProgressBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerIndexingProgress(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressBuilder.java new file mode 100644 index 00000000000..ca9bb58dc3c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerIndexingProgressBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerIndexingProgress customerIndexingProgress = CustomerIndexingProgress.builder()
+ *             .indexed(0.3)
+ *             .failed(0.3)
+ *             .estimatedTotal(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerIndexingProgressBuilder implements Builder { + + private Integer indexed; + + private Integer failed; + + private Integer estimatedTotal; + + /** + *

The number of Customers successfully indexed.

+ * @param indexed value to be set + * @return Builder + */ + + public CustomerIndexingProgressBuilder indexed(final Integer indexed) { + this.indexed = indexed; + return this; + } + + /** + *

The number of Customers that failed to be indexed.

+ * @param failed value to be set + * @return Builder + */ + + public CustomerIndexingProgressBuilder failed(final Integer failed) { + this.failed = failed; + return this; + } + + /** + *

The estimated total number of Customers to be indexed.

+ * @param estimatedTotal value to be set + * @return Builder + */ + + public CustomerIndexingProgressBuilder estimatedTotal(final Integer estimatedTotal) { + this.estimatedTotal = estimatedTotal; + return this; + } + + /** + *

The number of Customers successfully indexed.

+ * @return indexed + */ + + public Integer getIndexed() { + return this.indexed; + } + + /** + *

The number of Customers that failed to be indexed.

+ * @return failed + */ + + public Integer getFailed() { + return this.failed; + } + + /** + *

The estimated total number of Customers to be indexed.

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

The number of Customers successfully indexed.

+ */ + + public Integer getIndexed() { + return this.indexed; + } + + /** + *

The number of Customers that failed to be indexed.

+ */ + + public Integer getFailed() { + return this.failed; + } + + /** + *

The estimated total number of Customers to be indexed.

+ */ + + public Integer getEstimatedTotal() { + return this.estimatedTotal; + } + + public void setIndexed(final Integer indexed) { + this.indexed = indexed; + } + + public void setFailed(final Integer failed) { + this.failed = failed; + } + + public void setEstimatedTotal(final Integer estimatedTotal) { + this.estimatedTotal = estimatedTotal; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerIndexingProgressImpl that = (CustomerIndexingProgressImpl) o; + + return new EqualsBuilder().append(indexed, that.indexed) + .append(failed, that.failed) + .append(estimatedTotal, that.estimatedTotal) + .append(indexed, that.indexed) + .append(failed, that.failed) + .append(estimatedTotal, that.estimatedTotal) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(indexed).append(failed).append(estimatedTotal).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("indexed", indexed) + .append("failed", failed) + .append("estimatedTotal", estimatedTotal) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponse.java new file mode 100644 index 00000000000..740fce515b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponse.java @@ -0,0 +1,191 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * CustomerPagedSearchResponse + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerPagedSearchResponse customerPagedSearchResponse = CustomerPagedSearchResponse.builder()
+ *             .total(0.3)
+ *             .limit(0.3)
+ *             .offset(0.3)
+ *             .plusResults(resultsBuilder -> resultsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerPagedSearchResponseImpl.class) +public interface CustomerPagedSearchResponse { + + /** + *

Total number of results matching the query.

+ * @return total + */ + @NotNull + @JsonProperty("total") + public Long getTotal(); + + /** + *

Number of results requested.

+ * @return limit + */ + @NotNull + @JsonProperty("limit") + public Integer getLimit(); + + /** + *

Number of elements skipped.

+ * @return offset + */ + @NotNull + @JsonProperty("offset") + public Integer getOffset(); + + /** + *

Search result containing the Customers matching the search query.

+ * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public List getResults(); + + /** + *

Total number of results matching the query.

+ * @param total value to be set + */ + + public void setTotal(final Long total); + + /** + *

Number of results requested.

+ * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *

Number of elements skipped.

+ * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + *

Search result containing the Customers matching the search query.

+ * @param results values to be set + */ + + @JsonIgnore + public void setResults(final CustomerSearchResult... results); + + /** + *

Search result containing the Customers matching the search query.

+ * @param results values to be set + */ + + public void setResults(final List results); + + /** + * factory method + * @return instance of CustomerPagedSearchResponse + */ + public static CustomerPagedSearchResponse of() { + return new CustomerPagedSearchResponseImpl(); + } + + /** + * factory method to create a shallow copy CustomerPagedSearchResponse + * @param template instance to be copied + * @return copy instance + */ + public static CustomerPagedSearchResponse of(final CustomerPagedSearchResponse template) { + CustomerPagedSearchResponseImpl instance = new CustomerPagedSearchResponseImpl(); + instance.setTotal(template.getTotal()); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setResults(template.getResults()); + return instance; + } + + /** + * factory method to create a deep copy of CustomerPagedSearchResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerPagedSearchResponse deepCopy(@Nullable final CustomerPagedSearchResponse template) { + if (template == null) { + return null; + } + CustomerPagedSearchResponseImpl instance = new CustomerPagedSearchResponseImpl(); + instance.setTotal(template.getTotal()); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + instance.setResults(Optional.ofNullable(template.getResults()) + .map(t -> t.stream() + .map(com.commercetools.api.models.customer_search.CustomerSearchResult::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for CustomerPagedSearchResponse + * @return builder + */ + public static CustomerPagedSearchResponseBuilder builder() { + return CustomerPagedSearchResponseBuilder.of(); + } + + /** + * create builder for CustomerPagedSearchResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerPagedSearchResponseBuilder builder(final CustomerPagedSearchResponse template) { + return CustomerPagedSearchResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerPagedSearchResponse(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseBuilder.java new file mode 100644 index 00000000000..754b6bd3513 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseBuilder.java @@ -0,0 +1,239 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerPagedSearchResponseBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerPagedSearchResponse customerPagedSearchResponse = CustomerPagedSearchResponse.builder()
+ *             .total(0.3)
+ *             .limit(0.3)
+ *             .offset(0.3)
+ *             .plusResults(resultsBuilder -> resultsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerPagedSearchResponseBuilder implements Builder { + + private Long total; + + private Integer limit; + + private Integer offset; + + private java.util.List results; + + /** + *

Total number of results matching the query.

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

Number of results requested.

+ * @param limit value to be set + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder limit(final Integer limit) { + this.limit = limit; + return this; + } + + /** + *

Number of elements skipped.

+ * @param offset value to be set + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder offset(final Integer offset) { + this.offset = offset; + return this; + } + + /** + *

Search result containing the Customers matching the search query.

+ * @param results value to be set + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder results( + final com.commercetools.api.models.customer_search.CustomerSearchResult... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *

Search result containing the Customers matching the search query.

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

Search result containing the Customers matching the search query.

+ * @param results value to be set + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder plusResults( + final com.commercetools.api.models.customer_search.CustomerSearchResult... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *

Search result containing the Customers matching the search query.

+ * @param builder function to build the results value + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder plusResults( + Function builder) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add( + builder.apply(com.commercetools.api.models.customer_search.CustomerSearchResultBuilder.of()).build()); + return this; + } + + /** + *

Search result containing the Customers matching the search query.

+ * @param builder function to build the results value + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder withResults( + Function builder) { + this.results = new ArrayList<>(); + this.results.add( + builder.apply(com.commercetools.api.models.customer_search.CustomerSearchResultBuilder.of()).build()); + return this; + } + + /** + *

Search result containing the Customers matching the search query.

+ * @param builder function to build the results value + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder addResults( + Function builder) { + return plusResults( + builder.apply(com.commercetools.api.models.customer_search.CustomerSearchResultBuilder.of())); + } + + /** + *

Search result containing the Customers matching the search query.

+ * @param builder function to build the results value + * @return Builder + */ + + public CustomerPagedSearchResponseBuilder setResults( + Function builder) { + return results(builder.apply(com.commercetools.api.models.customer_search.CustomerSearchResultBuilder.of())); + } + + /** + *

Total number of results matching the query.

+ * @return total + */ + + public Long getTotal() { + return this.total; + } + + /** + *

Number of results requested.

+ * @return limit + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

Number of elements skipped.

+ * @return offset + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

Search result containing the Customers matching the search query.

+ * @return results + */ + + public java.util.List getResults() { + return this.results; + } + + /** + * builds CustomerPagedSearchResponse with checking for non-null required values + * @return CustomerPagedSearchResponse + */ + public CustomerPagedSearchResponse build() { + Objects.requireNonNull(total, CustomerPagedSearchResponse.class + ": total is missing"); + Objects.requireNonNull(limit, CustomerPagedSearchResponse.class + ": limit is missing"); + Objects.requireNonNull(offset, CustomerPagedSearchResponse.class + ": offset is missing"); + Objects.requireNonNull(results, CustomerPagedSearchResponse.class + ": results is missing"); + return new CustomerPagedSearchResponseImpl(total, limit, offset, results); + } + + /** + * builds CustomerPagedSearchResponse without checking for non-null required values + * @return CustomerPagedSearchResponse + */ + public CustomerPagedSearchResponse buildUnchecked() { + return new CustomerPagedSearchResponseImpl(total, limit, offset, results); + } + + /** + * factory method for an instance of CustomerPagedSearchResponseBuilder + * @return builder + */ + public static CustomerPagedSearchResponseBuilder of() { + return new CustomerPagedSearchResponseBuilder(); + } + + /** + * create builder for CustomerPagedSearchResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerPagedSearchResponseBuilder of(final CustomerPagedSearchResponse template) { + CustomerPagedSearchResponseBuilder builder = new CustomerPagedSearchResponseBuilder(); + builder.total = template.getTotal(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + builder.results = template.getResults(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseImpl.java new file mode 100644 index 00000000000..ef319ee51c0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseImpl.java @@ -0,0 +1,140 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CustomerPagedSearchResponse + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerPagedSearchResponseImpl implements CustomerPagedSearchResponse, ModelBase { + + private Long total; + + private Integer limit; + + private Integer offset; + + private java.util.List results; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerPagedSearchResponseImpl(@JsonProperty("total") final Long total, @JsonProperty("limit") final Integer limit, + @JsonProperty("offset") final Integer offset, + @JsonProperty("results") final java.util.List results) { + this.total = total; + this.limit = limit; + this.offset = offset; + this.results = results; + } + + /** + * create empty instance + */ + public CustomerPagedSearchResponseImpl() { + } + + /** + *

Total number of results matching the query.

+ */ + + public Long getTotal() { + return this.total; + } + + /** + *

Number of results requested.

+ */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

Number of elements skipped.

+ */ + + public Integer getOffset() { + return this.offset; + } + + /** + *

Search result containing the Customers matching the search query.

+ */ + + public java.util.List getResults() { + return this.results; + } + + public void setTotal(final Long total) { + this.total = total; + } + + public void setLimit(final Integer limit) { + this.limit = limit; + } + + public void setOffset(final Integer offset) { + this.offset = offset; + } + + public void setResults(final com.commercetools.api.models.customer_search.CustomerSearchResult... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + } + + public void setResults( + final java.util.List results) { + this.results = results; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerPagedSearchResponseImpl that = (CustomerPagedSearchResponseImpl) o; + + return new EqualsBuilder().append(total, that.total) + .append(limit, that.limit) + .append(offset, that.offset) + .append(results, that.results) + .append(total, that.total) + .append(limit, that.limit) + .append(offset, that.offset) + .append(results, that.results) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(total).append(limit).append(offset).append(results).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("total", total) + .append("limit", limit) + .append("offset", offset) + .append("results", results) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponse.java new file mode 100644 index 00000000000..777cc4f25e2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponse.java @@ -0,0 +1,196 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.project.CustomerIndexingStatus; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * CustomerSearchIndexingStatusResponse + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerSearchIndexingStatusResponse customerSearchIndexingStatusResponse = CustomerSearchIndexingStatusResponse.builder()
+ *             .status(CustomerIndexingStatus.SCHEDULED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerSearchIndexingStatusResponseImpl.class) +public interface CustomerSearchIndexingStatusResponse { + + /** + *

Current status of indexing the Customer Search.

+ * @return status + */ + @NotNull + @JsonProperty("status") + public CustomerIndexingStatus getStatus(); + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @return states + */ + @Valid + @JsonProperty("states") + public CustomerIndexingProgress getStates(); + + /** + *

Date and time (UTC) when the last indexing started.

+ * @return startedAt + */ + + @JsonProperty("startedAt") + public ZonedDateTime getStartedAt(); + + /** + *

Time when the status was last modified.

+ * @return lastModifiedAt + */ + + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *

Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.

+ * @return retryCount + */ + + @JsonProperty("retryCount") + public Integer getRetryCount(); + + /** + *

Current status of indexing the Customer Search.

+ * @param status value to be set + */ + + public void setStatus(final CustomerIndexingStatus status); + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @param states value to be set + */ + + public void setStates(final CustomerIndexingProgress states); + + /** + *

Date and time (UTC) when the last indexing started.

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

Time when the status was last modified.

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

Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.

+ * @param retryCount value to be set + */ + + public void setRetryCount(final Integer retryCount); + + /** + * factory method + * @return instance of CustomerSearchIndexingStatusResponse + */ + public static CustomerSearchIndexingStatusResponse of() { + return new CustomerSearchIndexingStatusResponseImpl(); + } + + /** + * factory method to create a shallow copy CustomerSearchIndexingStatusResponse + * @param template instance to be copied + * @return copy instance + */ + public static CustomerSearchIndexingStatusResponse of(final CustomerSearchIndexingStatusResponse template) { + CustomerSearchIndexingStatusResponseImpl instance = new CustomerSearchIndexingStatusResponseImpl(); + instance.setStatus(template.getStatus()); + instance.setStates(template.getStates()); + instance.setStartedAt(template.getStartedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRetryCount(template.getRetryCount()); + return instance; + } + + /** + * factory method to create a deep copy of CustomerSearchIndexingStatusResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerSearchIndexingStatusResponse deepCopy( + @Nullable final CustomerSearchIndexingStatusResponse template) { + if (template == null) { + return null; + } + CustomerSearchIndexingStatusResponseImpl instance = new CustomerSearchIndexingStatusResponseImpl(); + instance.setStatus(template.getStatus()); + instance.setStates( + com.commercetools.api.models.customer_search.CustomerIndexingProgress.deepCopy(template.getStates())); + instance.setStartedAt(template.getStartedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRetryCount(template.getRetryCount()); + return instance; + } + + /** + * builder factory method for CustomerSearchIndexingStatusResponse + * @return builder + */ + public static CustomerSearchIndexingStatusResponseBuilder builder() { + return CustomerSearchIndexingStatusResponseBuilder.of(); + } + + /** + * create builder for CustomerSearchIndexingStatusResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerSearchIndexingStatusResponseBuilder builder( + final CustomerSearchIndexingStatusResponse template) { + return CustomerSearchIndexingStatusResponseBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerSearchIndexingStatusResponse(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseBuilder.java new file mode 100644 index 00000000000..304e5c6dd6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseBuilder.java @@ -0,0 +1,213 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerSearchIndexingStatusResponseBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerSearchIndexingStatusResponse customerSearchIndexingStatusResponse = CustomerSearchIndexingStatusResponse.builder()
+ *             .status(CustomerIndexingStatus.SCHEDULED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerSearchIndexingStatusResponseBuilder implements Builder { + + private com.commercetools.api.models.project.CustomerIndexingStatus status; + + @Nullable + private com.commercetools.api.models.customer_search.CustomerIndexingProgress states; + + @Nullable + private java.time.ZonedDateTime startedAt; + + @Nullable + private java.time.ZonedDateTime lastModifiedAt; + + @Nullable + private Integer retryCount; + + /** + *

Current status of indexing the Customer Search.

+ * @param status value to be set + * @return Builder + */ + + public CustomerSearchIndexingStatusResponseBuilder status( + final com.commercetools.api.models.project.CustomerIndexingStatus status) { + this.status = status; + return this; + } + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @param builder function to build the states value + * @return Builder + */ + + public CustomerSearchIndexingStatusResponseBuilder states( + Function builder) { + this.states = builder.apply(com.commercetools.api.models.customer_search.CustomerIndexingProgressBuilder.of()) + .build(); + return this; + } + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @param builder function to build the states value + * @return Builder + */ + + public CustomerSearchIndexingStatusResponseBuilder withStates( + Function builder) { + this.states = builder.apply(com.commercetools.api.models.customer_search.CustomerIndexingProgressBuilder.of()); + return this; + } + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @param states value to be set + * @return Builder + */ + + public CustomerSearchIndexingStatusResponseBuilder states( + @Nullable final com.commercetools.api.models.customer_search.CustomerIndexingProgress states) { + this.states = states; + return this; + } + + /** + *

Date and time (UTC) when the last indexing started.

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

Time when the status was last modified.

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

Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.

+ * @param retryCount value to be set + * @return Builder + */ + + public CustomerSearchIndexingStatusResponseBuilder retryCount(@Nullable final Integer retryCount) { + this.retryCount = retryCount; + return this; + } + + /** + *

Current status of indexing the Customer Search.

+ * @return status + */ + + public com.commercetools.api.models.project.CustomerIndexingStatus getStatus() { + return this.status; + } + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ * @return states + */ + + @Nullable + public com.commercetools.api.models.customer_search.CustomerIndexingProgress getStates() { + return this.states; + } + + /** + *

Date and time (UTC) when the last indexing started.

+ * @return startedAt + */ + + @Nullable + public java.time.ZonedDateTime getStartedAt() { + return this.startedAt; + } + + /** + *

Time when the status was last modified.

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

Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.

+ * @return retryCount + */ + + @Nullable + public Integer getRetryCount() { + return this.retryCount; + } + + /** + * builds CustomerSearchIndexingStatusResponse with checking for non-null required values + * @return CustomerSearchIndexingStatusResponse + */ + public CustomerSearchIndexingStatusResponse build() { + Objects.requireNonNull(status, CustomerSearchIndexingStatusResponse.class + ": status is missing"); + return new CustomerSearchIndexingStatusResponseImpl(status, states, startedAt, lastModifiedAt, retryCount); + } + + /** + * builds CustomerSearchIndexingStatusResponse without checking for non-null required values + * @return CustomerSearchIndexingStatusResponse + */ + public CustomerSearchIndexingStatusResponse buildUnchecked() { + return new CustomerSearchIndexingStatusResponseImpl(status, states, startedAt, lastModifiedAt, retryCount); + } + + /** + * factory method for an instance of CustomerSearchIndexingStatusResponseBuilder + * @return builder + */ + public static CustomerSearchIndexingStatusResponseBuilder of() { + return new CustomerSearchIndexingStatusResponseBuilder(); + } + + /** + * create builder for CustomerSearchIndexingStatusResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerSearchIndexingStatusResponseBuilder of(final CustomerSearchIndexingStatusResponse template) { + CustomerSearchIndexingStatusResponseBuilder builder = new CustomerSearchIndexingStatusResponseBuilder(); + builder.status = template.getStatus(); + builder.states = template.getStates(); + builder.startedAt = template.getStartedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.retryCount = template.getRetryCount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseImpl.java new file mode 100644 index 00000000000..ca20000df02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseImpl.java @@ -0,0 +1,161 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CustomerSearchIndexingStatusResponse + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerSearchIndexingStatusResponseImpl implements CustomerSearchIndexingStatusResponse, ModelBase { + + private com.commercetools.api.models.project.CustomerIndexingStatus status; + + private com.commercetools.api.models.customer_search.CustomerIndexingProgress states; + + private java.time.ZonedDateTime startedAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private Integer retryCount; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerSearchIndexingStatusResponseImpl( + @JsonProperty("status") final com.commercetools.api.models.project.CustomerIndexingStatus status, + @JsonProperty("states") final com.commercetools.api.models.customer_search.CustomerIndexingProgress states, + @JsonProperty("startedAt") final java.time.ZonedDateTime startedAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("retryCount") final Integer retryCount) { + this.status = status; + this.states = states; + this.startedAt = startedAt; + this.lastModifiedAt = lastModifiedAt; + this.retryCount = retryCount; + } + + /** + * create empty instance + */ + public CustomerSearchIndexingStatusResponseImpl() { + } + + /** + *

Current status of indexing the Customer Search.

+ */ + + public com.commercetools.api.models.project.CustomerIndexingStatus getStatus() { + return this.status; + } + + /** + *

Progress of indexing. Only available when indexing is in progress.

+ */ + + public com.commercetools.api.models.customer_search.CustomerIndexingProgress getStates() { + return this.states; + } + + /** + *

Date and time (UTC) when the last indexing started.

+ */ + + public java.time.ZonedDateTime getStartedAt() { + return this.startedAt; + } + + /** + *

Time when the status was last modified.

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

Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.

+ */ + + public Integer getRetryCount() { + return this.retryCount; + } + + public void setStatus(final com.commercetools.api.models.project.CustomerIndexingStatus status) { + this.status = status; + } + + public void setStates(final com.commercetools.api.models.customer_search.CustomerIndexingProgress states) { + this.states = states; + } + + public void setStartedAt(final java.time.ZonedDateTime startedAt) { + this.startedAt = startedAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setRetryCount(final Integer retryCount) { + this.retryCount = retryCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerSearchIndexingStatusResponseImpl that = (CustomerSearchIndexingStatusResponseImpl) o; + + return new EqualsBuilder().append(status, that.status) + .append(states, that.states) + .append(startedAt, that.startedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(retryCount, that.retryCount) + .append(status, that.status) + .append(states, that.states) + .append(startedAt, that.startedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(retryCount, that.retryCount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(status) + .append(states) + .append(startedAt) + .append(lastModifiedAt) + .append(retryCount) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("status", status) + .append("states", states) + .append("startedAt", startedAt) + .append("lastModifiedAt", lastModifiedAt) + .append("retryCount", retryCount) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequest.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequest.java new file mode 100644 index 00000000000..e25ff34d27c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequest.java @@ -0,0 +1,187 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.search.SearchQuery; +import com.commercetools.api.models.search.SearchSorting; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * CustomerSearchRequest + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerSearchRequest customerSearchRequest = CustomerSearchRequest.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerSearchRequestImpl.class) +public interface CustomerSearchRequest { + + /** + *

The Customer search query.

+ * @return query + */ + @Valid + @JsonProperty("query") + public SearchQuery getQuery(); + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @return sort + */ + @Valid + @JsonProperty("sort") + public List getSort(); + + /** + *

The maximum number of search results to be returned.

+ * @return limit + */ + + @JsonProperty("limit") + public Integer getLimit(); + + /** + *

The number of search results to be skipped in the response for pagination.

+ * @return offset + */ + + @JsonProperty("offset") + public Integer getOffset(); + + /** + *

The Customer search query.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param sort values to be set + */ + + @JsonIgnore + public void setSort(final SearchSorting... sort); + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param sort values to be set + */ + + public void setSort(final List sort); + + /** + *

The maximum number of search results to be returned.

+ * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *

The number of search results to be skipped in the response for pagination.

+ * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + * factory method + * @return instance of CustomerSearchRequest + */ + public static CustomerSearchRequest of() { + return new CustomerSearchRequestImpl(); + } + + /** + * factory method to create a shallow copy CustomerSearchRequest + * @param template instance to be copied + * @return copy instance + */ + public static CustomerSearchRequest of(final CustomerSearchRequest template) { + CustomerSearchRequestImpl instance = new CustomerSearchRequestImpl(); + instance.setQuery(template.getQuery()); + instance.setSort(template.getSort()); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + return instance; + } + + /** + * factory method to create a deep copy of CustomerSearchRequest + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerSearchRequest deepCopy(@Nullable final CustomerSearchRequest template) { + if (template == null) { + return null; + } + CustomerSearchRequestImpl instance = new CustomerSearchRequestImpl(); + instance.setQuery(com.commercetools.api.models.search.SearchQuery.deepCopy(template.getQuery())); + instance.setSort(Optional.ofNullable(template.getSort()) + .map(t -> t.stream() + .map(com.commercetools.api.models.search.SearchSorting::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + return instance; + } + + /** + * builder factory method for CustomerSearchRequest + * @return builder + */ + public static CustomerSearchRequestBuilder builder() { + return CustomerSearchRequestBuilder.of(); + } + + /** + * create builder for CustomerSearchRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerSearchRequestBuilder builder(final CustomerSearchRequest template) { + return CustomerSearchRequestBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerSearchRequest(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestBuilder.java new file mode 100644 index 00000000000..a9d0702017e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestBuilder.java @@ -0,0 +1,262 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * CustomerSearchRequestBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerSearchRequest customerSearchRequest = CustomerSearchRequest.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerSearchRequestBuilder implements Builder { + + @Nullable + private com.commercetools.api.models.search.SearchQuery query; + + @Nullable + private java.util.List sort; + + @Nullable + private Integer limit; + + @Nullable + private Integer offset; + + /** + *

The Customer search query.

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

The Customer search query.

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

The Customer search query.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param sort value to be set + * @return Builder + */ + + public CustomerSearchRequestBuilder plusSort( + @Nullable final com.commercetools.api.models.search.SearchSorting... sort) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.addAll(Arrays.asList(sort)); + return this; + } + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param builder function to build the sort value + * @return Builder + */ + + public CustomerSearchRequestBuilder plusSort( + Function builder) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.add(builder.apply(com.commercetools.api.models.search.SearchSortingBuilder.of()).build()); + return this; + } + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param builder function to build the sort value + * @return Builder + */ + + public CustomerSearchRequestBuilder withSort( + Function builder) { + this.sort = new ArrayList<>(); + this.sort.add(builder.apply(com.commercetools.api.models.search.SearchSortingBuilder.of()).build()); + return this; + } + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param builder function to build the sort value + * @return Builder + */ + + public CustomerSearchRequestBuilder addSort( + Function builder) { + return plusSort(builder.apply(com.commercetools.api.models.search.SearchSortingBuilder.of())); + } + + /** + *

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @param builder function to build the sort value + * @return Builder + */ + + public CustomerSearchRequestBuilder setSort( + Function builder) { + return sort(builder.apply(com.commercetools.api.models.search.SearchSortingBuilder.of())); + } + + /** + *

The maximum number of search results to be returned.

+ * @param limit value to be set + * @return Builder + */ + + public CustomerSearchRequestBuilder limit(@Nullable final Integer limit) { + this.limit = limit; + return this; + } + + /** + *

The number of search results to be skipped in the response for pagination.

+ * @param offset value to be set + * @return Builder + */ + + public CustomerSearchRequestBuilder offset(@Nullable final Integer offset) { + this.offset = offset; + return this; + } + + /** + *

The Customer search query.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ * @return sort + */ + + @Nullable + public java.util.List getSort() { + return this.sort; + } + + /** + *

The maximum number of search results to be returned.

+ * @return limit + */ + + @Nullable + public Integer getLimit() { + return this.limit; + } + + /** + *

The number of search results to be skipped in the response for pagination.

+ * @return offset + */ + + @Nullable + public Integer getOffset() { + return this.offset; + } + + /** + * builds CustomerSearchRequest with checking for non-null required values + * @return CustomerSearchRequest + */ + public CustomerSearchRequest build() { + return new CustomerSearchRequestImpl(query, sort, limit, offset); + } + + /** + * builds CustomerSearchRequest without checking for non-null required values + * @return CustomerSearchRequest + */ + public CustomerSearchRequest buildUnchecked() { + return new CustomerSearchRequestImpl(query, sort, limit, offset); + } + + /** + * factory method for an instance of CustomerSearchRequestBuilder + * @return builder + */ + public static CustomerSearchRequestBuilder of() { + return new CustomerSearchRequestBuilder(); + } + + /** + * create builder for CustomerSearchRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static CustomerSearchRequestBuilder of(final CustomerSearchRequest template) { + CustomerSearchRequestBuilder builder = new CustomerSearchRequestBuilder(); + builder.query = template.getQuery(); + builder.sort = template.getSort(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestImpl.java new file mode 100644 index 00000000000..71f10bd0d8d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * CustomerSearchRequest + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerSearchRequestImpl implements CustomerSearchRequest, ModelBase { + + private com.commercetools.api.models.search.SearchQuery query; + + private java.util.List sort; + + private Integer limit; + + private Integer offset; + + /** + * create instance with all properties + */ + @JsonCreator + CustomerSearchRequestImpl(@JsonProperty("query") final com.commercetools.api.models.search.SearchQuery query, + @JsonProperty("sort") final java.util.List sort, + @JsonProperty("limit") final Integer limit, @JsonProperty("offset") final Integer offset) { + this.query = query; + this.sort = sort; + this.limit = limit; + this.offset = offset; + } + + /** + * create empty instance + */ + public CustomerSearchRequestImpl() { + } + + /** + *

The Customer search query.

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

Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.

+ */ + + public java.util.List getSort() { + return this.sort; + } + + /** + *

The maximum number of search results to be returned.

+ */ + + public Integer getLimit() { + return this.limit; + } + + /** + *

The number of search results to be skipped in the response for pagination.

+ */ + + public Integer getOffset() { + return this.offset; + } + + public void setQuery(final com.commercetools.api.models.search.SearchQuery query) { + this.query = query; + } + + public void setSort(final com.commercetools.api.models.search.SearchSorting... sort) { + this.sort = new ArrayList<>(Arrays.asList(sort)); + } + + public void setSort(final java.util.List sort) { + this.sort = sort; + } + + public void setLimit(final Integer limit) { + this.limit = limit; + } + + public void setOffset(final Integer offset) { + this.offset = offset; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerSearchRequestImpl that = (CustomerSearchRequestImpl) o; + + return new EqualsBuilder().append(query, that.query) + .append(sort, that.sort) + .append(limit, that.limit) + .append(offset, that.offset) + .append(query, that.query) + .append(sort, that.sort) + .append(limit, that.limit) + .append(offset, that.offset) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(query).append(sort).append(limit).append(offset).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("query", query) + .append("sort", sort) + .append("limit", limit) + .append("offset", offset) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResult.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResult.java new file mode 100644 index 00000000000..a0ee633aceb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResult.java @@ -0,0 +1,140 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * CustomerSearchResult + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     CustomerSearchResult customerSearchResult = CustomerSearchResult.builder()
+ *             .id("{id}")
+ *             .relevance(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = CustomerSearchResultImpl.class) +public interface CustomerSearchResult { + + /** + *

id of the Customer matching the search query.

+ * @return id + */ + @NotNull + @JsonProperty("id") + public String getId(); + + /** + *

How closely this customer matches the search query.

+ * @return relevance + */ + @NotNull + @JsonProperty("relevance") + public Double getRelevance(); + + /** + *

id of the Customer matching the search query.

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

How closely this customer matches the search query.

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

+ *     CustomerSearchResult customerSearchResult = CustomerSearchResult.builder()
+ *             .id("{id}")
+ *             .relevance(0.3)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class CustomerSearchResultBuilder implements Builder { + + private String id; + + private Double relevance; + + /** + *

id of the Customer matching the search query.

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

How closely this customer matches the search query.

+ * @param relevance value to be set + * @return Builder + */ + + public CustomerSearchResultBuilder relevance(final Double relevance) { + this.relevance = relevance; + return this; + } + + /** + *

id of the Customer matching the search query.

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

How closely this customer matches the search query.

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

id of the Customer matching the search query.

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

How closely this customer matches the search query.

+ */ + + public Double getRelevance() { + return this.relevance; + } + + public void setId(final String id) { + this.id = id; + } + + public void setRelevance(final Double relevance) { + this.relevance = relevance; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerSearchResultImpl that = (CustomerSearchResultImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(relevance, that.relevance) + .append(id, that.id) + .append(relevance, that.relevance) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(relevance).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("relevance", relevance) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedError.java new file mode 100644 index 00000000000..faf04818be9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedError.java @@ -0,0 +1,96 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned as response to the Search Customers request in case the Customer Search API is not active for the Project.

+ *

Use the Change Customer Search Status update action on the Project to activate the API.

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

+ *     CustomerSearchProjectNotIndexedError customerSearchProjectNotIndexedError = CustomerSearchProjectNotIndexedError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface CustomerSearchProjectNotIndexedError extends ErrorObject { + + /** + *

"ResourceNotFound"

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Project not yet indexed"

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

"Project not yet indexed"

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method to create a deep copy of CustomerSearchProjectNotIndexedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static CustomerSearchProjectNotIndexedError deepCopy( + @Nullable final CustomerSearchProjectNotIndexedError template) { + if (template == null) { + return null; + } + CustomerSearchProjectNotIndexedErrorImpl instance = new CustomerSearchProjectNotIndexedErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withCustomerSearchProjectNotIndexedError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedErrorImpl.java new file mode 100644 index 00000000000..b37a8f4f41a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/CustomerSearchProjectNotIndexedErrorImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned as response to the Search Customers request in case the Customer Search API is not active for the Project.

+ *

Use the Change Customer Search Status update action on the Project to activate the API.

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

"ResourceNotFound"

+ */ + + public String getCode() { + return this.code; + } + + /** + *

"Project not yet indexed"

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

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + CustomerSearchProjectNotIndexedErrorImpl that = (CustomerSearchProjectNotIndexedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java index b23c5b61f37..8dbf6f4759c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java @@ -196,6 +196,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) { return com.commercetools.api.models.error.CountryNotConfiguredInStoreError .deepCopy((com.commercetools.api.models.error.CountryNotConfiguredInStoreError) template); } + if (template instanceof com.commercetools.api.models.error.CustomerSearchProjectNotIndexedError) { + return com.commercetools.api.models.error.CustomerSearchProjectNotIndexedError + .deepCopy((com.commercetools.api.models.error.CustomerSearchProjectNotIndexedError) template); + } if (template instanceof com.commercetools.api.models.error.DiscountCodeNonApplicableError) { return com.commercetools.api.models.error.DiscountCodeNonApplicableError .deepCopy((com.commercetools.api.models.error.DiscountCodeNonApplicableError) template); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedError.java new file mode 100644 index 00000000000..17b78f6693b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedError.java @@ -0,0 +1,80 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned as response to the Search Customers request in case the Customer Search API is not active for the Project.

+ *

Use the Change Customer Search Status update action on the Project to activate the API.

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

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

"ResourceNotFound"

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + * factory method to create a deep copy of GraphQLCustomerSearchProjectNotIndexedError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLCustomerSearchProjectNotIndexedError deepCopy( + @Nullable final GraphQLCustomerSearchProjectNotIndexedError template) { + if (template == null) { + return null; + } + GraphQLCustomerSearchProjectNotIndexedErrorImpl instance = new GraphQLCustomerSearchProjectNotIndexedErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLCustomerSearchProjectNotIndexedError( + Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedErrorImpl.java new file mode 100644 index 00000000000..13f1dc3f94b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLCustomerSearchProjectNotIndexedErrorImpl.java @@ -0,0 +1,99 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

Returned as response to the Search Customers request in case the Customer Search API is not active for the Project.

+ *

Use the Change Customer Search Status update action on the Project to activate the API.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLCustomerSearchProjectNotIndexedErrorImpl + implements GraphQLCustomerSearchProjectNotIndexedError, ModelBase { + + private String code; + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLCustomerSearchProjectNotIndexedErrorImpl(@JsonProperty("code") final String code, + @JsonProperty("values") final Map values) { + this.code = code; + this.values = values; + } + + /** + * create empty instance + */ + public GraphQLCustomerSearchProjectNotIndexedErrorImpl() { + } + + /** + *

"ResourceNotFound"

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLCustomerSearchProjectNotIndexedErrorImpl that = (GraphQLCustomerSearchProjectNotIndexedErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(code, that.code) + .append(values, that.values) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java index c5056096300..dd441cf6cdf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java @@ -179,6 +179,10 @@ public static GraphQLErrorObject deepCopy(@Nullable final GraphQLErrorObject tem return com.commercetools.api.models.error.GraphQLCountryNotConfiguredInStoreError .deepCopy((com.commercetools.api.models.error.GraphQLCountryNotConfiguredInStoreError) template); } + if (template instanceof com.commercetools.api.models.error.GraphQLCustomerSearchProjectNotIndexedError) { + return com.commercetools.api.models.error.GraphQLCustomerSearchProjectNotIndexedError.deepCopy( + (com.commercetools.api.models.error.GraphQLCustomerSearchProjectNotIndexedError) template); + } if (template instanceof com.commercetools.api.models.error.GraphQLDiscountCodeNonApplicableError) { return com.commercetools.api.models.error.GraphQLDiscountCodeNonApplicableError .deepCopy((com.commercetools.api.models.error.GraphQLDiscountCodeNonApplicableError) template); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerIndexingStatus.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerIndexingStatus.java new file mode 100644 index 00000000000..6a873df4b3d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerIndexingStatus.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.project; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The current indexing status of Customer Search.

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

Indexing is scheduled.

*/ + CustomerIndexingStatus SCHEDULED = CustomerIndexingStatusEnum.SCHEDULED; + /** +

Indexing is in progress.

*/ + CustomerIndexingStatus INDEXING = CustomerIndexingStatusEnum.INDEXING; + /** +

Indexing is complete and the Search Customers endpoint returns up-to-date results.

*/ + CustomerIndexingStatus READY = CustomerIndexingStatusEnum.READY; + /** +

Indexing failed due to an internal error.

*/ + CustomerIndexingStatus FAILED = CustomerIndexingStatusEnum.FAILED; + + /** + * possible values of CustomerIndexingStatus + */ + enum CustomerIndexingStatusEnum implements CustomerIndexingStatus { + /** + * Scheduled + */ + SCHEDULED("Scheduled"), + + /** + * Indexing + */ + INDEXING("Indexing"), + + /** + * Ready + */ + READY("Ready"), + + /** + * Failed + */ + FAILED("Failed"); + private final String jsonName; + + private CustomerIndexingStatusEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of CustomerIndexingStatus + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static CustomerIndexingStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new CustomerIndexingStatus() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static CustomerIndexingStatus[] values() { + return CustomerIndexingStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerSearchStatus.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerSearchStatus.java new file mode 100644 index 00000000000..939cb98ac50 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/CustomerSearchStatus.java @@ -0,0 +1,115 @@ + +package com.commercetools.api.models.project; + +import java.util.Arrays; +import java.util.Optional; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +import io.vrap.rmf.base.client.JsonEnum; +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

Specifies the status of the Customer Search index. You can change the status using the Change Customer Search Status update action.

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

indicates that the Customer Search endpoint is fully operational.

*/ + CustomerSearchStatus ACTIVATED = CustomerSearchStatusEnum.ACTIVATED; + /** +

indicates that the Customer Search enpoint is currently not active.

*/ + CustomerSearchStatus DEACTIVATED = CustomerSearchStatusEnum.DEACTIVATED; + + /** + * possible values of CustomerSearchStatus + */ + enum CustomerSearchStatusEnum implements CustomerSearchStatus { + /** + * Activated + */ + ACTIVATED("Activated"), + + /** + * Deactivated + */ + DEACTIVATED("Deactivated"); + private final String jsonName; + + private CustomerSearchStatusEnum(final String jsonName) { + this.jsonName = jsonName; + } + + public String getJsonName() { + return jsonName; + } + + public String toString() { + return jsonName; + } + } + + /** + * the JSON value + * @return json value + */ + @JsonValue + String getJsonName(); + + /** + * the enum value + * @return name + */ + String name(); + + /** + * convert value to string + * @return string representation + */ + String toString(); + + /** + * factory method for a enum value of CustomerSearchStatus + * if no enum has been found an anonymous instance will be created + * @param value the enum value to be wrapped + * @return enum instance + */ + @JsonCreator + public static CustomerSearchStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new CustomerSearchStatus() { + @Override + public String getJsonName() { + return value; + } + + @Override + public String name() { + return value.toUpperCase(); + } + + public String toString() { + return value; + } + }); + } + + /** + * method to find enum using the JSON value + * @param jsonName the json value to be wrapped + * @return optional of enum instance + */ + public static Optional findEnumViaJsonName(String jsonName) { + return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); + } + + /** + * possible enum values + * @return array of possible enum values + */ + public static CustomerSearchStatus[] values() { + return CustomerSearchStatusEnum.values(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusAction.java new file mode 100644 index 00000000000..8e26ffadeb3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusAction.java @@ -0,0 +1,130 @@ + +package com.commercetools.api.models.project; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.constraints.NotNull; + +/** + * ProjectChangeCustomerSearchStatusAction + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProjectChangeCustomerSearchStatusAction projectChangeCustomerSearchStatusAction = ProjectChangeCustomerSearchStatusAction.builder()
+ *             .status(CustomerSearchStatus.ACTIVATED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProjectChangeCustomerSearchStatusActionImpl.class) +public interface ProjectChangeCustomerSearchStatusAction extends ProjectUpdateAction { + + /** + * discriminator value for ProjectChangeCustomerSearchStatusAction + */ + String CHANGE_CUSTOMER_SEARCH_STATUS = "changeCustomerSearchStatus"; + + /** + *

Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project.

+ * @return status + */ + @NotNull + @JsonProperty("status") + public CustomerSearchStatus getStatus(); + + /** + *

Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project.

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

+ *     ProjectChangeCustomerSearchStatusAction projectChangeCustomerSearchStatusAction = ProjectChangeCustomerSearchStatusAction.builder()
+ *             .status(CustomerSearchStatus.ACTIVATED)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProjectChangeCustomerSearchStatusActionBuilder + implements Builder { + + private com.commercetools.api.models.project.CustomerSearchStatus status; + + /** + *

Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project.

+ * @param status value to be set + * @return Builder + */ + + public ProjectChangeCustomerSearchStatusActionBuilder status( + final com.commercetools.api.models.project.CustomerSearchStatus status) { + this.status = status; + return this; + } + + /** + *

Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project.

+ * @return status + */ + + public com.commercetools.api.models.project.CustomerSearchStatus getStatus() { + return this.status; + } + + /** + * builds ProjectChangeCustomerSearchStatusAction with checking for non-null required values + * @return ProjectChangeCustomerSearchStatusAction + */ + public ProjectChangeCustomerSearchStatusAction build() { + Objects.requireNonNull(status, ProjectChangeCustomerSearchStatusAction.class + ": status is missing"); + return new ProjectChangeCustomerSearchStatusActionImpl(status); + } + + /** + * builds ProjectChangeCustomerSearchStatusAction without checking for non-null required values + * @return ProjectChangeCustomerSearchStatusAction + */ + public ProjectChangeCustomerSearchStatusAction buildUnchecked() { + return new ProjectChangeCustomerSearchStatusActionImpl(status); + } + + /** + * factory method for an instance of ProjectChangeCustomerSearchStatusActionBuilder + * @return builder + */ + public static ProjectChangeCustomerSearchStatusActionBuilder of() { + return new ProjectChangeCustomerSearchStatusActionBuilder(); + } + + /** + * create builder for ProjectChangeCustomerSearchStatusAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProjectChangeCustomerSearchStatusActionBuilder of( + final ProjectChangeCustomerSearchStatusAction template) { + ProjectChangeCustomerSearchStatusActionBuilder builder = new ProjectChangeCustomerSearchStatusActionBuilder(); + builder.status = template.getStatus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionImpl.java new file mode 100644 index 00000000000..69c59d2a464 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionImpl.java @@ -0,0 +1,95 @@ + +package com.commercetools.api.models.project; + +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; + +/** + * ProjectChangeCustomerSearchStatusAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProjectChangeCustomerSearchStatusActionImpl implements ProjectChangeCustomerSearchStatusAction, ModelBase { + + private String action; + + private com.commercetools.api.models.project.CustomerSearchStatus status; + + /** + * create instance with all properties + */ + @JsonCreator + ProjectChangeCustomerSearchStatusActionImpl( + @JsonProperty("status") final com.commercetools.api.models.project.CustomerSearchStatus status) { + this.status = status; + this.action = CHANGE_CUSTOMER_SEARCH_STATUS; + } + + /** + * create empty instance + */ + public ProjectChangeCustomerSearchStatusActionImpl() { + this.action = CHANGE_CUSTOMER_SEARCH_STATUS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

Activates or deactivates the Customer Search feature. Activation will trigger building a search index for the Customers in the Project.

+ */ + + public com.commercetools.api.models.project.CustomerSearchStatus getStatus() { + return this.status; + } + + public void setStatus(final com.commercetools.api.models.project.CustomerSearchStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProjectChangeCustomerSearchStatusActionImpl that = (ProjectChangeCustomerSearchStatusActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(status, that.status) + .append(action, that.action) + .append(status, that.status) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(status).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("status", status) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java index c59457f59ab..c4ca967541d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java @@ -33,6 +33,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeCountriesActionImpl.class, name = ProjectChangeCountriesAction.CHANGE_COUNTRIES), @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeCountryTaxRateFallbackEnabledActionImpl.class, name = ProjectChangeCountryTaxRateFallbackEnabledAction.CHANGE_COUNTRY_TAX_RATE_FALLBACK_ENABLED), @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeCurrenciesActionImpl.class, name = ProjectChangeCurrenciesAction.CHANGE_CURRENCIES), + @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusActionImpl.class, name = ProjectChangeCustomerSearchStatusAction.CHANGE_CUSTOMER_SEARCH_STATUS), @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeLanguagesActionImpl.class, name = ProjectChangeLanguagesAction.CHANGE_LANGUAGES), @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeMessagesConfigurationActionImpl.class, name = ProjectChangeMessagesConfigurationAction.CHANGE_MESSAGES_CONFIGURATION), @JsonSubTypes.Type(value = com.commercetools.api.models.project.ProjectChangeNameActionImpl.class, name = ProjectChangeNameAction.CHANGE_NAME), @@ -85,6 +86,10 @@ public static ProjectUpdateAction deepCopy(@Nullable final ProjectUpdateAction t return com.commercetools.api.models.project.ProjectChangeCurrenciesAction .deepCopy((com.commercetools.api.models.project.ProjectChangeCurrenciesAction) template); } + if (template instanceof com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusAction) { + return com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusAction + .deepCopy((com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusAction) template); + } if (template instanceof com.commercetools.api.models.project.ProjectChangeLanguagesAction) { return com.commercetools.api.models.project.ProjectChangeLanguagesAction .deepCopy((com.commercetools.api.models.project.ProjectChangeLanguagesAction) template); @@ -165,6 +170,14 @@ public static com.commercetools.api.models.project.ProjectChangeCurrenciesAction return com.commercetools.api.models.project.ProjectChangeCurrenciesActionBuilder.of(); } + /** + * builder for changeCustomerSearchStatus subtype + * @return builder + */ + public static com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusActionBuilder changeCustomerSearchStatusBuilder() { + return com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusActionBuilder.of(); + } + /** * builder for changeLanguages subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateActionBuilder.java index 8d3367421c2..77ec6db845b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateActionBuilder.java @@ -31,6 +31,10 @@ public com.commercetools.api.models.project.ProjectChangeCurrenciesActionBuilder return com.commercetools.api.models.project.ProjectChangeCurrenciesActionBuilder.of(); } + public com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusActionBuilder changeCustomerSearchStatusBuilder() { + return com.commercetools.api.models.project.ProjectChangeCustomerSearchStatusActionBuilder.of(); + } + public com.commercetools.api.models.project.ProjectChangeLanguagesActionBuilder changeLanguagesBuilder() { return com.commercetools.api.models.project.ProjectChangeLanguagesActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerIndexingProgressQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerIndexingProgressQueryBuilderDsl.java new file mode 100644 index 00000000000..509eddaf0b5 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerIndexingProgressQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.customer_search; + +import com.commercetools.api.predicates.query.*; + +public class CustomerIndexingProgressQueryBuilderDsl { + public CustomerIndexingProgressQueryBuilderDsl() { + } + + public static CustomerIndexingProgressQueryBuilderDsl of() { + return new CustomerIndexingProgressQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder indexed() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("indexed")), + p -> new CombinationQueryPredicate<>(p, CustomerIndexingProgressQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder failed() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("failed")), + p -> new CombinationQueryPredicate<>(p, CustomerIndexingProgressQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder estimatedTotal() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("estimatedTotal")), + p -> new CombinationQueryPredicate<>(p, CustomerIndexingProgressQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerPagedSearchResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerPagedSearchResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..0a9b01ce738 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerPagedSearchResponseQueryBuilderDsl.java @@ -0,0 +1,46 @@ + +package com.commercetools.api.predicates.query.customer_search; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerPagedSearchResponseQueryBuilderDsl { + public CustomerPagedSearchResponseQueryBuilderDsl() { + } + + public static CustomerPagedSearchResponseQueryBuilderDsl of() { + return new CustomerPagedSearchResponseQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder total() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("total")), + p -> new CombinationQueryPredicate<>(p, CustomerPagedSearchResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, CustomerPagedSearchResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, CustomerPagedSearchResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate results( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("results")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_search.CustomerSearchResultQueryBuilderDsl.of())), + CustomerPagedSearchResponseQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder results() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("results")), + p -> new CombinationQueryPredicate<>(p, CustomerPagedSearchResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchIndexingStatusResponseQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchIndexingStatusResponseQueryBuilderDsl.java new file mode 100644 index 00000000000..043da8b0a94 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchIndexingStatusResponseQueryBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.query.customer_search; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerSearchIndexingStatusResponseQueryBuilderDsl { + public CustomerSearchIndexingStatusResponseQueryBuilderDsl() { + } + + public static CustomerSearchIndexingStatusResponseQueryBuilderDsl of() { + return new CustomerSearchIndexingStatusResponseQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder status() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("status")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchIndexingStatusResponseQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate states( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("states")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_search.CustomerIndexingProgressQueryBuilderDsl + .of())), + CustomerSearchIndexingStatusResponseQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder startedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("startedAt")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchIndexingStatusResponseQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder lastModifiedAt() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("lastModifiedAt")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchIndexingStatusResponseQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder retryCount() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("retryCount")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchIndexingStatusResponseQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchRequestQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchRequestQueryBuilderDsl.java new file mode 100644 index 00000000000..6c582f45765 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchRequestQueryBuilderDsl.java @@ -0,0 +1,50 @@ + +package com.commercetools.api.predicates.query.customer_search; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class CustomerSearchRequestQueryBuilderDsl { + public CustomerSearchRequestQueryBuilderDsl() { + } + + public static CustomerSearchRequestQueryBuilderDsl of() { + return new CustomerSearchRequestQueryBuilderDsl(); + } + + public CombinationQueryPredicate query( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("query")) + .inner(fn.apply(com.commercetools.api.predicates.query.search.SearchQueryQueryBuilderDsl.of())), + CustomerSearchRequestQueryBuilderDsl::of); + } + + public CombinationQueryPredicate sort( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("sort")) + .inner(fn.apply(com.commercetools.api.predicates.query.search.SearchSortingQueryBuilderDsl.of())), + CustomerSearchRequestQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder sort() { + return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sort")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchRequestQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder limit() { + return new LongComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("limit")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchRequestQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder offset() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("offset")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchRequestQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchResultQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchResultQueryBuilderDsl.java new file mode 100644 index 00000000000..98f185266bc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/customer_search/CustomerSearchResultQueryBuilderDsl.java @@ -0,0 +1,25 @@ + +package com.commercetools.api.predicates.query.customer_search; + +import com.commercetools.api.predicates.query.*; + +public class CustomerSearchResultQueryBuilderDsl { + public CustomerSearchResultQueryBuilderDsl() { + } + + public static CustomerSearchResultQueryBuilderDsl of() { + return new CustomerSearchResultQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder id() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("id")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchResultQueryBuilderDsl::of)); + } + + public DoubleComparisonPredicateBuilder relevance() { + return new DoubleComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("relevance")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchResultQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/CustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/CustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..769e4e2a854 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/CustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class CustomerSearchProjectNotIndexedErrorQueryBuilderDsl { + public CustomerSearchProjectNotIndexedErrorQueryBuilderDsl() { + } + + public static CustomerSearchProjectNotIndexedErrorQueryBuilderDsl of() { + return new CustomerSearchProjectNotIndexedErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchProjectNotIndexedErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, CustomerSearchProjectNotIndexedErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java index 493ee477f6f..c63754437dd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java @@ -90,6 +90,14 @@ public CombinationQueryPredicate asCountryNotConfigu ErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asCustomerSearchProjectNotIndexedError( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply( + com.commercetools.api.predicates.query.error.CustomerSearchProjectNotIndexedErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asDiscountCodeNonApplicable( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..e02a7523ad2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl { + public GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl() { + } + + public static GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl of() { + return new GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java index 5a05d05184c..70693b0ad8b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java @@ -87,6 +87,14 @@ public CombinationQueryPredicate asCountryNot GraphQLErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asGraphQLCustomerSearchProjectNotIndexedError( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.error.GraphQLCustomerSearchProjectNotIndexedErrorQueryBuilderDsl + .of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asDiscountCodeNonApplicable( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectChangeCustomerSearchStatusActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectChangeCustomerSearchStatusActionQueryBuilderDsl.java new file mode 100644 index 00000000000..444c07492c3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectChangeCustomerSearchStatusActionQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.project; + +import com.commercetools.api.predicates.query.*; + +public class ProjectChangeCustomerSearchStatusActionQueryBuilderDsl { + public ProjectChangeCustomerSearchStatusActionQueryBuilderDsl() { + } + + public static ProjectChangeCustomerSearchStatusActionQueryBuilderDsl of() { + return new ProjectChangeCustomerSearchStatusActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProjectChangeCustomerSearchStatusActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder status() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("status")), + p -> new CombinationQueryPredicate<>(p, ProjectChangeCustomerSearchStatusActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectUpdateActionQueryBuilderDsl.java index ad428681dfa..4ddd787870c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectUpdateActionQueryBuilderDsl.java @@ -56,6 +56,13 @@ public CombinationQueryPredicate asChangeCur ProjectUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asChangeCustomerSearchStatus( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.project.ProjectChangeCustomerSearchStatusActionQueryBuilderDsl.of()), + ProjectUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asChangeLanguages( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchIndexingStatusTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchIndexingStatusTest.java new file mode 100644 index 00000000000..67d22b943ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchIndexingStatusTest.java @@ -0,0 +1,76 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyCustomersSearchIndexingStatusTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @TestTemplate + @UseDataProvider("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKey("test_projectKey").customers().searchIndexingStatus().get().createHttpRequest(), + "get", "test_projectKey/customers/search/indexing-status", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey").customers().searchIndexingStatus().get(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchTest.java new file mode 100644 index 00000000000..bd418d65068 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyCustomersSearchTest.java @@ -0,0 +1,86 @@ + +package com.commercetools.api.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.api.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.ApiHttpRequest; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.error.ApiClientException; +import io.vrap.rmf.base.client.error.ApiServerException; +import io.vrap.rmf.base.client.utils.Generated; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyCustomersSearchTest { + private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); + private final String projectKey = "test_projectKey"; + private final static ApiRoot apiRoot = ApiRoot.of(); + private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); + + @TestTemplate + @UseDataProvider("requestWithMethodParameters") + public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { + Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); + Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeServerException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiServerException.class); + } + + @TestTemplate + @UseDataProvider("executeMethodParameters") + public void executeClientException(HttpRequestCommand httpRequest) throws Exception { + Mockito.when(httpClientMock.execute(Mockito.any())) + .thenReturn(CompletableFuture.completedFuture( + new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); + + Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) + .hasCauseInstanceOf(ApiClientException.class); + } + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .customers() + .search() + .post(com.commercetools.api.models.customer_search.CustomerSearchRequest.of()) + .createHttpRequest(), "post", "test_projectKey/customers/search", }, + new Object[] { + apiRoot.withProjectKey("test_projectKey").customers().search().head().createHttpRequest(), + "head", "test_projectKey/customers/search", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { + new Object[] { apiRoot.withProjectKey("test_projectKey") + .customers() + .search() + .post(com.commercetools.api.models.customer_search.CustomerSearchRequest.of()), }, + new Object[] { apiRoot.withProjectKey("test_projectKey").customers().search().head(), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressTest.java new file mode 100644 index 00000000000..e74d6680622 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerIndexingProgressTest.java @@ -0,0 +1,52 @@ + +package com.commercetools.api.models.customer_search; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class CustomerIndexingProgressTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(CustomerIndexingProgressBuilder builder) { + CustomerIndexingProgress customerIndexingProgress = builder.buildUnchecked(); + Assertions.assertThat(customerIndexingProgress).isInstanceOf(CustomerIndexingProgress.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { CustomerIndexingProgress.builder().indexed(4) }, + new Object[] { CustomerIndexingProgress.builder().failed(9) }, + new Object[] { CustomerIndexingProgress.builder().estimatedTotal(9) } }; + } + + @Test + public void indexed() { + CustomerIndexingProgress value = CustomerIndexingProgress.of(); + value.setIndexed(4); + Assertions.assertThat(value.getIndexed()).isEqualTo(4); + } + + @Test + public void failed() { + CustomerIndexingProgress value = CustomerIndexingProgress.of(); + value.setFailed(9); + Assertions.assertThat(value.getFailed()).isEqualTo(9); + } + + @Test + public void estimatedTotal() { + CustomerIndexingProgress value = CustomerIndexingProgress.of(); + value.setEstimatedTotal(9); + Assertions.assertThat(value.getEstimatedTotal()).isEqualTo(9); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseTest.java new file mode 100644 index 00000000000..f8d84c309ef --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerPagedSearchResponseTest.java @@ -0,0 +1,67 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class CustomerPagedSearchResponseTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(CustomerPagedSearchResponseBuilder builder) { + CustomerPagedSearchResponse customerPagedSearchResponse = builder.buildUnchecked(); + Assertions.assertThat(customerPagedSearchResponse).isInstanceOf(CustomerPagedSearchResponse.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { CustomerPagedSearchResponse.builder().total(1L) }, + new Object[] { CustomerPagedSearchResponse.builder().limit(7) }, + new Object[] { CustomerPagedSearchResponse.builder().offset(3) }, + new Object[] { CustomerPagedSearchResponse.builder() + .results(Collections.singletonList( + new com.commercetools.api.models.customer_search.CustomerSearchResultImpl())) } }; + } + + @Test + public void total() { + CustomerPagedSearchResponse value = CustomerPagedSearchResponse.of(); + value.setTotal(1L); + Assertions.assertThat(value.getTotal()).isEqualTo(1L); + } + + @Test + public void limit() { + CustomerPagedSearchResponse value = CustomerPagedSearchResponse.of(); + value.setLimit(7); + Assertions.assertThat(value.getLimit()).isEqualTo(7); + } + + @Test + public void offset() { + CustomerPagedSearchResponse value = CustomerPagedSearchResponse.of(); + value.setOffset(3); + Assertions.assertThat(value.getOffset()).isEqualTo(3); + } + + @Test + public void results() { + CustomerPagedSearchResponse value = CustomerPagedSearchResponse.of(); + value.setResults( + Collections.singletonList(new com.commercetools.api.models.customer_search.CustomerSearchResultImpl())); + Assertions.assertThat(value.getResults()) + .isEqualTo(Collections + .singletonList(new com.commercetools.api.models.customer_search.CustomerSearchResultImpl())); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseTest.java new file mode 100644 index 00000000000..eb78b6e0779 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchIndexingStatusResponseTest.java @@ -0,0 +1,78 @@ + +package com.commercetools.api.models.customer_search; + +import java.time.ZonedDateTime; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class CustomerSearchIndexingStatusResponseTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(CustomerSearchIndexingStatusResponseBuilder builder) { + CustomerSearchIndexingStatusResponse customerSearchIndexingStatusResponse = builder.buildUnchecked(); + Assertions.assertThat(customerSearchIndexingStatusResponse) + .isInstanceOf(CustomerSearchIndexingStatusResponse.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { CustomerSearchIndexingStatusResponse.builder() + .status(com.commercetools.api.models.project.CustomerIndexingStatus.findEnum("Scheduled")) }, + new Object[] { CustomerSearchIndexingStatusResponse.builder() + .states(new com.commercetools.api.models.customer_search.CustomerIndexingProgressImpl()) }, + new Object[] { CustomerSearchIndexingStatusResponse.builder() + .startedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { CustomerSearchIndexingStatusResponse.builder() + .lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { CustomerSearchIndexingStatusResponse.builder().retryCount(7) } }; + } + + @Test + public void status() { + CustomerSearchIndexingStatusResponse value = CustomerSearchIndexingStatusResponse.of(); + value.setStatus(com.commercetools.api.models.project.CustomerIndexingStatus.findEnum("Scheduled")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.api.models.project.CustomerIndexingStatus.findEnum("Scheduled")); + } + + @Test + public void states() { + CustomerSearchIndexingStatusResponse value = CustomerSearchIndexingStatusResponse.of(); + value.setStates(new com.commercetools.api.models.customer_search.CustomerIndexingProgressImpl()); + Assertions.assertThat(value.getStates()) + .isEqualTo(new com.commercetools.api.models.customer_search.CustomerIndexingProgressImpl()); + } + + @Test + public void startedAt() { + CustomerSearchIndexingStatusResponse value = CustomerSearchIndexingStatusResponse.of(); + value.setStartedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getStartedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void lastModifiedAt() { + CustomerSearchIndexingStatusResponse value = CustomerSearchIndexingStatusResponse.of(); + value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void retryCount() { + CustomerSearchIndexingStatusResponse value = CustomerSearchIndexingStatusResponse.of(); + value.setRetryCount(7); + Assertions.assertThat(value.getRetryCount()).isEqualTo(7); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestTest.java new file mode 100644 index 00000000000..0d20ef52700 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchRequestTest.java @@ -0,0 +1,66 @@ + +package com.commercetools.api.models.customer_search; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class CustomerSearchRequestTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(CustomerSearchRequestBuilder builder) { + CustomerSearchRequest customerSearchRequest = builder.buildUnchecked(); + Assertions.assertThat(customerSearchRequest).isInstanceOf(CustomerSearchRequest.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { + new Object[] { CustomerSearchRequest.builder() + .query(new com.commercetools.api.models.search.SearchQueryImpl()) }, + new Object[] { CustomerSearchRequest.builder() + .sort(Collections.singletonList(new com.commercetools.api.models.search.SearchSortingImpl())) }, + new Object[] { CustomerSearchRequest.builder().limit(7) }, + new Object[] { CustomerSearchRequest.builder().offset(3) } }; + } + + @Test + public void query() { + CustomerSearchRequest value = CustomerSearchRequest.of(); + value.setQuery(new com.commercetools.api.models.search.SearchQueryImpl()); + Assertions.assertThat(value.getQuery()).isEqualTo(new com.commercetools.api.models.search.SearchQueryImpl()); + } + + @Test + public void sort() { + CustomerSearchRequest value = CustomerSearchRequest.of(); + value.setSort(Collections.singletonList(new com.commercetools.api.models.search.SearchSortingImpl())); + Assertions.assertThat(value.getSort()) + .isEqualTo(Collections.singletonList(new com.commercetools.api.models.search.SearchSortingImpl())); + } + + @Test + public void limit() { + CustomerSearchRequest value = CustomerSearchRequest.of(); + value.setLimit(7); + Assertions.assertThat(value.getLimit()).isEqualTo(7); + } + + @Test + public void offset() { + CustomerSearchRequest value = CustomerSearchRequest.of(); + value.setOffset(3); + Assertions.assertThat(value.getOffset()).isEqualTo(3); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultTest.java new file mode 100644 index 00000000000..5921fda2d14 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/customer_search/CustomerSearchResultTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.customer_search; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class CustomerSearchResultTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(CustomerSearchResultBuilder builder) { + CustomerSearchResult customerSearchResult = builder.buildUnchecked(); + Assertions.assertThat(customerSearchResult).isInstanceOf(CustomerSearchResult.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { CustomerSearchResult.builder().id("id") }, + new Object[] { CustomerSearchResult.builder().relevance(0.5586561) } }; + } + + @Test + public void id() { + CustomerSearchResult value = CustomerSearchResult.of(); + value.setId("id"); + Assertions.assertThat(value.getId()).isEqualTo("id"); + } + + @Test + public void relevance() { + CustomerSearchResult value = CustomerSearchResult.of(); + value.setRelevance(0.5586561); + Assertions.assertThat(value.getRelevance()).isEqualTo(0.5586561); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionTest.java new file mode 100644 index 00000000000..11f6cd06d7b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/project/ProjectChangeCustomerSearchStatusActionTest.java @@ -0,0 +1,39 @@ + +package com.commercetools.api.models.project; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ProjectChangeCustomerSearchStatusActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProjectChangeCustomerSearchStatusActionBuilder builder) { + ProjectChangeCustomerSearchStatusAction projectChangeCustomerSearchStatusAction = builder.buildUnchecked(); + Assertions.assertThat(projectChangeCustomerSearchStatusAction) + .isInstanceOf(ProjectChangeCustomerSearchStatusAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProjectChangeCustomerSearchStatusAction.builder() + .status(com.commercetools.api.models.project.CustomerSearchStatus.findEnum("Activated")) } }; + } + + @Test + public void status() { + ProjectChangeCustomerSearchStatusAction value = ProjectChangeCustomerSearchStatusAction.of(); + value.setStatus(com.commercetools.api.models.project.CustomerSearchStatus.findEnum("Activated")); + Assertions.assertThat(value.getStatus()) + .isEqualTo(com.commercetools.api.models.project.CustomerSearchStatus.findEnum("Activated")); + } +} diff --git a/references.txt b/references.txt index 6b5615115e2..fad5eda0e44 100644 --- a/references.txt +++ b/references.txt @@ -264,3 +264,4 @@ a535e06bc2906c4f8b803f5a7686cbb920afd40a c59cca7c5461c092dba5dc5bd547a9d62e404ad5 dd8eca14a0c47d154e4c705909a3d2696369bfd1 63b10d36aea8ef676ec3c5cdbcf59eab1242d827 +e5268785dcaf7bd56dafa13f2901b69468552fd0 From 7ab472d14924480e4578cd0ede66f1fc706b685c Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 14:33:44 +0000 Subject: [PATCH 3/3] build(codegen): updating SDK --- .../api/models/cart/CartAddLineItemAction.java | 4 ++-- .../api/models/cart/CartAddLineItemActionBuilder.java | 8 ++++---- .../api/models/cart/CartAddLineItemActionImpl.java | 2 +- .../com/commercetools/api/models/cart/LineItemDraft.java | 4 ++-- .../api/models/cart/LineItemDraftBuilder.java | 8 ++++---- .../commercetools/api/models/cart/LineItemDraftImpl.java | 2 +- .../models/order_edit/StagedOrderAddLineItemAction.java | 4 ++-- .../order_edit/StagedOrderAddLineItemActionBuilder.java | 8 ++++---- .../order_edit/StagedOrderAddLineItemActionImpl.java | 2 +- references.txt | 1 + 10 files changed, 22 insertions(+), 21 deletions(-) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java index d3e4340ced8..a52377f589c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemAction.java @@ -128,7 +128,7 @@ public interface CartAddLineItemAction public ExternalLineItemTotalPrice getExternalTotalPrice(); /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ @Valid @@ -242,7 +242,7 @@ public interface CartAddLineItemAction public void setExternalTotalPrice(final ExternalLineItemTotalPrice externalTotalPrice); /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java index 5a521f6285d..1b9bbca5a11 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionBuilder.java @@ -290,7 +290,7 @@ public CartAddLineItemActionBuilder externalTotalPrice( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -303,7 +303,7 @@ public CartAddLineItemActionBuilder externalTaxRate( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -315,7 +315,7 @@ public CartAddLineItemActionBuilder withExternalTaxRate( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set * @return Builder */ @@ -609,7 +609,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java index d25c00692d4..93af3e106b9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartAddLineItemActionImpl.java @@ -191,7 +191,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

*/ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java index c2f3fbfba67..8c695e0ae79 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraft.java @@ -119,7 +119,7 @@ public interface LineItemDraft extends com.commercetools.api.models.Customizable public ExternalLineItemTotalPrice getExternalTotalPrice(); /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ @Valid @@ -231,7 +231,7 @@ public interface LineItemDraft extends com.commercetools.api.models.Customizable public void setExternalTotalPrice(final ExternalLineItemTotalPrice externalTotalPrice); /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java index 2ca69b44320..2ba288f5155 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftBuilder.java @@ -289,7 +289,7 @@ public LineItemDraftBuilder externalTotalPrice( } /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -302,7 +302,7 @@ public LineItemDraftBuilder externalTaxRate( } /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -314,7 +314,7 @@ public LineItemDraftBuilder withExternalTaxRate( } /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set * @return Builder */ @@ -605,7 +605,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java index 66d4277f3ef..5f417e18dd9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/LineItemDraftImpl.java @@ -175,7 +175,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode and Single ShippingMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

*/ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate() { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java index 67e6702597e..046237f4a6b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemAction.java @@ -132,7 +132,7 @@ public interface StagedOrderAddLineItemAction public ExternalLineItemTotalPrice getExternalTotalPrice(); /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ @Valid @@ -238,7 +238,7 @@ public interface StagedOrderAddLineItemAction public void setExternalTotalPrice(final ExternalLineItemTotalPrice externalTotalPrice); /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java index 8f4a2bb5485..5385ac2d4a6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionBuilder.java @@ -287,7 +287,7 @@ public StagedOrderAddLineItemActionBuilder externalTotalPrice( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -300,7 +300,7 @@ public StagedOrderAddLineItemActionBuilder externalTaxRate( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param builder function to build the externalTaxRate value * @return Builder */ @@ -312,7 +312,7 @@ public StagedOrderAddLineItemActionBuilder withExternalTaxRate( } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @param externalTaxRate value to be set * @return Builder */ @@ -513,7 +513,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

* @return externalTaxRate */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java index ce28c7fe7ca..d6a4ac9060c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderAddLineItemActionImpl.java @@ -187,7 +187,7 @@ public com.commercetools.api.models.cart.ExternalLineItemTotalPrice getExternalT } /** - *

External Tax Rate for the Line Item, if the Cart has the External TaxMode.

+ *

Sets the external Tax Rate for the Line Item, if the Cart has the External TaxMode. If the Cart has Multiple ShippingMode, the Tax Rate is accepted but ignored.

*/ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate() { diff --git a/references.txt b/references.txt index fad5eda0e44..acb6fe2aab6 100644 --- a/references.txt +++ b/references.txt @@ -265,3 +265,4 @@ c59cca7c5461c092dba5dc5bd547a9d62e404ad5 dd8eca14a0c47d154e4c705909a3d2696369bfd1 63b10d36aea8ef676ec3c5cdbcf59eab1242d827 e5268785dcaf7bd56dafa13f2901b69468552fd0 +28ca8abbefd999fa19fc31d729cb711cd3341a23